Inter-VLAN Routing: Ultimate Configuration Guide for Cisco (2024)

by Darin Knobbe on Nov 18, 2021 9:09:59 AM

Download the Guide

Table of Contents

In a Layer 2 switched environment, VLANs separate devices into different collision domains and Layer 3 subnets. Devices in the same VLAN can communicate without any routing, and devices in different VLANs require routing to communicate with each other.

L2 switches require an L3 routing device to communicate between different VLANs, and the device is either an external router or Layer 3 module on the same chassis. Most of the Cisco switches have routing capabilities within the switch. When the switch receives a packet, it determines that it belongs to another VLAN, and the switch sends the packet to the appropriate port on the other VLAN.

This blog will discuss inter-VLAN routing configuration examples in Cisco routers and switches.

Download the guide and refer back to it at any time!

What Is Inter-VLAN Routing?

VLANs are used to segment Layer 2 networks. Hosts from one VLAN cannot communicate with hosts in another VLAN unless a router or a Layer 3 switch provides routing services.

Inter-VLAN routingis the technology for communicating network traffic from one VLAN to another VLAN.

There are two well-known inter-VLAN routing options:

  • Router-on-a-Stick: This is a suitable solution for small- to medium-sized networks.
  • Switched Virtual Interfaces (SVIs): This is the most scalable solution for medium to large organizations, and this solution needs a Layer 3 switch.

Router-on-a-Stick Inter-VLAN Routing Method With a Cisco Router

The "router-on-a-stick" inter-VLAN routing technique needs only one physical interface to route traffic among multiple VLANs on a network. A router's physical interface is configured as an 802.1Q trunk and connected to the Layer 2 switch's trunk interface.

The router interface is configured using subinterfaces for passing multiple VLANs in one interface. The configured subinterfaces are software-based virtual interfaces, and each subinterface is associated with a single physical Ethernet interface. Each sub-interface is configured for different subnets that correspond to their VLAN assignment, which facilitates logical routing.

When VLAN-tagged traffic enters the router interface, the traffic is forwarded to the VLAN subinterface according to the VLAN tag ID. After a routing decision is performed based on the destination address, the router determines the egress interface for the traffic.

NOTE: The router-on-a-stick inter-VLAN method does not scale beyond 50 VLANs.

Router-on-a-Stick Inter-VLAN Routing Configuration Example

This section describes how to configure the router-on-a-stick inter-VLAN routing method. You can see in the image below that the router is connected with a switch using a single interface, and can pass multiple VLANs using that interface via a router-on-a-stick inter-VLAN routing configuration.

The router GigabitEthernet 0/0/0 interface is connected to the Layer 2 switch Ethernet 1/1 port. The Ethernet 1/1 is a trunk link that is required to forward traffic within and between VLANs.

Inter-VLAN Routing: Ultimate Configuration Guide for Cisco (1)

To route between VLANs, the Router GigabitEthernet 0/0/0 interface is logically divided into two subinterfaces, as shown in the table below. The table also shows the two VLANs that will be configured on the switch.

SubinterfaceVLANIP Address

G0/0/0.100

100

10.1.100.1/24

G0/0/0.200

200

10.1.200.1/24

Assume that the Router and Switch have basic configurations. Currently, PC1 and PC2 cannot ping each other because they are on different networks.

To enable the PCs to communicate, we need to configure VLANs and trunking in the switch level, and the router must be configured for inter-VLAN routing.

VLAN and Trunking Configuration in Switch

Complete the following steps to configure Switch with VLANs and trunking:

VLAN Configuration

  • Step 1 -VLANs Creation:First, the VLANs are created and named, as shown in the below configuration.

Inter-VLAN Routing: Ultimate Configuration Guide for Cisco (2)

  • Step 2 -Configure Access Ports:Next, port Eth1/2 connecting to PC1 is configured as an access port in VLAN 100, as shown below. Assume PC1 has been configured with the correct IP address, netmask, and default gateway1.100.1.

Access Port Configuration

Inter-VLAN Routing: Ultimate Configuration Guide for Cisco (3)

  • Step 3 -Trunking Port Configuration: Configure the port Eth1/1 as a trunk port like the below configuration.

Trunking Port Configuration

Inter-VLAN Routing: Ultimate Configuration Guide for Cisco (4)

Router Subinterface Configuration

For each VLAN, you need to create a subinterface in the router-on-a-stick method. A subinterface can be created using the interface_id.subinterface_id format in the global configuration mode. The subinterface syntax is the physical interface followed by a period and a subinterface number. Although not required, it is common to match the subinterface number with the VLAN number.

After creating the subinterface, enable the interface with the "no shutdown" command in the interface configuration mode. All the subinterfaces are disabled if the physical interface is disabled.

In the below configuration, the Router G0/0/0 subinterfaces are configured for VLANs 100 and 200.

Inter-VLAN Routing: Ultimate Configuration Guide for Cisco (5)

Verify Connectivity Between PC1 and PC2

After the switch trunk and the router subinterface configurations, the router-on-a-stick configuration is complete. The configuration can be verified from the PC, router, and switch.

