Chapter 2: VLAN Trunk Configuration & Dynamic Trunking Protocol (DTP) Part One (Preview)

On a cisco switch to enable trunkin we can configure the following two parameters.

  1. The type of encapsulation to use over the link: IEEE 802.1Q, ISL, or negotiate which one to use
  2. The administrative mode: always trunk, always not trunk, or negotiate

Dynamic Trunking Protocol (DTP)

Dynamic Trunking Protocol (DTP) is a point-to-point protocol that dynamically negotiates the forming of a trunk link on Cisco devices. DTP operates on a per port basis.

Types of Encapsulation

Cisco switches that supports ISL and 802.1Q can use DTP to negotiate which type of trunkin encapsulation to use.

If both switches support ISL and 802.1Q then they will use ISL (Preferred); otherwise, they will use the encapsulation mechanism that both of them supports.

Following interface subcommand is used by switches that support both the ISL and 802.1Q encapsulation to predefine the configuration or to let DTP negotiate the type of trunkin encapsulation.

config-if)# switchport trunk encapsulation {dot1q | isl | negotiate}

 

SW-3750#conf t 
Enter configuration commands, one per line.  End with CNTL/Z.
SW-3750(config)#int fa1/0/21
SW-3750(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 interface

Example Ethernet trunk encapsulation types

 

Administrative Mode

Administrative mode refers to the configuration setting on the interface.

Operational Mode

The operational mode refers to the what is the real-time status of the interface.

 

The Layer 2 interface administrative modes

Secondly, depending on the switch port’s administrative mode DTP can decide whether two devices on the link agree to trunk or not.

 

  • switchport mode access: This mode changes the interface to permanently nontrunking mode.
  • switchport mode dynamic auto: Passively wait to receive DTP messages to dynamically choose whether to become a trunk or not. The interface becomes a trunk interface if the neighbouring interface is set to trunk or desirable mode. This is the default switchport mode for all Ethernet interfaces is dynamic auto.
  • switchport mode dynamic desirable: Actively negotiates to become a trunk link by generating DTP messages. The interface becomes a trunk interface if the neighbouring interface is set to trunk, desirable, or auto mode.
  • switchport mode trunk: Becomes a permanent trunk link and negotiates to convert the neighbour interface to become a trunk.
  • switchport nonegotiate:  Prevents the generation of DTP messages. You can use this command only when the interface switchport mode is access or trunk. You must manually configure the neighbouring interface as a trunk interface to establish a trunk link.

 

The administrative mode of the interface is configured using the following command

switchport mode {access | dynamic {auto | desirable} | trunk}

SW-3750(config-if)#switchport mode ?              
  access        Set trunking mode to ACCESS unconditionally
  dynamic       Set trunking mode to dynamically negotiate access or trunk mode
  trunk         Set trunking mode to TRUNK unconditionally

Example Configuration options to define the DTP administrative mode

SW-3750 (config-if)#switchport mode dynamic ?
  auto       Set trunking mode dynamic negotiation parameter to AUTO
  desirable  Set trunking mode dynamic negotiation parameter to DESIRABLE

Example Configuration options to define switchport mode dynamic

Figure The result of  various Trunking Administrative Mode combinations

 

 

Let’s examine how we can configure a trunk link between two Cisco 2960 switches. In the diagram below you can see  FastEthernet0/1 of WS-2960A switch is connected to the FastEthernet0/2 of WS-25960B. This is going to be our trunk link.

 

trunk-configuration-network-diagram

 

The default configuration

First of all, let’s look at the out of the box configuration.

We can see looking at the show vlan command output Fa0/1 of WS-2960A and Fa0/2 of WS-2960B are in default VLAN 1.

 

WS-2960A#show vlan

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4
                                                Fa0/5, Fa0/6, Fa0/7, Fa0/8
                                                Fa0/9, Fa0/10, Fa0/11, Fa0/12
                                                Fa0/13, Fa0/14, Fa0/15, Fa0/16
                                                Fa0/17, Fa0/18, Fa0/19, Fa0/20
                                                Fa0/21, Fa0/22, Fa0/23, Fa0/24
                                                Gi0/1, Gi0/2
1002 fddi-default                     act/unsup 
1003 token-ring-default               act/unsup 
1004 fddinet-default                  act/unsup 
1005 trnet-default                    act/unsup 

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        0      0   
1002 fddi  101002     1500  -      -      -        -    -        0      0   
1003 tr    101003     1500  -      -      -        -    -        0      0   
1004 fdnet 101004     1500  -      -      -        ieee -        0      0   
1005 trnet 101005     1500  -      -      -        ibm  -        0      0   

Remote SPAN VLANs
------------------------------------------------------------------------------


Primary Secondary Type              Ports
------- --------- ----------------- ------------------------------------------

Example show vlan command output on Cisco Catalyst WS-2960A switch

WS-2960B#show vlan

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4
                                                Fa0/5, Fa0/6, Fa0/7, Fa0/8
                                                Fa0/9, Fa0/10, Fa0/11, Fa0/12
                                                Fa0/13, Fa0/14, Fa0/15, Fa0/16
                                                Fa0/17, Fa0/18, Fa0/19, Fa0/20
                                                Fa0/21, Fa0/22, Fa0/23, Fa0/24
                                                Gi0/1, Gi0/2
1002 fddi-default                     act/unsup 
1003 token-ring-default               act/unsup 
1004 fddinet-default                  act/unsup 
1005 trnet-default                    act/unsup 

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        0      0   
1002 fddi  101002     1500  -      -      -        -    -        0      0   
1003 tr    101003     1500  -      -      -        -    -        0      0   
1004 fdnet 101004     1500  -      -      -        ieee -        0      0   
1005 trnet 101005     1500  -      -      -        ibm  -        0      0   

Remote SPAN VLANs
------------------------------------------------------------------------------


Primary Secondary Type              Ports
------- --------- ----------------- ------------------------------------------

Example show vlan command output on Cisco Catalyst WS-2960B switch

Secondly, we can see by issuing the show interfaces id switchport command on both the switches:

  1. The administrative mode of the interface is dynamic auto on both switches which tells the interfaces to passively wait for someone else to send DTP messages.
  2. The current operational mode of the switch is static access mode
  3. Administrative trunkin protocol type is 802.1Q which is the only supported trunking type on Cisco 2960 switches. If these were switches that supported both ISL and 802.1Q then the switches would negotiate which protocol to use.
  4. Operational Trunking Encapsulation is set to native which is a reference to the 802.1Q native VLAN.

 

WS-2960A#show interfaces fastEthernet 0/1 switchport 
Name: Fa0/1
Switchport: Enabled
Administrative Mode: dynamic auto
Operational Mode: static access
Administrative Trunking Encapsulation: dot1q
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
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none

Example show interfaces fastEthernet 0/1 switchport command output on Cisco Catalyst WS-2960A switch

 

WS-2960B#show interfaces fastEthernet 0/2 switchport 
Name: Fa0/2
Switchport: Enabled
Administrative Mode: dynamic auto
Operational Mode: static access
Administrative Trunking Encapsulation: dot1q
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
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none

Example show interfaces fastEthernet 0/1 switchport command output on Cisco Catalyst WS-2960B switch

 

Thirdly let’s look at the output of the show interface trunk command. This command lists all interfaces that are currently operationally trunking.

Note there is nothing to examine. That is because there are no trunk links on these two switches. This confirms when two interfaces are administratively set to dynamic auto a trunk link will not form and the interfaces are in access mode.

 

WS-2960A#show interfaces trunk 
WS-2960A#

Example show interfaces trunk command output on Cisco Catalyst WS-2960A switch

 

WS-2960B#show interfaces trunk 
WS-2960B#

Example show interfaces trunk command output on Cisco Catalyst WS-2960B switch

 

In the next lesson let’s see what happens when one of the links is set to dynamic desirable?

 

Back to: CCNA Routing and Switching 200-125 > Ethernet LAN Switching