0% found this document useful (0 votes)
499 views6 pages

(CCNA) Cisco Commands Cheat Sheet #2

This document provides a summary of Cisco commands for CCNA students. It lists commands for configuring port security, VLANs, trunking, VTP, STP optimization, etherchannels, and using CDP for network verification. The document is the second in a series of cheat sheets on Cisco commands intended to help students study for the CCNA exam.

Uploaded by

researcherjack
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
499 views6 pages

(CCNA) Cisco Commands Cheat Sheet #2

This document provides a summary of Cisco commands for CCNA students. It lists commands for configuring port security, VLANs, trunking, VTP, STP optimization, etherchannels, and using CDP for network verification. The document is the second in a series of cheat sheets on Cisco commands intended to help students study for the CCNA exam.

Uploaded by

researcherjack
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

[CCNA] Cisco Commands Cheat Sheet #2 | Boubakr Tech

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

[CCNA] Cisco Commands Cheat Sheet #2


posted in CCNA, Cisco, Network by Boubakr Continuing About theseour ads Cisco (h p://en.wordpress.com/about-these-ads/) Commands Cheat Sheet for CCNA students, this is our 2nd post. Cisco Commands Cheat Sheet #1 (h part-1/) Cisco Commands Cheat Sheet #3 (h part-3/) Cisco Commands Cheat Sheet #4 (h part-4/) Cisco Commands Cheat Sheet #5 (h part-5/) p://boubakr92.wordpress.com/2013/09/16/ccna-cheat-sheetp://boubakr92.wordpress.com/2013/09/23/ccna-cheat-sheetp://boubakr92.wordpress.com/2013/09/26/ccna-cheat-sheetp://boubakr92.wordpress.com/2013/09/30/ccna-cheat-sheet-

Configuring port security:


Make the switch interface as access port: 1 SW1(config-if)# switchport mode access

Enable port security on the interface: 1 SW1(config-if)# switchport port-security

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,

Specify the allowed MAC addresses:


1 of 6

3/27/2014 2:57 AM

[CCNA] Cisco Commands Cheat Sheet #2 | Boubakr Tech

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.

Verify and troubleshoot port security:


Shows the entries of the mac address table: 1 SW1# show mac-address-table

Overview of port security of all interfaces: 1 SW1# show port-security

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

Configuring an auxiliary VLAN for cisco IP phones:


1 2 3 4 SW1(config)# interface fastEthernet 0/5 ! accessing vlan 10 (data) and 12 (VoIP) SW1(config-if) #switchport access vlan 10 SW1(config-if) #switchport voice vlan 12

2 of 6

3/27/2014 2:57 AM

[CCNA] Cisco Commands Cheat Sheet #2 | Boubakr Tech

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,

Securing VLANs and Trunking:


Administratively disable unused interfaces: 1 SW1(config-if)# shutdown

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 domain name: 1 SW1(config)# vtp domain EXAMPLE ! case-sensitive

Congure VTP password (optional): 1 SW1(config)# vtp password cisco ! case-sensitive

Congure VTP pruning (optional): 1 SW1(config)# vtp pruning ! only works on VTP servers

Enable VTP version 2 (optional): 1


3 of 6

SW1(config)# vtp version 2

3/27/2014 2:57 AM

[CCNA] Cisco Commands Cheat Sheet #2 | Boubakr Tech

http://boubakr92.wordpress.com/2013/09/19/ccna-cheat-sheet-part-2/

Verify and troubleshoot VLANs and VTP:


Lists information about administrative se ing and operation status of interface: 1 SW1# show interfaces if switchport

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

Shows the VTP password: 1 SW1# show vtp password

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

Changing port cost: 1 SW1(config-if)# spanning-tree [vlan 1] cost 25

Bundling interfaces into an etherchannel:

4 of 6

3/27/2014 2:57 AM

[CCNA] Cisco Commands Cheat Sheet #2 | Boubakr Tech

http://boubakr92.wordpress.com/2013/09/19/ccna-cheat-sheet-part-2/

SW1(config-if)# channel-group 1 mode on

! options: auto, desirable, on

STP verification and troubleshooting:


Shows detailed info about STP state: 1 SW1# show spanning-tree

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

Show the state of the etherchannels: 1 SW1# show etherchannel 1

Provides informational messages about the changes in the STP topology: 1 SW1# debug spanning-tree events

Enabling or disabling CDP:


Enabling CDP globally on a switch: 1 SW1(config)# cdp run

Disabling CDP on a given interface: 1 SW1(config-if)# no cdp enable

Using CDP for network verification and troubleshooting:


Shows global information about CDP itself:
5 of 6

3/27/2014 2:57 AM

[CCNA] Cisco Commands Cheat Sheet #2 | Boubakr Tech

http://boubakr92.wordpress.com/2013/09/19/ccna-cheat-sheet-part-2/

SW1# show cdp

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

5 thoughts on [CCNA] Cisco Commands Cheat Sheet #2


Pingback: [CCNA] Cisco Commands Cheat Sheet #3 | Boubakr Tech Pingback: [CCNA] Cisco Commands Cheat Sheet #4 | Boubakr Tech Pingback: [CCNA] Cisco Commands Cheat Sheet #5 | Boubakr Tech Pingback: [CCNA] Cisco Commands Cheat Sheet | Boubakr Tech Pingback: [CCNA] Cisco Commands Cheat Sheet Summary | Boubakr Tech

Blog at WordPress.com. | The Adelle Theme. Follow

Follow Boubakr Tech


Powered by WordPress.com

6 of 6

3/27/2014 2:57 AM

You might also like