From PC1, verify connectivity to a host in another VLAN using theping command.

Windows PC IP Address

Inter-VLAN Routing: Ultimate Configuration Guide for Cisco (6)

The output confirms the IPv4 address and default gateway of PC1. Next, usepingto verify connectivity with PC2, as shown in the below output. Theping reply confirms that inter-VLAN routing is working.

Inter-VLAN Routing: Ultimate Configuration Guide for Cisco (7)

Router-on-a-Stick Inter-VLAN Routing Verification

Use the below show commands to verify and troubleshoot the router-on-a-stick configuration.

  • show ip route
  • show ip interface brief
  • show interfaces

As shown in the below output, verify that the subinterfaces appear in the router's routing table by using the "show ip route" command. Notice that there are two connected routes (C) and their respective exit interfaces for each routable VLAN. The output confirms that the subnets, VLANs, and subinterfaces are active.

Inter-VLAN Routing: Ultimate Configuration Guide for Cisco (8)

Another useful router command isto show the ip interface brief, as shown below. The output confirms that the subinterfaces have the correct IPv4 address configured and that they are operational.

Inter-VLAN Routing: Ultimate Configuration Guide for Cisco (9)

Subinterfaces can be verified using theshow interfacessubinterface-command, as shown in the below output.

Inter-VLAN Routing: Ultimate Configuration Guide for Cisco (10)

In Summary: Inter-VLAN Routing FAQs

What is inter-VLAN routing?

Inter-VLAN routing enables routers or Layer 3 switches to route traffic between VLANs.

Why is inter-VLAN routing necessary?

While it’s sometimes necessary to isolate VLANs and disallow any traffic between them, often some traffic needs to flow between VLANs so certain services and systems are available on any network segment. That’s where inter-VLAN routing comes in.

What are the benefits of inter-VLAN routing?

Inter-VLAN routing allows for communication between different VLANs, which is necessary for certain services and systems to be available across network segments. It also helps in managing network traffic efficiently.

What devices are used in inter-VLAN routing?

Routers or Layer 3 switches are typically used to implement Inter-VLAN routing. These devices can route traffic between VLANs while preserving broadcast domains.

What is the ‘Router-on-a-Stick’ model in inter-VLAN routing?

The ‘Router-on-a-Stick’ model is a common design pattern for Inter-VLAN routing. In this model, a single interface on a router is used to route traffic between multiple VLANs.

How Does Inter-VLAN Routing Improve Network Security?

By segregating the network into different VLANs and controlling the traffic between them using Inter-VLAN routing, network administrators can add an additional layer of security. This can help prevent unauthorized access and contain potential threats within a single VLAN.

What are the practical applications of inter-VLAN routing?

Inter-VLAN routing is commonly used in large enterprise networks to manage network traffic efficiently and securely. It allows for the segregation of different types of traffic (e.g., voice, data, video) into separate VLANs, improving network performance and security.

Inter-VLAN Routing: Ultimate Configuration Guide for Cisco (2024)

FAQs

What is the best method of routing for Intervlan? ›

There are two main ways to accomplish inter-VLAN routing: the router on a stick model or Layer 3 switch inter-VLAN routing. Generally, a Layer 3 switch will have better performance and less latency than the router on a stick.

Which option is the most scalable solution for inter-VLAN routing? ›

There are two well-known inter-VLAN routing options: Router-on-a-Stick: This is a suitable solution for small- to medium-sized networks. Switched Virtual Interfaces (SVIs): This is the most scalable solution for medium to large organizations, and this solution needs a Layer 3 switch.

How to configure VLAN on Cisco switch step by step command? ›

  1. To configure a private VLAN, use the private-vlan command in interface switch configuration mode. Use the no form of the command to return the VLAN to normal VLAN configuration. ...
  2. nfvis(config-switch)# interface vlan 1. nfvis(config-switch-if)# private-vlan primary. ...
  3. VLAN Commands. private-vlan.
  4. show switch vlan.

Can a layer 3 switch do inter VLAN routing? ›

Layer 3 Switch Scenario (4.3.

In Figure 4-6, the Layer 3 switch, D1, is connected to two hosts on different VLANs. PC1 is in VLAN 10, and PC2 is in VLAN 20, as shown. The Layer 3 switch will provide inter-VLAN routing services to the two hosts. Table 4-3 shows the IP addresses for each VLAN.

Which protocol is commonly used for inter-VLAN routing? ›

The modern method of performing inter-VLAN routing is to use Layer 3 switches and switched virtual interfaces (SVI). An SVI is a virtual interface that is configured on a Layer 3 switch, as shown in Figure 4-4.

What is the difference between inter VLAN routing and trunking? ›

Inter vlan routing is used for communication between different vlans via router and multilayer switch. and trunk is used for broadcast the frames one device to other device switch.

How do I route traffic between two VLANs? ›

Three options are available for routing between VLANs:
  1. Use a router, with one router LAN interface connected to the switch for each and every VLAN. ...
  2. Use one router interface with trunking enabled. ...
  3. Use a Layer3 switch, a device that performs both the switching and routing operations.
Dec 10, 2019

Can a layer 2 switch route VLANs? ›

Layer 2 switches offer limited to no routing capabilities within network segments such as VLANs. Layer 3 switches offer routing between different network segments. Limited scalability. Higher scalability enabled by layer 3 switches' cross network segment routing capabilities.

What is the difference between VLAN and Intervlan? ›

a) Virtual LANs ( VLANS ) are networks segments on a switched LAN. Inter-VLAN routing refers to the movement of packets across the network between hosts in different network segments.

