4.4.8 Packet Tracer – Troubleshoot Inter-VLAN Routing (Instructions Answer)

4.4.8 Packet Tracer - Troubleshoot Inter-VLAN Routing Answers

Topology

4.4.8 Packet Tracer - Troubleshoot Inter-VLAN Routing topology

Addressing Table

Device Interface IP Address Subnet Mask Default Gateway VLAN
R1 G0/1.10 172.17.10.1 255.255.255.0 N/A VLAN 10
G0/1.30 172.17.30.1 255.255.255.0 N/A VLAN 30
PC1 NIC 172.17.10.10 255.255.255.0 172.17.10.1 VLAN 10
PC3 NIC 172.17.30.10 255.255.255.0 172.17.30.1 VLAN 30

Objectives

  • Part 1: Locate Network Problems
  • Part 2: Implement the Solution
  • Part 3: Verify Network Connectivity

Scenario

In this activity, you will troubleshoot connectivity problems caused by improper configurations related to VLANs and inter-VLAN routing.

Contents

Instructions

Part 1: Locate the Network Problems

Examine the network and locate the source of any connectivity issues.

Commands you may find useful include show ip interface brief, show interfaces, show interfaces trunk and show vlan brief. Their output is shown under each problem below.

  • Test connectivity and use the necessary show commands to verify configurations.
  • Verify that all configured settings match the requirements shown in the Addressing Table.
  • List all of the problems and possible solutions in the Documentation Table.

Key concept: every link in the router-on-a-stick chain must be correct
A frame from PC1 to PC3 crosses five checkpoints: the PC settings (IP address and default gateway), the S1 access port (the right VLAN), the S1 uplink to R1 (an 802.1Q trunk that carries the VLAN tags), the R1 subinterface (enabled, with encapsulation dot1Q matching the VLAN tag), and the gateway address on that subinterface. If any one checkpoint is wrong, inter-VLAN traffic fails. In this activity four checkpoints are wrong at the same time, so each single fix appears to change nothing until the last one is applied.

Inter-VLAN checklist
Checkpoint Command Expected result Fault found
PC IP settings ipconfig IP, mask and gateway match the Addressing Table Problem 2
S1 access ports show vlan brief Fa0/11 in VLAN 10, Fa0/6 in VLAN 30 None (see output)
S1 uplink to R1 show interfaces trunk Gig0/1 trunking; VLANs 10 and 30 allowed and forwarding Problem 3
R1 subinterface state show ip interface brief G0/1, G0/1.10 and G0/1.30 up/up Problem 1
R1 VLAN tag and gateway address show interfaces gigabitethernet 0/1.10 / 0/1.30 Vlan ID 10 with 172.17.10.1; Vlan ID 30 with 172.17.30.1 Problem 4
Test connectivity

On each PC, check the IP settings, then ping the default gateway and the other PC:

C:\> ipconfig

FastEthernet0 Connection:(default port)

   Connection-specific DNS Suffix..:
   Link-local IPv6 Address.........: FE80::2D0:BCFF:FEE8:B8A
   IPv6 Address....................: ::
   IPv4 Address....................: 172.17.10.10
   Subnet Mask.....................: 255.255.255.0
   Default Gateway.................: ::
                                     172.17.10.1
C:\> ping 172.17.10.1

Pinging 172.17.10.1 with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 172.17.10.1:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
C:\> ping 172.17.30.10

Pinging 172.17.30.10 with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 172.17.30.10:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

C:\> ipconfig

FastEthernet0 Connection:(default port)

   Connection-specific DNS Suffix..:
   Link-local IPv6 Address.........: FE80::2D0:BAFF:FEBE:CEAA
   IPv6 Address....................: ::
   IPv4 Address....................: 172.17.30.10
   Subnet Mask.....................: 255.255.255.0
   Default Gateway.................: ::
                                     172.17.10.1
C:\> ping 172.17.30.1

Pinging 172.17.30.1 with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 172.17.30.1:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
C:\> ping 172.17.10.10

Pinging 172.17.10.10 with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 172.17.10.10:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

PC Ping own gateway Ping the other PC After all fixes
PC1 ✘ (Problems 1, 3, 4) ✘ (Problems 1, 2, 3, 4) ✔ (Part 3)
PC3 ✘ (Problems 3, 4) ✘ (Problems 1, 2, 3, 4) ✔ (Part 3)

What we learned:

  • Neither PC can reach its own default gateway or the other PC, so the problem is not only in the routing between the VLANs: the path from the PCs to R1 is broken.
  • PC1 has the correct settings. PC3 uses the default gateway 172.17.10.1, which is the VLAN 10 gateway and is outside its own network 172.17.30.0/24.

