You are on page 1of 5

Cisco switch commands cheat sheet Cisco commands cheat sheet for switch: 1Setting hostname based on the

IOS switches: Switch (config hostname hostname) # Setting system name based on the CLI switches: Switch (enable) set system name name-string

2 Setting password based on the IOS switches: Switch (config) enable password level 1 password # Setting password based on the CLI switches: Switch (enable) set password Switch (enable) set enalbepass

3 Setting the remote access based on the IOS switch: Switch (config) interface VLAN 1 # Switch (config-if) ! address !-address netmas" # Switch (config-if) ! defa#lt-gateway !-address # Setting the remote access based on the CLI switch: Switch (enable) set interface sc$ !-address netmas" broadcast-address Switch (enable) set interface sc$ VLAN Switch (enable) set ! ro#te defa#lt gateway

4 Enabled and browsing information of C ! based on the IOS switch % Switch (config-if &'! enable) # Switch (config-if) no &'! enable # In order to "iew the Cisco C ! anno#ncement ad$acent e%#ipment: Switch# show &'! interface Switch# show cdp neighbors Enabled and browsing information of C ! based on the CLI switch : Switch (enable) set &'! (enable)disable* mod#le+port In order to "iew the Cisco C ! anno#ncement ad$acent e%#ipment: Switch (enable) show cdp neighbors

& !ort description based on the IOS switch:


1

Switch (config-if description description-string) # !ort description based on the CLI switch: Switch (enable) set port name mod#le+n#mber description-string

' Setting port speed based on the IOS switches: Switch (config-if) # speed(1$)1$$)a#to* Setting port speed based on the CLI switches: Switch (enable) set port speed mo#dle+n#mber (1$)1$$)a#to* Switch (enable) set port speed mo#dle+n#mber (,)1-)a#to*

( Setting the ethernet lin) pattern based on the IOS switch: Switch (config-if d#ple. (a#to)f#ll)half*) # Setting the ethernet lin) pattern based on the CLI switch: Switch (enable) set port d#ple. mod#le+n#mber (f#ll)half*

* Config#ring the static +L,- based on IOS switch: Switch# VLAN database Switch (VLAN) VLAN vlan-n#m name VLA # Switch (VLAN) # e.it Switch# config#re teriminal Switch (config) interface interface mod#le+n#mber # Switch (config-if) switchport mode access # Switch (config-if) switchport access VLAN vlan-n#m # Switch (config-if) # end Config#ring the static +L,- based on CLI switch: Switch (enable) set VLAN vlan-n#m Switch (enable) set VLAN vlan-n#m mod-n#m+port-list

. Config#ring the +L,- relay line based on IOS switch: Switch (config) interface interface mod+port # Switch (config-if) switchport mode tr#n" # Switch (config-if) switchport tr#n" encaps#lation (isl)dotl/* # Switch (config-if) switchport tr#n" allowed VLAN remove vlan-list # Switch (config-if) switchport tr#n" allowed VLAN add vlan-list #
2

Config#ring the +L,- relay line based on CLI switch: Switch (enable) set tr#n" mod#le+port Vlan-range

1/ Config#ring +0! management domain based on the IOS switch: Switch# VLAN database Switch (VLAN) V0! domain domain-name # Config#ring +0! management domain based on the CLI switch: Switch (enable) set V0!

11 Config#ring +0! mode based on the IOS switch: Switch# VLAN database Switch (VLAN) V0! domain domain-name # Switch (VLAN V0! (sever)cilent)transparent*) # Switch (VLAN) V0! password password # Config#ring +0! mode based on the CLI switch: Switch (enable) set V0!

12 Config#ring the +0! "ersion based on the IOS switch: Switch# VLAN database Switch (VLAN V0! v1-mode) # Config#ring the +0! "ersion based on the CLI switch: Switch (enable) set V0! V1 enable

13 Starting the +0! tailoring based on the IOS switch: Switch# VLAN database Switch (VLAN V0! pr#ning) # Starting the +0! tailoring based on the CLI switch: Switch (enable) set V0! pr#ning enable

14 Config#ring Ethernet channel based on the IOS switch : Switch (config-if) port gro#p gro#p-n#mber # Config#ring Ethernet channel based on the CLI switch : Switch (enable) set port channel mo#dle+port-range mode(on)off)desirable)a#to*
3

1& ,d$#sting the root path cost based on the IOS switches: Switch (config-if) spanning-tree cost cost # ,d$#sting the root path cost based on the CLI switches: Switch (enable) set spantree portcost mo#dle+port cost Switch (enable) set spantree portvlancost mo#dle+port

1' ,d$#sting the port I based on the IOS switches: Switch (config-if spanning-treeport-priority port-priority) # ,d$#sting the port I based on the CLI switches: Switch (enable) set spantree portpri (mld#le+port*priority Switch (enable) set spantree portvlanpri (mod#le+port*priority

1( Setting the S0! cloc) based on IOS switch: Switch (config) spanning-tree hello-time seconds # Switch (config) spanning-tree forward-time seconds # Switch (config) spanning-tree ma.-age seconds # Setting the S0! cloc) based on CLI switch: Switch (enable) set spantree 2ello interval Switch (enable) set spantree fwddelay delay Switch (enable) set spantree ma.age agingtiame

1* Enable or disable the !ort 1ast feat#re based on the IOS switch port: Switch (config-if) #spanning-tree portfast Enable or disable the !ort 1ast feat#re based on the CLI switch port: Switch (enable) set spantree portfast (mod#le+port*(enable)disable*

1. Enable or disable the 2plin)1ast feat#re based on the IOS switch port: Switch (config spanning-tree #plin"fast) # Enable or disable the 2plin)1ast feat#re based on the CLI switch port: Switch (enable) set spantree #plin"fast (enable)disable*

3ore related: 2ow 0o 3ecover &isco 3o#ter !assword


4

0he 'ifference of 0he &isco &atalyst 14$$ and &isco &atalyst 14$$ 3ore Cisco prod#cts and 4e"iews yo# can "isit: http://www.3anetwork.com/blog

5Anetwor"6com is a world leading &isco networ"ing prod#cts wholesaler7 we wholesale original new &isco networ"ing e/#ipments7 incl#ding &isco &atalyst switches7 &isco ro#ters7 &isco firewalls7 &isco wireless prod#cts7 &isco mod#les and interface cards prod#cts at competitive price and ship to worldwide6 8#r website% http%++www65anetwor"6com 0elephone% 9:;1-5$-4-<<55 =mail% info>5Anetwor"6com Address% 15+? L#c"y !la@a7 51;-511 Loc"hart 3oad7 Aanchai7 2ong"ong