Switch Commands Flashcards
Change the encapsulation type on a trunk to dot1q
SW(config-if)# switchport trunk encapsulation dot1q
Change a trunk port to negotiate a trunk link
SW(config-if)# switchport mode {dynamic desirable | auto}
Hard code an interface to be a trunk
SW(config-if)# switchport mode trunk
Hard code an interface to be an access port
SW(config-if)# switchport mode access
Set the VTP mode and domain on a switch (2 commands)
SW(config)# vtp mode {server | client | transparent | off}
SW(config)# vtp domain VTP_DOM_NAME
Specify the VTP version
SW(config)# vtp version {1 | 2 | 3}
Create a password for the VTP domain
SW(config)# vtp password {password}
Make the switch the primary VTP server on the domain
SW# vtp primary
Display VTP information on a switch
SW# show vtp status
Change VLANs that can traverse a trunk
SW(config-if)# switchport trunk allowed vlans [add | remove] {vlan-id},[vlan-id]
Create a VLAN and assign a name to it (2 commands)
SW(config)# vlan {vlan-number}
SW(config-vlan)# name NAME
Display switchport information about an interface
SW# show interface {interface-id} switchport
Display all trunks on a switch
SW# show interface trunk
Create an Etherchannel (2 commands)
SW(config)# int range {interface-id} - {interface-id}
SW(config-if-range)# channel-group {1-255} mode [active | auto | on | desirable]
Create a LACP Etherchannel
SW(config-if-range)# channel-group {1-255} mode {active | passive}
Create a LAgP Etherchannel
SW(config-if-range)# channel-group {1-255} mode {auto | desirable}
Display Etherchannel information
SW# show etherchannel summary
Display information about a port channel
SW# show interface port-channel {number}
Display Etherchannel neighbors
SW# show {lacp | lagp} neighbors
Display Etherchannel counters
SW# show {lacp | lagp} counters
Enable “minimum links” for Etherchannel (2 commands)
SW(config)# interface port-channel {number}
SW(config-if)# port-channel min-links {1-8}
Enable “max links” for an Etherchannel (3 commands)
SW(config)# interface port-channel {number}
SW(config-if)# lacp fast-switchover
SW(config-if)# lacp max-bundle {1-8}
Related to max links and hot standby, display the system priority
SW# show lacp sys-id
Alter the system priority so the switch can become the hot-standby master
SW(config)# lacp system-priority {1 - 65535}
NOTE: lower is more preferred
Alter the port priority to determine whether it will be the hot-standby port in the port-channel or not
SW(config-if)# lacp port-priority {1 - 65535}
NOTE: lower is more preferred
Enable rate fast on an Etherchannel
SW(config-if-range)# lacp rate fast
When a port is showing “suspended”, what does that generally mean?
There is a problem with Etherchannel
Display the burned-in MAC for a switch
SW# show version
SW# show spanning-tree (Bridge ID Address)
Display the STP Root bridge for all VLAN IDs
SW# show spanning-tree root
Display the STP Root bridge for a specific VLAN ID
SW# show spanning-tree vlan {vlan-id} root
Alter the STP priority of a switch to influence election of Root Bridge
SW(config)# spanning-tree vlan {vlan-id} priority {number}
NOTE: the priority number is in increments of 4096
Set this switch as the root bridge
SW(config)# spanning-tree vlan {vlan-id} root [primary | secondary]
Display detailed information regarding an STP interface
SW# show spanning-tree vlan {vlan-id} interface {int-id}
Alter the priority of an STP port
SW(config-if)# spanning-tree port-priority {priority-value}
SW(config-if)# spanning-tree vlan {vlan-id} port-priority {priority-value}
Alter the cost of an STP port
SW(config-if)# spanning-tree cost {value}
SW(config-if)# spanning-tree vlan {vlan-id} cost {value}
Enable Uplink Fast. Where would this be configured?
Configure only on access switches.
SW(config)# spanning-tree uplinkfast
Enable Backbone Fast. Where would this be configured?
Configure on all switches in the topology.
SW(config)# spanning-tree backbonefast
Enable Portfast (two methods)
From interface: SW(config-if)# spanning-tree portfast
From global config: SW(config)# spanning-tree portfast default
Disable portfast
SW(config-if)# spanning-tree portfast disable
SW(config)# spanning-tree portfast disable
Enable BDPU Filtering (two methods)
From interface with portfast enabled: SW(config-if)# spanning-tree bpdufilter enable
From global config: SW(config)# spanning-tree portfast bpdufilter [default]
Implement Root Guard
SW(config-if)# spanning-tree guard root
NOTE: This would be configured on a trunk link facing an edge (access) switch
Enable BDPU Guard (two methods)
SW(config)# spanning-tree portfast bpduguard [default]
SW(config-if)# spanning-tree bpduguard enable
Config Sample - Configure bpduguard and bpdufilter from global config mode
SW1(config)# spanning-tree portfast default
! Need to disable on any trunk links
SW1(config)# int range gi1/0, gi1/1
SW1(config-if-range)# spanning-tree portfast disable
SW1(config)# spanning-tree portfast bpdufilter default
SW1(config)# spanning-tree portfast bpduguard default
Config Sample - Configure bpduguard and bpdufilter from interface config mode
SW1(config)# int range Gi0/0 - 24
SW1(config-if-range)# spanning-tree portfast
SW1(config-if-range)# spanning-tree bpdufilter enable
SW1(config-if-range)# spanning-tree bpduguard enable
Enable Loop Guard (two methods)
SW1(config)# spanning-tree loopguard default
SW1(config-if)# spanning-tree guard loop
Enable UDLD (two methods)
Globally - only enables on SFP ports:
SW1(config)# udld enable [aggressive]
On interface:
SW1(config-if)# udld port [aggressive]
NOTE: this needs to be configured on both sides of the link.
Disable UDLD on a port
SW1(config-if)# udld port disable
Display udlp information (3 commands)
SW1# show udld
SW1# show udld neighbors
SW1# show udld {interface-id}
Enable Rapid Spanning Tree
SW(config)# spanning-tree mode rapid-pvst
Enable Multiple Spanning Tree
SW(config)# spanning-tree mode mst
Define the name and version for MST on a switch (3 commands)
SW(config)# spanning-tree mst configuration
SW(config-mst)# name NAME
SW(config-mst)# revision {1 - 65535}
Define an instance of MST on a switch (2 commands)
SW(config)# spanning-tree mst configuration
SW(config-mst)# instance {number} vlan {vlan-id}, {vlan-id}
Alter an MST instance to become the root bridge (2 methods)
Method 1 - using root command:
SW1(config)# spanning-tree mst 5 root [primary | secondary]
Method 2 - using priority command:
SW1(config)# spanning-tree mst 5 priority {value}
Create an LACP EtherChannel (2 commands)
SW1(config)# int range gi0/0-1
SW1(config-if-range)# channel-group mode {active | passive}
Create a PAgP EtherChannel (2 commands)
SW1(config)# int range gi0/0-1
SW1(config-if-range)# channel-group mode {auto | desirable}