Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 12

Troubleshoot Inter-VLAN Routing with SVIs

Recommended resources

Hello! Welcome back to our course on advanced enterprise networking.

In our last lesson, we explored how Private VLANs provide Layer 2 isolation within a single subnet, and we briefly noted that the default gateway for a PVLAN domain is a Switched Virtual Interface (SVI) configured on the primary VLAN. Today, we will dive deep into this crucial concept.

This lesson addresses the learning outcome: Troubleshoot inter-VLAN routing using Switched Virtual Interfaces (SVIs). We will explore why hosts in different VLANs need a Layer 3 device to communicate and focus on the modern, high-performance method using SVIs on multilayer switches. Mastering this topic is fundamental for any network professional, as it forms the bridge between Layer 2 segmentation and Layer 3 connectivity in enterprise networks.

1. The Need for Inter-VLAN Routing

By design, VLANs create separate broadcast domains. This is excellent for security, organization, and performance, as it contains broadcast traffic and isolates groups of users. However, it also means that a host in VLAN 10 cannot communicate with a host in VLAN 20 without assistance. To enable this communication, we need a Layer 3 device—a router—to forward packets between the different IP subnets associated with each VLAN.

There are a few ways to achieve this:

  1. Legacy Method (External Router, Multiple Interfaces): Using a separate physical router interface for each VLAN. This is highly inefficient and does not scale.
  2. Router-on-a-Stick (RoaS): A more common method where a single router interface is connected to a switch via a trunk link. The router uses subinterfaces, one for each VLAN, to route traffic.
  3. Multilayer Switch with SVIs: The most common and efficient method in modern networks. The routing logic is built directly into the switch, providing high-speed forwarding between VLANs without needing an external router.

This image clearly contrasts the SVI approach (left) with the Router-on-a-Stick approach (right). Notice how the Layer 3 switch (DS1) handles routing internally, while the Layer 2 switch (DS2) must forward traffic to an external router (R3).

Inter-VLAN Routing Topologies with SVI and Router-on-a-Stick
A comparison of inter-VLAN routing using a Layer 3 switch with SVIs (left) and the router-on-a-stick method (right). Our focus is on the SVI implementation.

To solidify this foundational concept, the following short video provides an excellent overview.

CCNP ENCOR // VLANs // ENCOR 350-401 Complete Course

Watch this segment from Jeremy's IT Lab. It succinctly introduces the problem and the three methods of inter-VLAN routing we just discussed.

Watch from 21:50 to 22:45. This will quickly frame the context for why SVIs are the preferred solution.


2. Understanding Switched Virtual Interfaces (SVIs)

An SVI is a logical, virtual Layer 3 interface that represents a VLAN on a multilayer switch. Think of it as the default gateway for all devices within that specific VLAN. Instead of having a physical router, a multilayer switch contains a "virtual router" in its software that uses these SVIs as its interfaces.

To function, a multilayer switch needs two key things:

  1. Global IP Routing Enabled: The switch must be explicitly told to act as a router.
  2. An SVI for Each VLAN: You need to create and configure a Layer 3 interface for each VLAN that requires routing.

The video below explains this concept perfectly and introduces the commands to bring an SVI to life.

Inter-VLAN Routing using a Multi-Layer Switch | Cisco CCNA 200-301

Let's watch a clip from Keith Barker that explains what an SVI is and how it functions as a logical interface within a multilayer switch.

Watch from 05:24 to 07:12. Pay attention to how he describes the SVI as a 'phantom' or logical router interface and the basic command (interface vlan <id>) used to create it.

Basic SVI Configuration Steps

Here is the fundamental configuration sequence to create an SVI on a multilayer switch (e.g., for VLAN 10):

  1. Enable IP Routing Globally: This is a one-time command that turns on the switch's Layer 3 capabilities.
    Switch(config)# ip routing
    
  2. Create the SVI: Enter the interface configuration mode for the VLAN.
    Switch(config)# interface vlan 10
    
  3. Assign an IP Address: This IP will be the default gateway for hosts in VLAN 10.
    Switch(config-if)# ip address 10.1.10.1 255.255.255.0
    
  4. Enable the Interface:
    Switch(config-if)# no shutdown
    

You would repeat steps 2-4 for every VLAN that needs to participate in routing.


3. A Systematic Approach to Troubleshooting Inter-VLAN Routing

As a solutions engineer, you know the importance of a structured troubleshooting methodology. When inter-VLAN routing fails, the issue could be at Layer 2, Layer 3, or on the end-host itself. The key is to test systematically, from the bottom up.

The following Cisco document provides an excellent, concise troubleshooting framework.

Configure Inter-VLAN Routing with Catalyst Switches - Cisco

This official Cisco guide outlines the key steps for troubleshooting inter-VLAN routing. We will use its structure as the basis for our methodology.

Review the 'Troubleshoot' section. You don't need to read the entire document. Focus on the four main problem categories and the commands suggested for each. This will provide a mental checklist for diagnosing issues.

Let's integrate this methodology with a practical demonstration. The following video is a masterclass in verifying and troubleshooting an inter-VLAN routing setup.

Inter-VLAN Routing using a Multi-Layer Switch | Cisco CCNA 200-301

This extended segment from Keith Barker is the core of our lesson. He walks through an entire lab scenario, from initial verification to final testing. This directly addresses our learning outcome and aligns with your preference for practical, real-world examples.

