Category: CCNA Study Guide

Switchport Port-Security Command on CISCO Router/Switch

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, …

Spanning-Tree Port-Priority Command on CISCO Router/Switch

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 …

Switchport Trunk Encapsulation dot1q Command on CISCO Router/Switch

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 …

Switchport Mode Trunk Command on CISCO Router/Switch

Command Switchport Mode Trunk Use Enables trunking on an interface. Before enabling trunking, encapsulation needs to be set using the switchport trunk encapsulation command. Syntax Switch(config-if)#switchport mode trunk Example In this example, trunking is enabled on fa0/2. Before enabling trunking, encapsulation is also set. SW3#conf t Enter configuration commands, one …

Spanning-Tree Portfast Command on CISCO Router/Switch

Command Spanning-Tree Portfast Use This command essentially disables spanning-tree on an interface and brings it immediately into the forwarding state. Only use this command on access ports Syntax Switch(config-if)#spanning-tree portfast Example In the below example we will configure SW1’s Fa0/2 to use port-fast to immediately skip to the …

Spanning-Tree Cost Command on CISCO Router/Switch

Command Spanning-Tree Cost Use This command modifies the interface cost used in calculating the root port for spanning-tree on a switch. Lower is better. Syntax Switch(config-if)#spanning-tree cost <cost> Example In the below example we will configure SW2 to use Fa0/24 as the root port for all VLANs. SW2(config)#do …

Switchport Trunk Native Vlan Command on CISCO Router/Switch

Command Switchport Trunk Native Vlan Use Changes the native VLAN for dot1q encapsulation. Syntax Switch(config-if)#switchport trunk native vlan <vlan #> Example In this example, the native VLAN for int fa0/2 is changed. SW#conf t SW#int fa0/2 SW3(config-if)#switchport trunk native vlan 55 Here’s the trunking information for SW3. SW3(config-if)#do show …

Spanning-Tree Vlan Cost Command on CISCO Router/Switch

Command Spanning-Tree Vlan Cost Use This command modifies the interface cost used in calculating the root port for spanning-tree on a switch for a specified vlan range. Lower is better. Syntax Switch(config-if)#spanning-tree vlan <vlan range> cost <cost> Example In the below example we will configure SW2 to use …