Configuration of Cisco Switches

Source: Internet
Author: User
Tags config switches cisco switch

The previous one to everyone talked about the basic operation of Cisco switches, before the Dragon Boat Festival holiday, the Cisco switch to share a simple configuration and wish you a happy Dragon Boat festival! Ok, to configure the switch, you must first enter the switch's global configuration mode, successfully connecting to the switch and landing successfully into privileged mode

1, input into the global configuration mode:

Switch#configure terminal   
Enter configuration commands, one per line.  End With cntl/z.  
Switch (config) # switch (config) #  
switch (config) #

Such a simple command, we have entered the global configuration mode, remember the last article to see the port in the information queried the value of the Name field? This field actually represents the description information for the switch port

2, modify the port description

 switch# switch# switch#conf ter Enter configuration commands, one per line.  
End With cntl/z. Switch (config) # switch (config) #int FA0/3 switch (config-if) # switch (config-if) #desc switch (config-if) #description u Pdatedesc switch (config-if) # switch (config-if) #exit switch (config) #exit switch# switch#show Inter switch#show Interfaces Statu switch#show interfaces status Port Name status Vlan Duplex Sp           Eed Type FA0/1 connected 1 a-full a-100 10/100basetx FA0/2 h3c2.250 Connected trunk a-full a-100 10/100basetx fa0/3 updatedesc notconnect 1 Auto Auto 10          /100basetx FA0/4 connected 1 a-full a-100 10/100basetx FA0/5 h3c-2.200 Connected 1 a-full a-100 10/100basetx FA0/6 notconnect 1 Auto Auto 10/100basetx 

This column more highlights: http://www.bianceng.cnhttp://www.bianceng.cn/Network/jhjs/

The key command to modify the description is to enter under the port to be modified in configuration mode and then use description + "content"! The effect should be very intuitive, then is to modify the location of the Port VLAN

3. Modify Port VLAN

 switch# switch# switch#conf t Enter configuration commands, one per line.  
End With cntl/z. Switch (config) # switch (config) #int FA0/3 switch (config-if) # switch (config-if) #sw ACC VL 2 Switch (config-if) # SWI               TCH (config-if) #exit switch (config) # switch (config) #exit switch# switch#show Inter statu Port Name Status Vlan Duplex Speed Type fa0/1 connected 1 a-full         0 10/100basetx FA0/2 h3c2.250 connected trunk a-full a-100 10/100basetx FA0/3 Updatedesc Notconnect 2 Auto Auto 10/100basetx FA0/4 connected 1 A-full-                        10/100basetx FA0/5 h3c-2.200 connected 1 a-full a-100 10/100basetx FA0/6 Notconnect 1 Auto Auto 10/100basetx 

Logic and modify the port description is the same, for the configuration, must be able to have the right to configure the location and to configure the object, here to modify the Port VLAN key command: SW ACC VL + Vlantag, the command is obviously abbreviated, but does not affect the implementation, The full command is written as: Switchport access VLAN + Vlantag

There are also a few simple operations on the port, such as modifying the port mode,

4. Modify Port Mode

Switch (config-if) #switchport trunk encap dot1q----------------set up the encapsulation protocol for VLAN relay  
Note: dot1q is the IEEE 802.1Q protocol, is a kind of VLAN encapsulation way, is the public agreement. There is also a trunk protocol, ISL, and a way to encapsulate the VLAN, but this is a Cisco private agreement that no other vendor can use.  
switch (config-if) #switchport mode trunk------------------------set Port type to trunk  
switch (config-if) # Switchport trunk allowed VLAN 1,2---------set allowed VLANs, default without configuration, for all VLAN  
switch (config-if) #switchport Trun native VLAN 999---------------set the native VLAN for the trunk port

5, port Status

Switch (config) #  
switch (config) #int fa0/3  
switch (config-if) #  
switch (config-if) # switch (  
config-if #sw ACC VL 1  
switch (config-if) #  
switch (config-if) # switch (  
config-if) #shutd     
switch (config-if) # Shutdown   
Switch (config-if) #      
switch (config-if) #exit  
switch (config) #  
switch (config) #exit  
switch#  
switch#show Inter statu  
      
Port      Name               Status       Vlan       Duplex  Speed Type  
FA0/1                        connected    1          a-full  a-100 10/100basetx           FA0/2 h3c2.250 connected    trunk      a-full  a-100 10/100basetx  
fa0/3 updatedesc disabled     1            Auto   Auto 10/100basetx  
FA0/4                        connected    1          a-full  a-100 10/100basetx

The above series for switching VLANs, and shutdown ports, this time you may see the switch 3rd port State has become disable, if we want to enable the port only

switch#conf t  
Enter configuration commands, one per line.  End With cntl/z.  
Switch (config) #  
switch (config) #int fa0/3  
switch (config-if) #  
switch (config-if) #no shut  
switch ( CONFIG-IF) #no shutdown   
switch (config-if) #  
switch (config-if) #exit  
switch (config) #  
switch ( Config) #exit  
switch#  
switch#show Inter statu  
      
Port      Name               Status       Vlan       Duplex  Speed Type  
FA0/1                        connected    1          a-full  a-100           10/100basetx    FA0/2 h3c2.250 connected Trunk      a-full  a-100 10/100basetx  
fa0/3 updatedesc notconnect   1            auto   Auto 10/100basetx  
FA0/4                        connected    1          a-full  a-100 10/100basetx

Today is here, and have time to share with you what you need in the work and useful things and knowledge! Please look forward to the next post--some settings for switch login

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.