Command Switchport Port-Security Violation Use Sets the action that occurs to the switch port when a violation is triggered. The violation types are: Protect: Ignores all traffic on the interface Restrict: Ignores all traffic on the interface, but sends SNMP trap. Shutdown (default): Shuts the port down and does not allow …
Command Switchport Port-Security Mac-Address Use Sets the mac-address(es) that causes port-security violation. Syntax Switch(config-if)#switchport port-security mac-address <h.h.h.h> Or Switch(config-if)#switchport port-security mac-address sticky Use sticky in conjunction with switchport port-security maximum to have the switch learn which mac-addresses to allow. For example, if you set switchport port-security maximum 5, then the switch will learn and allow …
Command Switchport Trunk Allowed Vlan Use Restricts the VLANs that can travel between a trunk on the switch. Syntax Switch(config-if)#switchport trunk allowed vlan <vlan #> Example In this example, allowed VLAN is set for int fa0/19 on SW3. SW3(config)#int fa0/19 SW3(config-if)#switchport trunk allowed vlan 2 Here’s the trunk …
Command Switchport Trunk Encapsulation isl Use Enables ISL trunking encapsulation on the interface. Syntax Switch(config-if)#switchport trunk encapsulation isl Example In this example, isl trunk encapsulation is enabled SW3’s fa0/2. SW3(config)#int fa0/2 SW3(config-if)#switchport trunk encapsulation isl Next, the trunk information is displayed for SW3. SW3(config-if)#do show interface trunkPort Mode …
Command Switchport Nonegotiate Use Prevents the interface from auto-negotiating trunk status. Syntax Switch(config-if)#switchport nonegotiate Example This example shows how to set fa0/19 to nonegotiate on SW3. SW3#conf t SW3(config)#int fa0/19 SW3(config-if)#switchport nonegotiate
Command Spanning-Tree Guard Root Use This command will disable any port that a superior BPDU is received on. This is done to ensure a switch will remain root at all times. Syntax Switch(config-if)#spanning-tree guard root Example In the below example we will configure SW1’s trunk ports to use …
Command Switchport Port-Security Maximum Use Sets the maximum number of mac addresses before a violation is triggered. Syntax Switch(config-if)#switchport port-security maximum <1-6272> Example In this example, the maximum mac addresses for int fa0/2 is set to 2 for SW3. SW3#conf t SW3(config-if)#int fa0/2 SW3(config-if)#switchport port-security maximum 2 Next, 2 …
Command Switchport Port-Security Use Enables port security on an interface and sets default actions. The defaults are: max mac address is 1 and the violate action is shutdown the port. Syntax Switch(config-if)#switchport port-security Example In this example, port security is configured for int fa0/2 on SW3. Note that, …
Command Spanning-Tree Port-Priority Use Sets the switches preference for the alternate paths to use if a loop is detected. Syntax Switch(config)#spanning-tree port-priority <number> Example In the below example we will configure SW2 to prefer to use Fa0/24 if a loop is detected in the network. SW2(config)#do show spanning vlan …
Command Switchport Trunk Encapsulation dot1q Use Enables dot1q trunking encapsulation on the interface. Syntax Switch(config-if)#switchport trunk encapsulation dot1q Example First, here is the trunking information for SW3. Note fa0/19, which is set to ISL. SW3(config-if)#do show int trunkPort Mode Encapsulation Status Native vlan Fa0/19 auto isl trunking 1 …