3.5.5 Packet Tracer - Configure DTP (Instructions Answer)

3.5.5 Packet Tracer - Configure DTP (Instructor Version)

Addressing Table

Device Interface IP Address Subnet Mask
PC1 NIC 192.168.10.1 255.255.255.0
PC2 NIC 192.168.20.1 255.255.255.0
PC3 NIC 192.168.30.1 255.255.255.0
PC4 NIC 192.168.30.2 255.255.255.0
PC5 NIC 192.168.20.2 255.255.255.0
PC6 NIC 192.168.10.2 255.255.255.0
S1 VLAN 99 192.168.99.1 255.255.255.0
S2 VLAN 99 192.168.99.2 255.255.255.0
S3 VLAN 99 192.168.99.3 255.255.255.0

Objectives

  • Configure static trunking
  • Configure and Verify DTP

Background / Scenario

As the number of switches in a network increases, the administration necessary to manage the VLANs and trunks can be challenging. To ease some of the VLAN and trunking configurations, trunk negotiation between network devices is managed by the Dynamic Trunking Protocol (DTP), and is automatically enabled on Catalyst 2960 and Catalyst 3650 switches.

In this activity, you will configure trunk links between the switches. You will assign ports to VLANs and verify end-to-end connectivity between hosts in the same VLAN. You will configure trunk links between the switches, and you will configure VLAN 999 as the native VLAN.

Instructions

Part 1: Verify VLAN configuration.

Verify the configured VLANs on the switches.

a. On S1, go to privileged EXEC mode and enter the show vlan brief command to verify the VLANs that are present.

S1# show vlan brief
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
                                                Gig0/1, Gig0/2
99   Management                       active
999  Native                           active
1002 fddi-default                     active
1003 token-ring-default               active
1004 fddinet-default                  active
1005 trnet-default                    active

b. Repeat Step 1a on S2 and S3.

What VLANs are configured on the switches?
VLANs 99 and 999 are configured on all the switches.

Part 2: Create additional VLANs on S2 and S3.

a. On S2, create VLAN 10 and name it Red.

S2(config)# vlan 10
S2(config-vlan)# name Red

b. Create VLANs 20 and 30 according to the table below.

VLAN Number VLAN Name
10 Red
20 Blue
30 Yellow
S2(config-vlan)#vlan 20
S2(config-vlan)#name Blue
S2(config-vlan)#vlan 30
S2(config-vlan)#name Yellow

c. Verify the addition of the new VLANs. Enter show vlan brief at the privileged EXEC mode.

S2#show vlan brief

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
                                                Gig0/1, Gig0/2
10   Red                              active    
20   Blue                             active    
30   Yellow                           active    
99   Management                       active    
999  Native                           active    
1002 fddi-default                     active    
1003 token-ring-default               active    
1004 fddinet-default                  active    
1005 trnet-default                    active

In addition to the default VLANs, which VLANs are configured on S2?
VLAN 10 (Red), VLAN 20 (Blue), VLAN 30 (Yellow), VLAN 99 (Management) and VLAN 999 (Native)
d. Repeat the previous steps to create the additional VLANs on S3.

S3(config)#vlan 10
S3(config-vlan)#name Red
S3(config-vlan)#vlan 20
S3(config-vlan)#name Blue
S3(config-vlan)#vlan 30
S3(config-vlan)#name Yellow

Part 3: Assign VLANs to Ports

Use the switchport mode access command to set access mode for the access links. Use the switchport access vlan vlan-id command to assign a VLAN to an access port.

Ports Assignments Network
S2 F0/1 – 8
S3 F0/1 – 8
VLAN 10 (Red) 192.168.10.0 /24
S2 F0/9 – 16
S3 F0/9 – 16
VLAN 20 (Blue) 192.168.20.0 /24
S2 F0/17 – 24
S3 F0/17 – 24
VLAN 30 (Yellow) 192.168.30.0 /24

a. Assign VLANs to ports on S2 using assignments from the table above.

