(CCNA) Cisco Commands Cheat Sheet #2
(CCNA) Cisco Commands Cheat Sheet #2
(CCNA) Cisco Commands Cheat Sheet #2
http://boubakr92.wordpress.com/2013/09/19/ccna-cheat-sheet-part-2/
Boubakr Tech
It's all for nothing if you don't have freedom !
19SEP2013
Specify the maximum number of allowed MAC addresses: 1 SW1(config-if)# switchport port-security maximum 1
Dene the action to take when violation occurs: 1 SW1(config-if)# switchport port-security violation shutdown ! options: shutdown,
3/27/2014 2:57 AM
http://boubakr92.wordpress.com/2013/09/19/ccna-cheat-sheet-part-2/
The sticky keyword is used to let the interface dynamically learns and congures the MAC addresses of the currently connected hosts. 1 SW1(config-if)# switchport port-security mac-address 68b5.9965.1195
! options: H.
Shows detailed information about port security on the specied interface: 1 SW1# show port-security interface fa0/5
Configuring VLANs:
Create a new VLAN and give it a name: 1 2 SW1(config)# vlan 10 SW1(config-vlan)# name SALES
Assign an access interface to access a specic VLAN: 1 2 3 SW1(config)# interface fastEthernet 0/5 SW1(config-if)# switchport mode access SW1(config-if)# switchport access vlan 10
2 of 6
3/27/2014 2:57 AM
http://boubakr92.wordpress.com/2013/09/19/ccna-cheat-sheet-part-2/
Configuring Trunks:
1 2 3
SW1(config)# interface fastEthernet 0/1 SW1(config-if)# switchport mode trunk ! options: access, trunk, dynamic auto, dyn SW1(config-if)# switchport trunk allowed vlan add 10 ! options: add, remove, all,
Prevent trunking by disabling auto negotiation on the interface: 1 2 SW1(config-if)# nonegotiate ! or hardcode the port asan access port SW1(config-if)# switchport mode access
Assign the port to an unused VLAN: 1 SW1(config-if)# switchport access vlan 222
Configuring VTP:
Congure VTP mode: The transparent VTP mode is used when an engineer wants to deactivate VTP on a particular switch 1 SW1(config)# vtp mode server ! options: server, client, transparent
Congure VTP pruning (optional): 1 SW1(config)# vtp pruning ! only works on VTP servers
3/27/2014 2:57 AM
http://boubakr92.wordpress.com/2013/09/19/ccna-cheat-sheet-part-2/
Lists all the trunk ports on a switch including the trunk allowed VLANs: 1 SW1# show interfaces trunk
Lists information about the VLANs: 1 SW1# show vlan {brief | id | name | summary}
Lists VTP conguration (mode, domain-name, version, etc) and revision number: 1 SW1# show vtp status
STP optimization:
Hard coding the root bridge (changing bridge priority): 1 2 3 4 SW1(config)# spanning-tree vlan 1 root primary SW1(config)# spanning-tree vlan 1 root secondary ! Priority must be a multiply of 4096 SW1(config)# spanning-tree [vlan 1]priority 8192
Changing the STP mode: 1 SW1(config)# spanning-tree mode rapid-pvst ! options: mst, pvst, rapid-pvst
Enabling portfast and BPDU guard on an interface: Portfast and BPDU guard are enabled only on interfaces connected to end user hosts 1 2 SW1(config-if)# spanning-tree portfast SW1(config-if)# spanning-tree bpduguard enable
4 of 6
3/27/2014 2:57 AM
http://boubakr92.wordpress.com/2013/09/19/ccna-cheat-sheet-part-2/
Shows STP info only on a specic port: 1 SW1# show spanning-tree interface fa0/2
Shows STP info only for a specic VLAN: 1 SW1# show spanning-tree vlan 1
Shows info about the root switch: 1 SW1# show spanning-tree [vlan 1] root
Shows info about the local switch: 1 SW1# show spanning-tree [vlan 1] bridge
Provides informational messages about the changes in the STP topology: 1 SW1# debug spanning-tree events
3/27/2014 2:57 AM
http://boubakr92.wordpress.com/2013/09/19/ccna-cheat-sheet-part-2/
Shows information about CDP on a specic interface: 1 SW1# show cdp interface fa0/2
Shows information about the directly connected cisco devices including interfaces names capabilities: 1 SW1# show cdp neighbors
Shows detailed information about the neighboring cisco devices including device address and version of IOS they run: 1 2 3 SW1# show cdp neighbors detail ! OR SW1# show cdp entry *
Shows detailed information about the specied entry only: 1 Enjoy ! SW1# show cdp entry SW2
ccna, cdp, cheat sheet, cisco, stp, switching, vlan, vtp 5 Comments
6 of 6
3/27/2014 2:57 AM