Watch this video carefully from 07:12 to 29:13. It's a bit long, but it covers the entire troubleshooting process. Follow along as he: Verifies Layer 2 (07:12 - 19:25): He uses show vlan brief and show interfaces trunk to ensure the Layer 2 foundation is correct before touching Layer 3. This is a critical first step. Configures and Verifies SVIs (19:25 - 24:52): He creates the SVIs, assigns IPs, and notably, checks if ip routing is enabled. He uses show ip interface brief to verify SVI status. Tests Connectivity Systematically (24:52 - 29:13): He tests from a host to its gateway, then from that host to a device in another VLAN, explaining the logic at each step. This is a perfect example of methodical fault isolation.

Troubleshooting Checklist

Based on the resources above, here is a consolidated checklist for troubleshooting SVI-based inter-VLAN routing:

Step 1: Verify End-Host Configuration

  • Is the IP address and subnet mask correct?
  • Most importantly, is the default gateway set to the IP address of the correct SVI?

Step 2: Verify Layer 2 Foundation

  • Can the host ping its default gateway (the SVI)? If not, the problem is likely at Layer 2.
  • Is the host's switchport assigned to the correct VLAN?
    • show vlan brief
  • If traffic crosses to another switch, are the trunk links configured correctly and allowing the necessary VLANs?
    • show interfaces trunk

Step 3: Verify Layer 3 SVI Configuration

  • Is global IP routing enabled on the multilayer switch?
    • show ip route (If it says "Default gateway is not set", ip routing might be missing).
  • Does the SVI for the VLAN exist and have the correct IP address?
    • show ip interface brief
  • Is the SVI in an up/up state?
    • show ip interface brief
    • show interface vlan <id>
The Classic "SVI is down/down" Problem

A very common CCNP-level issue is finding an SVI in a down/down or up/down state even after using no shutdown.

An SVI's line protocol state is tied to the Layer 2 status of its corresponding VLAN. For an SVI to come up, the VLAN must be active on the switch. This means the VLAN must:

  1. Exist in the VLAN database (show vlan brief).
  2. Be active on at least one Layer 2 port on the switch. This could be either:
    • An access port assigned to that VLAN which is in an up/up state.
    • A trunk port that is up/up and is allowing that VLAN.

If a VLAN has no active ports associated with it, the switch considers it dormant, and the corresponding SVI will not come up.

SVI Configuration Interface with Auto State Setting
This image from a GUI shows the 'Auto State' feature. When enabled (the default), the SVI's operational state is automatically tied to the Layer 2 status of the VLAN.

Step 4: Verify End-to-End Connectivity

  • From Host A (VLAN A), can you ping the SVI for VLAN B? This tests routing on the switch.
  • From Host A (VLAN A), can you ping Host B (VLAN B)? If this fails but the step above succeeded, the problem is likely with Host B's configuration (e.g., wrong gateway, firewall) or the return path.

This quick reference table summarizes common issues and actions.

A Complete Guide with CLI & EVE-NG Labs [CCNP Enterprise]

Finally, this quick guide provides a handy table summarizing common Layer 2 problems that can break inter-VLAN routing.

Look at the table under 'Troubleshooting Tips'. The entry 'End device can’t ping gateway' is directly relevant. Also, read FAQ #10, which lists common Layer 2 issues that break gateway reachability.

Test your understanding!

A user on PC-10 (IP: 192.168.10.50/24, Gateway: 192.168.10.1) in VLAN 10 cannot access a server on PC-20 (IP: 192.168.20.60/24, Gateway: 192.168.20.1) in VLAN 20. Both are connected to the same multilayer switch. You ssh to the switch and run show ip interface brief. You see the following output:

Interface              IP-Address      OK? Method Status                Protocol
Vlan10                 192.168.10.1    YES manual up                    up
Vlan20                 192.168.20.1    YES manual administratively down down

What is the most likely cause of the problem, and what is the immediate command to fix it?

Show answer

The output shows that Interface Vlan20 is "administratively down". This means the shutdown command is currently active on that SVI.

The most likely cause is that the administrator forgot to enable the interface after creating it.

The command to fix it is:

Switch(config)# interface vlan 20
Switch(config-if)# no shutdown

This will bring the SVI for VLAN 20 into an up/up state (assuming VLAN 20 is active on the switch), allowing the switch to route traffic to and from the 192.168.20.0/24 subnet.


Conclusion

In this lesson, we demystified inter-VLAN routing by focusing on its modern implementation with Switched Virtual Interfaces. We established that an SVI on a multilayer switch acts as a default gateway, enabling seamless communication between what would otherwise be isolated Layer 2 domains.

Key Takeaways:

  • Inter-VLAN routing is necessary to allow communication between hosts on different VLANs.
  • SVIs on a multilayer switch are the preferred, high-performance method for this.
  • A successful configuration requires enabling ip routing globally and creating an SVI with an IP address for each VLAN.
  • Troubleshooting must be systematic: verify the end-host, then the Layer 2 foundation, and finally the Layer 3 SVI configuration.
  • A common pitfall is an SVI remaining down because its associated VLAN is not active on any switch port.

Preview of the Next Lesson:

We've focused on configuring VLANs and SVIs on a single switch. In a larger network, manually creating the same VLANs on every switch is tedious and error-prone. In our next lesson, we will analyze VTP operation (server, client, transparent modes) and configure VTP pruning, exploring how Cisco's VLAN Trunking Protocol can automate VLAN database management across an enterprise network.