S2(config-if)# interface range f0/1 - 8
S2(config-if-range)# switchport mode access
S2(config-if-range)# switchport access vlan 10
S2(config-if-range)# interface range f0/9 -16
S2(config-if-range)# switchport mode access
S2(config-if-range)# switchport access vlan 20
S2(config-if-range)# interface range f0/17 - 24
S2(config-if-range)# switchport mode access
S2(config-if-range)# switchport access vlan 30

b. Assign VLANs to ports on S3 using the assignments from the table above.

S3(config)#interface range f0/1-8
S3(config-if-range)#switchport mode access
S3(config-if-range)#switchport access vlan 10
S3(config-if-range)#interface range f0/9-16
S3(config-if-range)#switchport mode access
S3(config-if-range)#switchport access vlan 20
S3(config-if-range)#interface range f0/17-24
S3(config-if-range)#switchport mode access	
S3(config-if-range)#switchport access vlan 30

Now that you have the ports assigned to VLANs, try to ping from PC1 to PC6.

Was the ping successful? Explain.

No, the pings failed because the ports between the switches are in VLAN 1 and PC1 and PC6 are in VLAN 10.

Part 4: Configure Trunks on S1, S2, and S3.

Dynamic trunking protocol (DTP) manages the trunk links between Cisco switches. Currently, all the switchports are in the default trunking mode, which is dynamic auto. In this step, you will change the trunking mode to dynamic desirable for the link between switches S1 and S2. The link between switches S1 and S3 will be set as a static trunk. Use VLAN 999 as the native VLAN in this topology.

a. On switch S1, configure the trunk link to dynamic desirable on the GigabitEthernet 0/1 interface. The configuration of S1 is shown below.

S1(config)# interface g0/1
S1(config-if)# switchport mode dynamic desirable

What will be the result of trunk negotiation between S1 and S2?

Trunk link has been established between S1 and S2

b. On switch S2, verify that the trunk has been negotiated by entering the show interfaces trunk command. Interface GigabitEthernet 0/1 should appear in the output.

S2>enable 
S2#show interface trunk
Port        Mode         Encapsulation  Status        Native vlan
Gig0/1      auto         n-802.1q       trunking      1

Port        Vlans allowed on trunk
Gig0/1      1-1005

Port        Vlans allowed and active in management domain
Gig0/1      1,10,20,30,99,999

Port        Vlans in spanning tree forwarding state and not pruned
Gig0/1      1,10,20,30,99,999

What is the mode and status for this port?

Mode: Auto | Status: trunking

c. For the trunk link between S1 and S3, configure interface GigabitEthernet 0/2 as a static trunk link on S1.

In addition, disable DTP negotiation on interface G0/2 on S1.

S1(config)# interface g0/2
S1(config-if)# switchport mode trunk
S1(config-if)# switchport nonegotiate

d. Use the show dtp command to verify the status of DTP.

S1# show dtp
Global DTP information
    Sending DTP Hello packets every 30 seconds
    Dynamic Trunk timeout is 300 seconds
    1 interfaces using DTP

e. Verify trunking is enabled on all the switches using the show interfaces trunk command.

S1# show interfaces trunk
Port       Mode        Encapsulation   Status        Native vlan
Gig0/1     desirable   n-802.1q        trunking      1
Gig0/2     on          802.1q          trunking      1

Port       Vlans allowed on trunk
Gig0/1     1-1005
Gig0/2     1-1005

Port       Vlans allowed and active in management domain
Gig0/1     1,99,999
Gig0/2     1,99,999

Port       Vlans in spanning tree forwarding state and not pruned
Gig0/1     1,99,999
Gig0/2     1,99,999

What is the native VLAN for these trunks currently?
VLAN 1
f. Configure VLAN 999 as the native VLAN for the trunk links on S1.

S1(config)# interface range g0/1 - 2
S1(config-if-range)# switchport trunk native vlan 999

What messages did you receive on S1? How would you correct it?

To correct native VLAN mismatch, configure VLAN 999 as the native VLAN on S2 and S3.

g. On S2 and S3, configure VLAN 999 as the native VLAN.

S2(config)#interface g0/1
S2(config-if)#switchport mode dynamic auto
S2(config-if)#switchport trunk native vlan 999

S3(config)#interface g0/2
S3(config-if)#switchport mode trunk
S3(config-if)#switchport trunk native vlan 999

