Cisco Command Christmas Calendar #13: show interfaces switchport

Going strong on the show interface theme for three days in a row now, today we'll look at the show interfaces switchport command. This command displays the administrative and operational status of the interface. Example:

SW1#show interfaces gi1/1 switchport
Name: Gi1/1
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Appliance trust: none

This command gives a lot of useful information. From the above output, you can tell that Gi1/1 was configured in trunk mode and to use 802.1Q encapsulation. The native VLAN is VLAN 1 and trunking is enabled for all VLANs. Next example:

SW1#show interfaces gi1/2 switchport
Name: Gi1/2
Switchport: Enabled
Administrative Mode: dynamic auto
Operational Mode: static access
Administrative Trunking Encapsulation: negotiate
Operational Trunking Encapsulation: native
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Appliance trust: none

The G1/2 interface was configured in dynamic auto mode but it didn't manage to negotiate a trunk so it is operating in static access mode in VLAN 1 (default).

Note that this command works only for switched (not routed) ports.

SW1#show interfaces gi1/3 switchport
Name: Gi1/3
Switchport: Disabled


Cisco documentation: show interface switchport


Comments