Problem 1: R1 G0/1.10 is administratively down
R1# show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0     unassigned      YES unset  administratively down down
GigabitEthernet0/1     unassigned      YES unset  up                    up
GigabitEthernet0/1.10  172.17.10.1     YES manual administratively down down
GigabitEthernet0/1.30  172.17.30.1     YES manual up                    up
Vlan1                  unassigned      YES unset  administratively down down

What we learned:
The physical interface G0/1 is up/up, but the subinterface G0/1.10 (gateway of VLAN 10) is administratively down.

Problem 2: PC3 has the wrong default gateway

See the ipconfig output of PC3 in Test connectivity.

Problem 3: S1 G0/1 is an access port instead of a trunk
S1# show interfaces trunk

S1#
S1# show interfaces gigabitethernet 0/1 switchport
Name: Gig0/1
Switchport: Enabled
Administrative Mode: static access
Operational Mode: static access
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: native
Negotiation of Trunking: Off
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
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 we learned:
show interfaces trunk returns nothing because S1 has no trunk. G0/1, the link to R1, is a static access port in VLAN 1, so it cannot carry the tagged frames of VLANs 10 and 30 to the router-on-a-stick.

Problem 4: The VLAN IDs of the R1 subinterfaces are swapped
R1# show interfaces gigabitethernet 0/1.10
GigabitEthernet0/1.10 is administratively down, line protocol is down (disabled)
  Hardware is PQUICC_FEC, address is 000d.bde7.0c02 (bia 000d.bde7.0c02)
  Internet address is 172.17.10.1/24
  MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation 802.1Q Virtual LAN, Vlan ID 30
  ARP type: ARPA, ARP Timeout 04:00:00,
  Last clearing of "show interface" counters never
R1# show interfaces gigabitethernet 0/1.30
GigabitEthernet0/1.30 is up, line protocol is up (connected)
  Hardware is PQUICC_FEC, address is 000d.bde7.0c02 (bia 000d.bde7.0c02)
  Internet address is 172.17.30.1/24
  MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation 802.1Q Virtual LAN, Vlan ID 10
  ARP type: ARPA, ARP Timeout 04:00:00,
  Last clearing of "show interface" counters never

What we learned:
The IP addresses are correct, but the VLAN IDs are swapped: G0/1.10 (172.17.10.1) is tagged with VLAN 30, and G0/1.30 (172.17.30.1) with VLAN 10. Frames from VLAN 10 would reach the subinterface with the VLAN 30 address.

Access ports with no faults
S1# 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/18
                                                Fa0/19, Fa0/20, Fa0/21, Fa0/22
                                                Fa0/23, Fa0/24, Gig0/1, Gig0/2
10   Faculty/Staff                    active    Fa0/11
30   Guest(Default)                   active    Fa0/6
1002 fddi-default                     active
1003 token-ring-default               active
1004 fddinet-default                  active
1005 trnet-default                    active

What we learned:
The access ports match the Addressing Table: Fa0/11 (PC1) is in VLAN 10 and Fa0/6 (PC3) is in VLAN 30. G0/1 is still in VLAN 1 because it is an access port (Problem 3).

Documentation Table
# Problems Solutions
1 The G0/1 physical interface is up but G0/1.10 subinterface is administratively down. Implement the no shutdown command to enable the G0/1.10 subinterface.
2 PC3 is configured with the wrong default gateway address. Change the default gateway on PC3 from 172.17.10.1 to 172.17.30.1.
3 Interface G0/1 on S1 is configured as an access port instead of trunk port. Use the command switchport mode trunk to change the interface from access mode to trunk mode.
4 Subinterface VLAN assignments are switched on R1. The configured assignments do not match the ones shown in the Addressing Table. Issue the no encapsulation dot1q command to remove the incorrect configuration. Then configure the subinterfaces with the correct encapsulation dot1q vlan_number command. Re-enter the correct IP address information.

Part 2: Implement the Solutions

Implement your recommended solutions.

Fix 1: Enable the G0/1.10 subinterface on R1.

R1(config)# interface gigabitethernet 0/1.10
R1(config-subif)# no shutdown
R1# show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0     unassigned      YES unset  administratively down down
GigabitEthernet0/1     unassigned      YES unset  up                    up
GigabitEthernet0/1.10  172.17.10.1     YES manual up                    up
GigabitEthernet0/1.30  172.17.30.1     YES manual up                    up
Vlan1                  unassigned      YES unset  administratively down down

What we learned:
G0/1.10 is now up/up. PC1 still cannot reach its gateway yet, because the VLAN IDs are swapped (Problem 4) and S1 G0/1 is not a trunk (Problem 3).

Fix 2: Change the default gateway on PC3 from 172.17.10.1 to 172.17.30.1 (Desktop > IP Configuration).