h. Verify trunking is successfully configured on all the switches. You should be able ping one switch from another switch in the topology using the IP addresses configured on the SVI.

S1#ping 192.168.99.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.99.2, timeout is 2 seconds:
..!!!
Success rate is 60 percent (3/5), round-trip min/avg/max = 0/0/0 ms

S1#ping 192.168.99.3

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.99.3, timeout is 2 seconds:
..!!!
Success rate is 60 percent (3/5), round-trip min/avg/max = 0/0/0 ms

S1#

i. Attempt to ping from PC1 to PC6.

Why was the ping unsuccessful? (Hint: Look at the ‘show vlan brief’ output from all three switches. Compare the outputs from the ‘show interface trunk’ on all switches.)

S1#show vlan brief

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
99   Management                       active    
999  Native                           active    
1002 fddi-default                     active    
1003 token-ring-default               active    
1004 fddinet-default                  active    
1005 trnet-default                    active    
S1#show int trun
Port        Mode         Encapsulation  Status        Native vlan
Gig0/1      desirable    n-802.1q       trunking      999
Gig0/2      on           802.1q         trunking      999

Port        Vlans allowed on trunk
Gig0/1      1-1005
Gig0/2      1-1005

Port        Vlans allowed and active in management domain
Gig0/1      1,99,999
Gig0/2      1,99,999

Port        Vlans in spanning tree forwarding state and not pruned
Gig0/1      1,99,999
Gig0/2      1,99,999

The ping was unsuccessful because the VLAN on S1 was not set up correctly.

j. Correct the configuration as necessary.

S1(config)#vlan 10
S1(config-vlan)#name Red
S1(config-vlan)#vlan 20
S1(config-vlan)#name Blue
S1(config-vlan)#vlan 30
S1(config-vlan)#name Yellow

Try Ping again from PC1 to PC6 --> successful

Part 5: Reconfigure trunk on S3.

a. Issue the ‘show interface trunk’ command on S3.

What is the mode and encapsulation on G0/2?

Mode: on | Encapsulation: 802.1q

b. Configure G0/2 to match G0/2 on S1.

S3(config)#interface g0/2
S3(config-if)#switchport nonegotiate

What is the mode and encapsulation on G0/2 after the change?

Mode: on | Encapsulation: 802.1q

c. Issue the command ‘show interface G0/2 switchport’ on switch S3.

S3#show interfaces g0/2 switchport 
Name: Gig0/2
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: Off
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 999 (Native)
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 encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: 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

What is the ‘Negotiation of Trunking’ state displayed?
Off

Part 6: Verify end to end connectivity.

a. From PC1 ping PC6. --> successful
b. From PC2 ping PC5. --> successful
c. From PC3 ping PC4. --> successful

Full Script

Switch S1
! ==============================================================
!--- 3.5.5 Packet Tracer - Configure DTP
!--- ANSWER SCRIPT FOR SWITCH S1
!--- Usage: from the console (or a Telnet/SSH session, if already reachable) on S1, enter privileged EXEC mode with "enable", then paste this whole file. Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.
!--- S1 is the core switch, uplinked to S2 (G0/1) and S3 (G0/2). VLANs 99 (Management) and 999 (Native) already exist on all three switches before this activity - no need to create them here. This script adds VLANs 10/20/30 to S1 (matching S2/S3), negotiates a DTP trunk to S2, hard-sets a static trunk to S3, and sets VLAN 999 as the native VLAN on both links.
! ==============================================================

enable
configure terminal

! --------------------------------------------------------------
!--- Part 4, Step 10: Correct the configuration - add VLANs 10/20/30 to S1
! --------------------------------------------------------------

!--- These three VLANs exist on S2 and S3 from Part 2, but were never created on S1 - that gap is exactly what Part 4 Step 9's failed PC1-to-PC6 ping exposes. Creating them here, with the same names, is the fix.
vlan 10
 name Red
vlan 20
 name Blue
vlan 30
 name Yellow

! --------------------------------------------------------------
!--- Part 4, Step 1: Configure the trunk to S2 as dynamic desirable
! --------------------------------------------------------------

