Layer 2 Dynamic Switchports

Expand all



Contents

Layer 2 Dynamic Switchports

Last updated: July 7, 2014

A Note On Section Initial Configuration Files: You must load the initial configuration files for the section, named Basic Layer2 Switching, which can be found in CCIE R&S v5 Topology Diagrams & Initial Configurations. Reference the Virtual Routers & Physical Switches Diagram to complete this task.

Task

  • Configure all inter-switch links on SW2, SW3, and SW4 to be in dynamic auto state.
  • Configure all inter-switch links on SW1 to be in dynamic desirable state.
  • For verification, ensure that:
    • SW1 Ethernet links to SW2, SW3, and SW4 are negotiated as trunks.
    • Ethernet links between SW2, SW3, and SW4 do not negotiate trunking and fallback to access mode.

Configuration

SW1:
interface range FastEthernet0/19 - 24
 switchport mode dynamic desirable

SW2:
interface range FastEthernet0/19 - 24
 switchport mode dynamic auto  

SW3:
interface range FastEthernet0/19 - 24
 switchport mode dynamic auto   

SW4:
interface range FastEthernet0/19 - 24
 switchport mode dynamic auto

Verification

With SW1’s inter-switch links configured in dynamic desirable state, and all other inter-switch links configured in dynamic auto state, trunks will only be negotiated between SW1 to SW2, SW1 to SW3, and SW1 to SW4. This is because SW1 initiates trunking negotiation through DTP (desirable), and SW2, SW3, and SW4 only respond to DTP negotiation requests (auto). This can be verified as shown below, note that the output may differ for the "Vlans in spanning tree forwarding state and not pruned" based on which of the switches is the STP root bridge for VLAN 1.

SW1#show interface trunk 

Port        Mode             Encapsulation  Status        Native vlan
Fa0/19      desirable        n-isl          trunking      1
Fa0/20      desirable        n-isl          trunking      1
Fa0/21      desirable        n-isl          trunking      1
Fa0/22      desirable        n-isl          trunking      1
Fa0/23      desirable        n-isl          trunking      1
Fa0/24      desirable        n-isl          trunking      1

Port        Vlans allowed on trunk
Fa0/19      1-4094
Fa0/20      1-4094
Fa0/21      1-4094
Fa0/22      1-4094
Fa0/23      1-4094
Fa0/24      1-4094

Port        Vlans allowed and active in management domain
Fa0/19      1
Fa0/20      1
Fa0/21      1
Fa0/22      1
Fa0/23      1
Fa0/24      1

Port        Vlans in spanning tree forwarding state and not pruned
Fa0/19      1
Fa0/20      1
Fa0/21      1
Fa0/22      1
Fa0/23      1
Fa0/24      1

The output on SW3 is the same as on SW2 and SW4. None of these switches are trunking directly with each other, only with SW1.

SW3#show interfaces trunk 

Port        Mode             Encapsulation  Status        Native vlan
Fa0/19      auto             n-isl          trunking      1
Fa0/20      auto             n-isl          trunking      1

Port        Vlans allowed on trunk
Fa0/19      1-4094
Fa0/20      1-4094

Port        Vlans allowed and active in management domain
Fa0/19      1
Fa0/20      1

Port        Vlans in spanning tree forwarding state and not pruned
Fa0/19      1
Fa0/20      none

As seen from above outputs, by default switches will also negotiate ISL instead of 802.1q as the trunking protocol. Verify the DTP port state of "dynamic desirable" and "dynamic auto"; also note the difference between "Administrative Mode," which defines how the port was configured to operate, and "Operational Mode," which defines how the port actually operates after DTP negotiation.

SW3#show interfaces fastEthernet0/19 switchport
Name: Fa0/19
Switchport: Enabled
Administrative Mode: dynamic auto
Operational Mode: trunk
Administrative Trunking Encapsulation: negotiate
Operational Trunking Encapsulation: isl
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
!
!
SW3#show interfaces fastEthernet0/21 switchport
Name: Fa0/21
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
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none
!
!
SW1#show interfaces fastEthernet0/19 switchport
Name: Fa0/19
Switchport: Enabled
Administrative Mode: dynamic desirable
Operational Mode: trunk
Administrative Trunking Encapsulation: negotiate
Operational Trunking Encapsulation: isl
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
^ back to top