3.4.5 Packet Tracer - Configure Trunks (Instructions Answer)

3.4.5 Packet Tracer - Configure Trunks (Instructor Version)

Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only

Packet Tracer - Configure Trunks

3.4.5 Packet Tracer - Configure Trunks

Addressing Table

Device Interface IP Address Subnet Mask Switch Port VLAN
PC1 NIC 172.17.10.21 255.255.255.0 S2 F0/11 10
PC2 NIC 172.17.20.22 255.255.255.0 S2 F0/18 20
PC3 NIC 172.17.30.23 255.255.255.0 S2 F0/6 30
PC4 NIC 172.17.10.24 255.255.255.0 S3 F0/11 10
PC5 NIC 172.17.20.25 255.255.255.0 S3 F0/18 20
PC6 NIC 172.17.30.26 255.255.255.0 S3 F0/6 30

Objectives

  • Part 1: Verify VLANs
  • Part 2: Configure Trunks

Background

Trunks are required to pass VLAN information between switches. A port on a switch is either an access port or a trunk port. Access ports carry traffic from a specific VLAN assigned to the port. A trunk port by default is a member of all VLANs. Therefore, it carries traffic for all VLANs. This activity focuses on creating trunk ports and assigning them to a native VLAN other than the default.

Instructions

Part 1: Verify VLANs

Step 1: Display the current VLANs.

a. On S1, issue the command that will display all VLANs configured. There should be ten VLANs in total. Notice that all 26 access ports on the switch are assigned to VLAN 1.

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
10   Faculty/Staff                    active    
20   Students                         active    
30   Guest(Default)                   active    
88   Management                       active    
99   Native                           active    
1002 fddi-default                     active    
1003 token-ring-default               active    
1004 fddinet-default                  active    
1005 trnet-default                    active

b. On S2 and S3, display and verify that all the VLANs are configured and assigned to the correct switch ports according to the Addressing Table.

S2

S2#show vlan brief

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4
                                                Fa0/5, Fa0/7, Fa0/8, Fa0/9
                                                Fa0/10, Fa0/12, Fa0/13, Fa0/14
                                                Fa0/15, Fa0/16, Fa0/17, Fa0/19
                                                Fa0/20, Fa0/21, Fa0/22, Fa0/23
                                                Fa0/24, Gig0/1, Gig0/2
10   Faculty/Staff                    active    Fa0/11
20   Students                         active    Fa0/18
30   Guest(Default)                   active    Fa0/6
88   Management                       active    
99   Native                           active    
1002 fddi-default                     active    
1003 token-ring-default               active    
1004 fddinet-default                  active    
1005 trnet-default                    active

S3

S3#show vlan brief

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4
                                                Fa0/5, Fa0/7, Fa0/8, Fa0/9
                                                Fa0/10, Fa0/12, Fa0/13, Fa0/14
                                                Fa0/15, Fa0/16, Fa0/17, Fa0/19
                                                Fa0/20, Fa0/21, Fa0/22, Fa0/23
                                                Fa0/24, Gig0/1, Gig0/2
10   Faculty/Staff                    active    Fa0/11
20   Students                         active    Fa0/18
30   Guest(Default)                   active    Fa0/6
88   Management                       active    
99   Native                           active    
1002 fddi-default                     active    
1003 token-ring-default               active    
1004 fddinet-default                  active    
1005 trnet-default                    active

Step 2: Verify loss of connectivity between PCs on the same network.

Ping between hosts on the same the VLAN on the different switches. Although PC1 and PC4 are on the same network, they cannot ping one another. This is because the ports connecting the switches are assigned to VLAN 1 by default. In order to provide connectivity between the PCs on the same network and VLAN, trunks must be configured.

Part 2: Configure Trunks

Step 1: Configure trunking on S1 and use VLAN 99 as the native VLAN.

a. Configure G0/1 and G0/2 interfaces on S1 for trunking.

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

b. Configure VLAN 99 as the native VLAN for G0/1 and G0/2 interfaces on S1.

S1(config-if)# switchport trunk native vlan 99

The trunk port takes about a short time to become active due to Spanning Tree Protocol. Click Fast Forward Time to speed the process. After the ports become active, you will periodically receive the following syslog messages:

%CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on GigabitEthernet0/2 (99), with S3 GigabitEthernet0/2 (1).
%CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on GigabitEthernet0/1 (99), with S2 GigabitEthernet0/1 (1).

You configured VLAN 99 as the native VLAN on S1. However, S2 and S3 are using VLAN 1 as the default native VLAN as indicated by the syslog message.

Although you have a native VLAN mismatch, pings between PCs on the same VLAN are now successful.
Explain.
Pings are successful because trunking has been enabled on S1. Dynamic Trunking Protocol (DTP) has automatically negotiated the other side of the trunk links. In this case, S2 and S3 have now automatically configured the ports attached to S1 as trunking ports.

Step 2: Verify trunking is enabled on S2 and S3.

On S2 and S3, issue the show interface trunk command to confirm that DTP has successfully negotiated trunking with S1 on S2 and S3. The output also displays information about the trunk interfaces on S2 and S3.
You will learn more about DTP later in the course.

Which active VLANs are allowed to cross the trunk?
1,10,20,30,88,99

Step 3: Correct the native VLAN mismatch on S2 and S3.

a. Configure VLAN 99 as the native VLAN for the appropriate interfaces on S2 and S3.
S2

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

S3

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

b. Issue show interface trunk command to verify the correct native VLAN configuration.

Step 4: Verify configurations on S2 and S3.

a. Issue the show interface interface switchport command to verify that the native VLAN is now 99.

S2:

S2#show interface g0/1 switchport
Name: Gig0/1
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 99 (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

S3:

S3#show interface 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: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 99 (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


b. Use the show vlan command to display information regarding configured VLANs.

S2#show vlan

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4
                                                Fa0/5, Fa0/7, Fa0/8, Fa0/9
                                                Fa0/10, Fa0/12, Fa0/13, Fa0/14
                                                Fa0/15, Fa0/16, Fa0/17, Fa0/19
                                                Fa0/20, Fa0/21, Fa0/22, Fa0/23
                                                Fa0/24, Gig0/2
10   Faculty/Staff                    active    Fa0/11
20   Students                         active    Fa0/18
30   Guest(Default)                   active    Fa0/6
88   Management                       active    
99   Native                           active    
1002 fddi-default                     active    
1003 token-ring-default               active    
1004 fddinet-default                  active    
1005 trnet-default                    active    

S3#show vlan

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4
                                                Fa0/5, Fa0/7, Fa0/8, Fa0/9
                                                Fa0/10, Fa0/12, Fa0/13, Fa0/14
                                                Fa0/15, Fa0/16, Fa0/17, Fa0/19
                                                Fa0/20, Fa0/21, Fa0/22, Fa0/23
                                                Fa0/24, Gig0/1
10   Faculty/Staff                    active    Fa0/11
20   Students                         active    Fa0/18
30   Guest(Default)                   active    Fa0/6
88   Management                       active    
99   Native                           active    
1002 fddi-default                     active    
1003 token-ring-default               active    
1004 fddinet-default                  active    
1005 trnet-default                    active    


Why is port G0/1 on S2 no longer assigned to VLAN 1?
Port G0/1 is a trunk port and trunks ports are not displayed.

Device Configs - Final

Switch S1

! ==============================================================
!--- 3.4.5 Packet Tracer - Configure Trunks
!--- 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 with no directly-connected PCs - only uplinks to S2 (G0/1) and S3 (G0/2). All VLANs (10/20/30/88/99 and the defaults) and the S2/S3 access ports already exist from a previous activity; this lab is entirely about trunking. This script trunks both uplinks and sets VLAN 99 as the native VLAN on each.
! ==============================================================

enable
configure terminal

! --------------------------------------------------------------
!--- Part 2, Step 1: Configure trunking on S1, native VLAN 99
! --------------------------------------------------------------

!--- Both uplinks get the same treatment in one range command: hard-set to trunk, then native VLAN 99 instead of the default VLAN 1. Expect transient "%CDP-4-NATIVE_VLAN_MISMATCH" syslog messages against S2 and S3 until their own native VLAN is corrected (see their scripts) - that mismatch does NOT block the trunk from passing traffic, it's just a configuration warning.
interface range GigabitEthernet0/1 - 2
 switchport mode trunk
 switchport trunk native vlan 99

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-2, from S1 and its neighbors):
!---   S1# show interfaces trunk             -> Gig0/1 and Gig0/2 both trunking, native VLAN 99
!---   S1# show vlan brief                   -> S1 has no access ports to show; trunk ports never appear per-VLAN
!---   From PC1, ping PC4 (VLAN 10, S2<->S3) -> success once S2 and S3 also correct their native VLAN
!---   From PC2, ping PC5 (VLAN 20, S2<->S3) -> success once S2 and S3 also correct their native VLAN
!---   From PC3, ping PC6 (VLAN 30, S2<->S3) -> success once S2 and S3 also correct their native VLAN
! ==============================================================

