4.4.8 Packet Tracer - Troubleshoot Inter-VLAN Routing Answers
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
- Part 1: Locate the Network Problems (Checklist, Problems 1, 2, 3, 4)
- Part 2: Implement the Solutions (Fix 1, Fix 2, Fix 3, Fix 4)
- Part 3: Verify Network Connectivity
- Device Configs - Final
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.
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:
| 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) |
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 downProblem 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
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
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 activeDocumentation 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 downFix 2: Change the default gateway on PC3 from 172.17.10.1 to 172.17.30.1 (Desktop > IP Configuration).
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.1Fix 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
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 neverR1# 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 neverPart 3: Verify Network Connectivity
Verify the PCs can ping each other and R1. If not, continue to troubleshoot until the pings are successful.
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 ! ==============================================================