!--- S2's G0/1 stays at its factory-default "dynamic auto" mode (never explicitly configured), so S1 has to be the side that actively negotiates the trunk. Native VLAN 999 is applied directly here - if S2/S3 haven't been updated yet you will see transient "%CDP-4-NATIVE_VLAN_MISMATCH" messages until Part 4 Step 7 sets VLAN 999 as native on S2 and S3 too.
interface GigabitEthernet0/1
 switchport mode dynamic desirable
 switchport trunk native vlan 999

! --------------------------------------------------------------
!--- Part 4, Step 3: Configure the trunk to S3 as a static trunk, DTP disabled
! --------------------------------------------------------------

!--- Static trunk mode plus "nonegotiate" means S1 neither sends nor listens for DTP frames on this link - this is exactly why S3's default "dynamic auto" G0/2 will NOT automatically become a trunk later (Part 5 has to fix that manually on S3's side).
interface GigabitEthernet0/2
 switchport mode trunk
 switchport trunk native vlan 999
 switchport nonegotiate

end

! --------------------------------------------------------------
!--- Operational habit (not explicitly required by this lab): save to NVRAM. (Press Enter when prompted for the destination filename.)
! --------------------------------------------------------------
copy running-config startup-config

! ==============================================================
!--- Verification (Parts 1, 4-6, from S1 and its neighbors):
!---   S1# show vlan brief          -> VLANs 10/20/30/99/999 all present (99/999 were already there)
!---   S1# show dtp                 -> DTP active, 1 interface using DTP (the nonegotiate side doesn't count)
!---   S1# show interfaces trunk    -> Gig0/1 desirable/trunking, Gig0/2 on/trunking, both native VLAN 999
!---   S1# ping 192.168.99.2        -> success once S2's config is also in place
!---   S1# ping 192.168.99.3        -> success once S3's config (incl. Part 5) is also in place
!---   From PC1, ping PC6 (VLAN 10) -> success once S1/S2/S3 are all fully configured
!---   From PC2, ping PC5 (VLAN 20) -> success once S1/S2/S3 are all fully configured
!---   From PC3, ping PC4 (VLAN 30) -> success once S1/S2/S3 are all fully configured
! ==============================================================

Switch S2
! ==============================================================
!--- 3.5.5 Packet Tracer - Configure DTP
!--- ANSWER SCRIPT FOR SWITCH S2
!--- Usage: from the console (or a Telnet/SSH session, if already reachable) on S2, enter privileged EXEC mode with "enable", then paste this whole file. Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.
!--- S2 is an access switch connecting PC1/PC2/PC3, uplinked to S1 over G0/1. VLANs 99 (Management) and 999 (Native) already exist. This script adds VLANs 10/20/30, assigns the access ports, and sets up the trunk to S1 - left in its default DTP mode, but with the native VLAN corrected to 999.
! ==============================================================

enable
configure terminal

! --------------------------------------------------------------
!--- Part 2: Create additional VLANs on S2
! --------------------------------------------------------------

!--- Three new VLANs, on top of the 99/999 that already exist.
vlan 10
 name Red
vlan 20
 name Blue
vlan 30
 name Yellow

! --------------------------------------------------------------
!--- Part 3: Assign VLANs to Ports
! --------------------------------------------------------------

!--- Three port ranges, one per VLAN, per the Ports/Assignments table.
interface range FastEthernet0/1 - 8
 switchport mode access
 switchport access vlan 10

interface range FastEthernet0/9 - 16
 switchport mode access
 switchport access vlan 20

interface range FastEthernet0/17 - 24
 switchport mode access
 switchport access vlan 30

! --------------------------------------------------------------
!--- Part 4, Steps 2 & 7: Trunk to S1 (left at default DTP mode) + correct the native VLAN
! --------------------------------------------------------------

!--- G0/1 is deliberately left at its factory-default "dynamic auto" - S1 is the side configured to actively negotiate (Part 4 Step 1), so this port becomes a trunk automatically without ever being told "switchport mode trunk". Native VLAN 999 still has to be set explicitly here, or you'll see a "%CDP-4-NATIVE_VLAN_MISMATCH" against S1 (Part 4 Step 6).
interface GigabitEthernet0/1
 switchport mode dynamic auto
 switchport trunk native vlan 999