Switch S2

! ==============================================================
!--- 3.4.5 Packet Tracer - Configure Trunks
!--- 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 connects PC1/PC2/PC3 (already assigned to VLANs 10/20/30 from a previous activity) and uplinks to S1 over G0/1 ONLY - S2 has no link on G0/2 (see the discrepancy note: the source answer key mistakenly ranges g0/1-2 here). DTP already brought this port up as a trunk automatically once S1 was configured; this script only needs to correct the native VLAN to 99 to clear the mismatch.
! ==============================================================

enable
configure terminal

! --------------------------------------------------------------
!--- Part 2, Step 3: Correct the native VLAN mismatch on S2
! --------------------------------------------------------------

!--- G0/1 is the only uplink S2 actually has (to S1's G0/1, per the topology and the CDP mismatch message naming "S2 GigabitEthernet0/1"). It's already trunking via DTP negotiation - this only moves its native VLAN from the default (1) to 99, to match S1 and clear the "%CDP-4-NATIVE_VLAN_MISMATCH" warning.
interface GigabitEthernet0/1
 switchport trunk native vlan 99

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-2, from S2 and its neighbors):
!---   S2# show interfaces trunk           -> Gig0/1 trunking, native VLAN 99, allowed VLANs include 1,10,20,30,88,99
!---   S2# show interface g0/1 switchport  -> native VLAN now 99
!---   S2# show vlan                       -> G0/1 no longer listed under any VLAN (trunk ports aren't shown there)
!---   From PC1, ping PC4 (VLAN 10, on S3) -> success once S3 also corrects its native VLAN
!---   From PC2, ping PC5 (VLAN 20, on S3) -> success once S3 also corrects its native VLAN
! ==============================================================

Switch S3

! ==============================================================
!--- 3.4.5 Packet Tracer - Configure Trunks
!--- 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 connects PC4/PC5/PC6 (already assigned to VLANs 10/20/30 from a previous activity) and uplinks to S1 over G0/2 ONLY - S3 has no link on G0/1 (see the discrepancy note: the source answer key mistakenly ranges g0/1-2 here). DTP already brought this port up as a trunk automatically once S1 was configured; this script only needs to correct the native VLAN to 99 to clear the mismatch.
! ==============================================================

enable
configure terminal

! --------------------------------------------------------------
!--- Part 2, Step 3: Correct the native VLAN mismatch on S3
! --------------------------------------------------------------

!--- G0/2 is the only uplink S3 actually has (to S1's G0/2, per the topology and the CDP mismatch message naming "S3 GigabitEthernet0/2"). It's already trunking via DTP negotiation - this only moves its native VLAN from the default (1) to 99, to match S1 and clear the "%CDP-4-NATIVE_VLAN_MISMATCH" warning.
interface GigabitEthernet0/2
 switchport trunk native vlan 99

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-2, from S3 and its neighbors):
!---   S3# show interfaces trunk           -> Gig0/2 trunking, native VLAN 99, allowed VLANs include 1,10,20,30,88,99
!---   S3# show interface g0/2 switchport  -> native VLAN now 99
!---   S3# show vlan                       -> G0/2 no longer listed under any VLAN (trunk ports aren't shown there)
!---   From PC4, ping PC1 (VLAN 10, on S2) -> success once S2 also corrects its native VLAN
!---   From PC5, ping PC2 (VLAN 20, on S2) -> success once S2 also corrects its native VLAN
! ==============================================================

Download Packet Tracer (.pka) file:

Subscribe
Notify of
guest

1 Correction or Clarification