Troubleshooting Inter-VLAN Routing

In this lesson we’ll take a look how to solve inter-VLAN routing issues. Here’s the topology we will use:

host 1 2 switch inter vlan routing

We have two computers and you can see they have different IP addresses. The switch is a multilayer switch. Since the computers are in different subnets we have to think about routing. Let’s try a ping from H1 to H2:

C:Documents and SettingsH1>ping 192.168.20.2

Pinging 192.168.20.2 with 32 bytes of data:

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

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

A quick ping from H1 to H2 shows us that the two computers can’t reach each other. Where should we start troubleshooting? Let’s check the IP configuration of H1:

C:Documents and SettingsH1>ipconfig

Windows IP Configuration

Ethernet adapter Local Area Connection:

        Connection-specific DNS Suffix  . :
        IP Address. . . . . . . . . . . . : 192.168.10.1
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 192.168.10.254

This lesson isn’t about windows but we do need to pay attention to our hosts. Since the computers need “to get out of their own subnet” we have to verify that the default gateway IP address is ok and reachable. Let’s try it:

C:Documents and SettingsVMWare>ping 192.168.10.254

Pinging 192.168.10.254 with 32 bytes of data:

Reply from 192.168.10.254: bytes=32 time=3ms TTL=255
Reply from 192.168.10.254: bytes=32 time=1ms TTL=255
Reply from 192.168.10.254: bytes=32 time=2ms TTL=255
Reply from 192.168.10.254: bytes=32 time=1ms TTL=255

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

H1 is able to reach the default gateway so we at least know that H1 is working fine. Let’s check H2:

C:Documents and SettingsH2>ipconfig

Windows IP Configuration

Ethernet adapter Local Area Connection:

        Connection-specific DNS Suffix  . :
        IP Address. . . . . . . . . . . . : 192.168.20.2
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 192.168.20.254

Here’s the IP configuration of H2. Let’s see if we can reach the default gateway!

C:Documents and SettingsH2>ping 192.168.20.254

Pinging 192.168.20.254 with 32 bytes of data:

Reply from 192.168.20.254: bytes=32 time=4ms TTL=255
Reply from 192.168.20.254: bytes=32 time=2ms TTL=255
Reply from 192.168.20.254: bytes=32 time=2ms TTL=255
Reply from 192.168.20.254: bytes=32 time=1ms TTL=255

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

That’s also working. We know that the computers are not the issue because they know how to get out of their own subnet and the default gateway is reachable. Time to check out the switch (we are network engineers after all…). Just in case, let’s check the VLANs and the interfaces:

SW1#show interfaces fa0/1 switchport | include VLAN
Access Mode VLAN: 10 (VLAN0010)
SW1#show interfaces fa0/3 switchport | include VLAN
Access Mode VLAN: 20 (VLAN0020)

We can see that H1 is in VLAN 10 and H2 is in VLAN 20. I didn’t check if the interfaces were up/up because I was already able to ping the default gateway IP addresses. This proves that fa0/1 and fa0/3 are working but I didn’t know yet to what VLAN they belong. Here you can see the IP addresses on the SVI interfaces:

SW1#show ip int brief | include Vlan
Vlan1                  unassigned      YES TFTP   up                    down    
Vlan10                 192.168.10.254  YES manual up                    up      
Vlan20                 192.168.20.254  YES manual up                    up

Two SVI interfaces have been configured. These are the IP addresses that the computers use as default gateway. So why isn’t our switch routing traffic? Let’s check the routing table of the switch:

SW1#show ip route
Default gateway is not set

Host               Gateway           Last Use    Total Uses  Interface
ICMP redirect cache is empty

Having IP addresses on interfaces doesn’t automatically mean that we are going to route traffic. In order to do so we require a routing table. This switch doesn’t have one…let’s enable routing:

SW1(config)#ip routing

Now the switch will build a routing table. Let’s see the difference:

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now!

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You’ve Ever Spent on Your Cisco Career!
  • Full Access to our 799 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)
570 Sign Ups in the last 30 days
satisfaction-guaranteed

  • 100% Satisfaction Guaranteed!
  • You may cancel your monthly membership at any time.
  • No Questions Asked!

Forum Replies

  1. Nice. you are awesome Rene. God bless you.
    because of you, i have cleared my first round of interview. Interviewer asked me one question to which i haven’t answered well.
    What are steps you will take to troubleshoot a network running ospf protocol?

    Could you please help with this?

  2. nice units so far. Only three more units to go until finish my first round of studying for Tshoot. I love learning and studying but sometimes when your really hard at it for a few days some of the fun is lost and it becomes work.

  3. Hi Laz,

    Is this possible to assign ip addresses of different n/w to vlans b/c here ports are switchport not routed. this dragged me in confusion regarding assignment of the ip addresses to the VLAN, kindly clarify.

  4. Hello Pradyumna

    You cannot assign IP addresses to switchports because they are Layer 2 ports, but you can assign VLANs to switchports. Each VLAN on a switch can have one or more switchports assigned to it. In addition, each VLAN must have a configured SVI in order for hosts on that VLAN to be able to access other networks. The SVI is configured with an IP address and acts as the default gateway for that subnet.

    For this reason, IP addressing must correspond to the VLANs that exist on a switch. What this means is that a single VLAN will typically correspond t

    ... Continue reading in our forum

19 more replies! Ask a question or join the discussion by visiting our Community Forum