end

! --------------------------------------------------------------
!--- Operational habit (not explicitly required by this lab): save to NVRAM. (Press Enter when prompted for the destination filename.)
! --------------------------------------------------------------
copy running-config startup-config

! ==============================================================
!--- Verification (Parts 3-6, from S2 and its neighbors):
!---   S2# show vlan brief                -> VLAN 10 shows Fa0/1-8, VLAN 20 shows Fa0/9-16, VLAN 30 shows Fa0/17-24
!---   S2# show interfaces trunk          -> Gig0/1 auto/trunking, native VLAN 999
!---   S2# ping 192.168.99.1              -> success once S1's trunk config is also in place
!---   From PC1, ping PC6 (VLAN 10, on S3) -> success once S1 and S3 are also fully configured
!---   From PC2, ping PC5 (VLAN 20, on S3) -> success once S1 and S3 are also fully configured
! ==============================================================

Switch S3
! ==============================================================
!--- 3.5.5 Packet Tracer - Configure DTP
!--- ANSWER SCRIPT FOR SWITCH S3
!--- Usage: from the console (or a Telnet/SSH session, if already reachable) on S3, enter privileged EXEC mode with "enable", then paste this whole file. Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.
!--- S3 is an access switch connecting PC4/PC5/PC6, uplinked to S1 over G0/2. VLANs 99 (Management) and 999 (Native) already exist. This script adds VLANs 10/20/30, assigns the access ports, and matches S1's G0/2 exactly with a static trunk (DTP disabled) - required because S1's side never sends DTP frames.
! ==============================================================

enable
configure terminal

! --------------------------------------------------------------
!--- Part 2, Step 4: Create additional VLANs on S3 (repeat of S2's Step 1-2)
! --------------------------------------------------------------

vlan 10
 name Red
vlan 20
 name Blue
vlan 30
 name Yellow

! --------------------------------------------------------------
!--- Part 3, Step 2: Assign VLANs to Ports
! --------------------------------------------------------------

!--- Same three port ranges and VLANs as S2, per the Ports/Assignments table.
interface range FastEthernet0/1 - 8
 switchport mode access
 switchport access vlan 10

interface range FastEthernet0/9 - 16
 switchport mode access
 switchport access vlan 20

interface range FastEthernet0/17 - 24
 switchport mode access
 switchport access vlan 30

! --------------------------------------------------------------
!--- Part 4, Step 7 & Part 5, Step 2: Trunk to S1 - must match S1's G0/2 exactly
! --------------------------------------------------------------

!--- Left at the factory-default "dynamic auto", G0/2 would normally negotiate into a trunk on its own - but S1's G0/2 has "nonegotiate" set (Part 4 Step 3), so it never sends the DTP frames S3 is passively waiting for. G0/2 stays stuck in access mode until it's explicitly hard-set to match S1: static trunk, DTP off, native VLAN 999.
interface GigabitEthernet0/2
 switchport trunk native vlan 999
 switchport mode trunk
 switchport nonegotiate

end

! --------------------------------------------------------------
!--- Operational habit (not explicitly required by this lab): save to NVRAM. (Press Enter when prompted for the destination filename.)
! --------------------------------------------------------------
copy running-config startup-config

! ==============================================================
!--- Verification (Parts 3-6, from S3 and its neighbors):
!---   S3# show interfaces trunk           -> Gig0/2 on/trunking, native VLAN 999 (was access mode before this fix)
!---   S3# show interface G0/2 switchport  -> "Negotiation of Trunking: Off" (confirms nonegotiate applied)
!---   S3# ping 192.168.99.1               -> success once S1's trunk config is also in place
!---   From PC4, ping PC3 (VLAN 30, on S2) -> success once S1 and S2 are also fully configured
!---   From PC6, ping PC1 (VLAN 10, on S2) -> success once S1 and S2 are also fully configured
! ==============================================================

Download Packet Tracer (.pka) file:

Subscribe
Notify of
guest

3 Corrections & Clarifications