NET-126 Configuration commands for Cisco switches
|
Command
|
Function
|
switchport mode access |
port must be in access mode before port-security can be configured
|
switchport port-security |
enables port security on that interface
|
switchport port-security maximum 2 |
sets maximum MAC addresses to 2
|
switchport port-security violation shutdown |
sets violation mode to shutdown
(shutdown is default) |
switchport port-security mac-address |
specified MAC is made sticky
|
switchport port-security mac-address sticky |
converts all dynamically-learned MACs to sticky
|
|
Short Command
|
Full Command
|
sw m t |
switchport mode trunking |
sw t n v 99 |
switchport trunking native |
sw t a v 2,10,99 |
switchport trunking access |
sw non |
switchport nonegotiate |
sw a v 10 |
switchport access vlan 10 |
|
Short Command
|
Full Command
|
What It Displays
|
sh port [int f0/5] |
show port-security |
secure MACs configured on all (or specified) interface/s
|
sh int f0/6 sw |
show int f0/6 |
port configuration (mode, trunking, VLANs, etc)
|
sh vl br |
show vlan brief |
VLAN numbers, names, status, & ports
|
sh vl na name |
show vlan name name |
VLAN number, status, & ports
|
sh vl sum |
show vlan summary |
number of existing VLANs
(Doesn't work on PT) |
sh int tru |
show int trunk |
trunk ports, native/mgmt VLANs, & allowed VLANs
|
show sdm pre |
sh sdm prefer |
max # of secure MACs that can be configured
|
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.