4.4.8 PC3 IP Configuration with default gateway 172.17.30.1

C:\> ipconfig

FastEthernet0 Connection:(default port)

   Connection-specific DNS Suffix..:
   Link-local IPv6 Address.........: FE80::2D0:BAFF:FEBE:CEAA
   IPv6 Address....................: ::
   IPv4 Address....................: 172.17.30.10
   Subnet Mask.....................: 255.255.255.0
   Default Gateway.................: ::
                                     172.17.30.1

Fix 3: Configure G0/1 on S1 as a trunk port.

S1(config)# interface gigabitethernet 0/1
S1(config-if)# switchport mode trunk

Note: Wait about 30 seconds (or click Fast Forward Time) so that spanning tree finishes converging on the new trunk, then verify:

S1# show interfaces trunk
Port        Mode         Encapsulation  Status        Native vlan
Gig0/1      on           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,30

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

What we learned:
G0/1 is now a trunk, and VLANs 1, 10 and 30 are allowed, active and forwarding on it. If you run the command immediately after the change, the last line may still show none because spanning tree has not finished converging.

Fix 4: Correct the swapped subinterface VLAN assignments on R1. Remove the encapsulation from both subinterfaces first; otherwise IOS rejects the new VLAN ID because it is still in use on the other subinterface.

If you try to change the VLAN ID directly, without removing the old encapsulation first, IOS rejects the command:

R1(config)# interface gigabitethernet 0/1.10
R1(config-subif)# encapsulation dot1Q 10

%Configuration of multiple subinterfaces of the same main
interface with the same VID (10) is not permitted.
This VID is already configured on GigabitEthernet0/1.30.

VLAN 10 is still assigned to G0/1.30, and one main interface cannot use the same VLAN ID on two subinterfaces. Remove the encapsulation from both subinterfaces first, then apply the correct VLAN IDs.

The correct sequence:

R1(config)# interface gigabitethernet 0/1.10
R1(config-subif)# no encapsulation dot1Q
R1(config-subif)# interface gigabitethernet 0/1.30
R1(config-subif)# no encapsulation dot1Q
R1(config-subif)# interface gigabitethernet 0/1.10
R1(config-subif)# encapsulation dot1Q 10
R1(config-subif)# ip address 172.17.10.1 255.255.255.0
R1(config-subif)# interface gigabitethernet 0/1.30
R1(config-subif)# encapsulation dot1Q 30
R1(config-subif)# ip address 172.17.30.1 255.255.255.0

R1# show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0     unassigned      YES unset  administratively down down
GigabitEthernet0/1     unassigned      YES unset  up                    up
GigabitEthernet0/1.10  172.17.10.1     YES manual up                    up
GigabitEthernet0/1.30  172.17.30.1     YES manual up                    up
Vlan1                  unassigned      YES unset  administratively down down
R1# show interfaces gigabitethernet 0/1.10
GigabitEthernet0/1.10 is up, line protocol is up (connected)
  Hardware is PQUICC_FEC, address is 000d.bde7.0c02 (bia 000d.bde7.0c02)
  Internet address is 172.17.10.1/24
  MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation 802.1Q Virtual LAN, Vlan ID 10
  ARP type: ARPA, ARP Timeout 04:00:00,
  Last clearing of "show interface" counters never
R1# show interfaces gigabitethernet 0/1.30
GigabitEthernet0/1.30 is up, line protocol is up (connected)
  Hardware is PQUICC_FEC, address is 000d.bde7.0c02 (bia 000d.bde7.0c02)
  Internet address is 172.17.30.1/24
  MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation 802.1Q Virtual LAN, Vlan ID 30
  ARP type: ARPA, ARP Timeout 04:00:00,
  Last clearing of "show interface" counters never

What we learned:
Both subinterfaces are up/up with the correct address and the correct VLAN: G0/1.10 uses VLAN 10 and G0/1.30 uses VLAN 30.

Part 3: Verify Network Connectivity

Verify the PCs can ping each other and R1. If not, continue to troubleshoot until the pings are successful.

C:\> ping 172.17.10.1

Pinging 172.17.10.1 with 32 bytes of data:

Reply from 172.17.10.1: bytes=32 time<1ms TTL=255
Reply from 172.17.10.1: bytes=32 time<1ms TTL=255
Reply from 172.17.10.1: bytes=32 time<1ms TTL=255
Reply from 172.17.10.1: bytes=32 time<1ms TTL=255

Ping statistics for 172.17.10.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\> ping 172.17.30.10

Pinging 172.17.30.10 with 32 bytes of data:

