Content

| 2.5 |  | VLAN Trunking and Dynamic Trunking Protocol (DTP) |
| 2.5.5 |  | DTP trunk and access modes |

Using the switchport mode interface command, two of the DTP modes set trunking to “off” or “on”.

Access mode
For example, SwitchA and SwitchB are connected on their FastEthernet 0/1 interfaces. If both switches are set to access mode, then the link is a non-trunking link. Both interfaces must be on the same VLAN and only that single VLAN is transmitted across the link.

> SwitchA(config)#inter fa 0/1
> SwitchA(config-if)#switchport mode access

> SwitchB(config)#inter fa 0/1
> SwitchB(config-if)#switchport mode access

Trunk mode
If both switches are set to trunk mode, then the link is a trunking link. By default, all VLANs will be transmitted across this trunk.

> SwitchA(config)#inter fa 0/1
> SwitchA(config-if)#switchport mode trunk

> SwitchB(config)#inter fa 0/1
> SwitchB(config-if)#switchport mode trunk

> Note: Switches such as the Catalyst 3550 that are capable of either 802.1Q or ISL trunking encapsulation, the switchport trunk encapsulation [dot1q | isl | negotiate] interface command must be used prior to the switchport mode trunk command.