Trunking and DTP
by David Sudjiman ~ September 12th, 2008. Filed under: Cisco.The way L2 interface becomes trunk or non trunk depends whether we statically configure it or using DTP to dynamically decide. In real world most of people will use trunk or access combined with nonegotiate. However the options are always there. Here are simply the combinations we can have while creating the trunking. The easy way to understand it is to check whether the interface is sending DTP or not.
# switchport mode access
Puts the interface (access port) into permanent nontrunking mode and negotiates to convert the link into a nontrunk link. The interface becomes a nontrunk interface even if the neighboring interface is not a trunk interface.
# switchport mode access # switchport nonegotiate
Prevents the interface from generating DTP frames. You can use this command only when the interface switchport mode is access or trunk. You must manually configure the neighboring interface as a trunk interface to establish a trunk link.
# switchport mode trunk # switchport nonegotiate
Prevents the interface from generating DTP frames. You can use this command only when the interface switchport mode is access or trunk. You must manually configure the neighboring interface as a trunk interface to establish a trunk link.
Not sending DTP packets and puts the interface into permanent trunk mode no matter whether the neighboring will set to trunk or not.
# switchport mode trunk
Puts the interface into permanent trunking mode and negotiates to convert the link into a trunk link. The interface becomes a trunk interface even if the neighboring interface is not a trunk interface.
Sending DTP packets and puts the interface becomes a trunk interface even if the neighboring interface is not a trunk interface.
# switchport mode dynamic auto
Set the interface to a trunk link if the neighboring interface is set to trunk or desirable mode.
Not sending DTP and will only set the interface to trunk upon receiving DTP packets from its neighbor.
# switchport mode dynamic desirable
Set the interface to a trunk link if the neighboring interface is set to trunk, desirable, or auto mode.
Sending DTP and will only set the interface to trunk if neighboring interface will react to DTP packets and set the interface to trunk.
# switchport trunk encapsulation Dot1q
Specifies 802.1Q encapsulation on the trunk link.
# switchport trunk encapsulation isl
Specifies ISL encapsulation on the trunk link.
# switchport trunk encapsulation negotiate
Specifies that the interface negotiate with the neighboring interface to become an ISL (preferred) or 802.1Q trunk, depending on the configuration and capabilities of the neighboring interface.
And below is there default setting to L2 interface.
| Feature | Default Setting |
| Operating Mode | Layer 2 or switching mode (switchport command). |
| Allowed VLAN range | VLANs 1 - 4094. |
| Default VLAN (for access ports) | VLAN 1. |
| Native VLAN (for 802.1Q trunks) | VLAN 1. |
| VLAN trunking | Switchport mode dynamic desirable (supports DTP). |
| Port enable state | All ports are enabled. |
| Port description | None defined. |
| Speed | Autonegotiate. |
| Duplex mode | Autonegotiate. |
| Flow control | Flow control is set to off for receive and desired for send for Gigabit Ethernet ports. For 10/100 Mb/s ports, send is always off. |
| EtherChannel (PAgP) | Disabled on all Ethernet ports. |
| Port blocking (unknown multicast and unknown unicast traffic) | Disabled (not blocked). |
| Broadcast, multicast, and unicast storm control | Disabled. |
| Protected port | Disabled. |
| Port security | Disabled. |
| Port Fast | Disabled. |
Reference
Configuring Interface Characteristics