Request timed out.
Reply from 172.17.30.10: bytes=32 time<1ms TTL=127
Reply from 172.17.30.10: bytes=32 time<1ms TTL=127
Reply from 172.17.30.10: bytes=32 time<1ms TTL=127

Ping statistics for 172.17.30.10:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\> ping 172.17.30.1

Pinging 172.17.30.1 with 32 bytes of data:

Reply from 172.17.30.1: bytes=32 time<1ms TTL=255
Reply from 172.17.30.1: bytes=32 time<1ms TTL=255
Reply from 172.17.30.1: bytes=32 time<1ms TTL=255
Reply from 172.17.30.1: bytes=32 time<1ms TTL=255

Ping statistics for 172.17.30.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\> ping 172.17.10.10

Pinging 172.17.10.10 with 32 bytes of data:

Reply from 172.17.10.10: bytes=32 time<1ms TTL=127
Reply from 172.17.10.10: bytes=32 time<1ms TTL=127
Reply from 172.17.10.10: bytes=32 time<1ms TTL=127
Reply from 172.17.10.10: bytes=32 time<1ms TTL=127

Ping statistics for 172.17.10.10:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms


What we learned:
Both PCs reach their own gateway and the PC in the other VLAN. TTL=127 shows that the packets cross one router (R1), so inter-VLAN routing works. The first ping from PC1 to PC3 is lost while ARP resolves the MAC addresses.

Device Configs - Final

ROUTER R1

! ==============================================================
!--- 4.4.8 Packet Tracer - Troubleshoot Inter-VLAN Routing
!--- FIX SCRIPT FOR ROUTER R1
!--- Usage: copy this whole file and paste it into the R1 terminal (start at the R1> prompt). Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.
!--- Troubleshooting lab: only the corrective commands from the Documentation Table.
! ==============================================================

enable
configure terminal

! --------------------------------------------------------------
!--- Fix 4 (Problem 4): subinterface VLAN assignments are swapped.
! --------------------------------------------------------------

!--- Remove the wrong 802.1Q tag from BOTH subinterfaces first - a VLAN ID cannot be applied while the other subinterface still uses it.
interface gigabitethernet 0/1.10
 no encapsulation dot1Q
 exit
interface gigabitethernet 0/1.30
 no encapsulation dot1Q
 exit

!--- Apply the correct VLAN and re-enter the IP address (removing the encapsulation also removes the address).
interface gigabitethernet 0/1.10
 encapsulation dot1Q 10
 ip address 172.17.10.1 255.255.255.0
 exit
interface gigabitethernet 0/1.30
 encapsulation dot1Q 30
 ip address 172.17.30.1 255.255.255.0
 exit

! --------------------------------------------------------------
!--- Fix 1 (Problem 1): G0/1.10 is administratively down.
! --------------------------------------------------------------

interface gigabitethernet 0/1.10
 no shutdown
 exit

end

! --------------------------------------------------------------
!--- Save the configuration to NVRAM. (Press Enter when prompted for the destination filename.)
! --------------------------------------------------------------
copy running-config startup-config


! ==============================================================
!--- Verification:
!---   show ip interface brief                    -> G0/1, G0/1.10, G0/1.30 up/up
!---   show interfaces gigabitethernet 0/1.10     -> 802.1Q VLAN ID 10
!---   show interfaces gigabitethernet 0/1.30     -> 802.1Q VLAN ID 30
! ==============================================================

SWITCH S1

! ==============================================================
!--- 4.4.8 Packet Tracer - Troubleshoot Inter-VLAN Routing
!--- FIX SCRIPT FOR SWITCH S1
!--- Usage: copy this whole file and paste it into the S1 terminal (start at the S1> prompt). Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.
!--- Troubleshooting lab: only the corrective commands from the Documentation Table.
! ==============================================================

enable
configure terminal

! --------------------------------------------------------------
!--- Fix 3 (Problem 3): G0/1 (to R1) is an access port instead of a trunk.
! --------------------------------------------------------------

interface gigabitethernet 0/1
 switchport mode trunk
 exit

end

! --------------------------------------------------------------
!--- Save the configuration to NVRAM. (Press Enter when prompted for the destination filename.)
! --------------------------------------------------------------
copy running-config startup-config


! ==============================================================
!--- Verification:
!---   show interfaces trunk  -> Gig0/1 on, trunking, VLANs 10 and 30 active
!--- From PC1: ping 172.17.30.10 (PC3) -> successful
! ==============================================================

PC3

PC3PC
IP Address172.17.30.10
Subnet Mask255.255.255.0
Default Gateway172.17.30.1
Command Promptipconfig 172.17.30.10 255.255.255.0 172.17.30.1

Download Packet Tracer (.pka) file:

Subscribe
Notify of
guest

4 Corrections & Clarifications