How to configure inter VLAN routing? ›

Configuring traditional inter-VLAN routing

The ip addressing in use is shown below. Testing connectivity using the ping command should reveal that PC A cannot ping PC B. The first step is to configure the switchports to access the specified VLAN, fa0/1 to VLAN 20 and fa0/2 to VLAN 30.

What are the disadvantages of inter VLAN routing? ›

This method is cost-effective since it requires only one physical router. However, it can also become a bottleneck if there is a significant amount of inter-VLAN traffic since all the traffic must pass through a single physical interface. Since it employs the use of a single physical interface, latency is also high.

What are the three inter VLAN routing options? ›

Hosts in one VLAN cannot communicate with hosts in another VLAN unless there is a router or a Layer 3 switch to provide routing services. Inter-VLAN routing is the process of forwarding network traffic from one VLAN to another VLAN. Three options include legacy, router-on-a-stick, and a Layer 3 switch using SVIs.

How to create interface VLAN in cisco router? ›

You simply create subinterfaces on the physical interface, associate them with a VLAN, and that's it. In my example, I've used the VLAN ID as the subinterface number, but that is not a requirement.

How to communicate between two VLANs in the same switch? ›

Three options are available for routing between VLANs:
  1. Use a router, with one router LAN interface connected to the switch for each and every VLAN. ...
  2. Use one router interface with trunking enabled. ...
  3. Use a Layer3 switch, a device that performs both the switching and routing operations.
Dec 10, 2019

How do I enable inter VLAN routing in extreme switch? ›

So you need to do the following steps for each VLAN:
  1. create VLAN.
  2. configure IP address for the VLAN.
  3. enable IP forwarding for the VLAN.
  4. add ports to the VLAN.

What is the difference between a router on a stick and inter-VLAN routing? ›

Inter VLAN Routing can be achieved through a layer-3 device i.e. Router or layer-3 Switch. When the Inter VLAN Routing is done through Router it is known as Router on a stick. Router On a Stick : The Router's interface is divided into sub-interfaces, which acts as a default gateway to their respective VLANs.

Top Articles
Are Zero Down Mortgages a Good Idea? - Experian
How To Use Gift Letters For Your Mortgage
Woodward Avenue (M-1) - Automotive Heritage Trail - National Scenic Byway Foundation
Gamevault Agent
Retro Ride Teardrop
Poplar | Genus, Description, Major Species, & Facts
Www Movieswood Com
What Was D-Day Weegy
Little Rock Arkansas Craigslist
Cincinnati Bearcats roll to 66-13 win over Eastern Kentucky in season-opener
Winterset Rants And Raves
Keniakoop
Dumb Money
Colts seventh rotation of thin secondary raises concerns on roster evaluation
Fairy Liquid Near Me
7543460065
R Cwbt
U Break It Near Me
/Www.usps.com/International/Passports.htm
How many days until 12 December - Calendarr
Evil Dead Rise Showtimes Near Pelican Cinemas
THE FINALS Best Settings and Options Guide
Craigslist Dubuque Iowa Pets
Blackboard Login Pjc
Unable to receive sms verification codes
Cable Cove Whale Watching
Giantbodybuilder.com
Section 408 Allegiant Stadium
Sandals Travel Agent Login
Best Town Hall 11
Tu Housing Portal
Blush Bootcamp Olathe
Mark Ronchetti Daughters
RUB MASSAGE AUSTIN
Aliciabibs
The Best Restaurants in Dublin - The MICHELIN Guide
Sukihana Backshots
Armageddon Time Showtimes Near Cmx Daytona 12
Sand Castle Parents Guide
Anderson Tribute Center Hood River
Florida Lottery Claim Appointment
Shell Gas Stations Prices
Breaking down the Stafford trade
Interminable Rooms
Euro area international trade in goods surplus €21.2 bn
300+ Unique Hair Salon Names 2024
Blog Pch
Wrentham Outlets Hours Sunday
Renfield Showtimes Near Regal The Loop & Rpx
Jesus Calling Oct 6
Latest Posts
Article information

Author: Nathanial Hackett

Last Updated:

Views: 6403

Rating: 4.1 / 5 (72 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Nathanial Hackett

Birthday: 1997-10-09

Address: Apt. 935 264 Abshire Canyon, South Nerissachester, NM 01800

Phone: +9752624861224

Job: Forward Technology Assistant

Hobby: Listening to music, Shopping, Vacation, Baton twirling, Flower arranging, Blacksmithing, Do it yourself

Introduction: My name is Nathanial Hackett, I am a lovely, curious, smiling, lively, thoughtful, courageous, lively person who loves writing and wants to share my knowledge and understanding with you.