Thursday, April 21, 2011

'switchport trunk encapsulation' and 'switchport mode trunk' Configuration

Below shows the configuration sequence of VLAN trunking on a Fast Ethernet interface. The VLAN trunking encapsulation must be configured (with the switchport trunk encapsulation interface subcommand) prior to configuring a trunking interface with the switchport mode trunk interface subcommand.

Switch#sh run int fa0/1
Building configuration...

Current configuration : 68 bytes
interface FastEthernet0/1
 switchport mode dynamic desirable

Switch#sh int fa0/1 trunk

Port        Mode         Encapsulation  Status        Native vlan
Fa0/12      desirable    negotiate      other         1

Port        Vlans allowed on trunk
Fa0/12      none

Port        Vlans allowed and active in management domain
Fa0/12      none

Port        Vlans in spanning tree forwarding state and not pruned
Fa0/12      none
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#int fa0/1
Switch(config-if)#switchport mode trunk
Command rejected: An interface whose trunk encapsulation is "Auto" can not be configured to "trunk" mode.
Switch(config-if)#switchport trunk encapsulation ?
  dot1q      Interface uses only 802.1q trunking encapsulation when trunking
  isl        Interface uses only ISL trunking encapsulation when trunking
  negotiate  Device will negotiate trunking encapsulation with peer on

Switch(config-if)#switchport trunk encapsulation dot1q
Switch(config-if)#switchport mode trunk

1 comment:

  1. i love it when you continue helping the upcoming engineers