Inter-VLAN Routing
Table of Contents
Overview: ........................................................................................................................................ 1
Inter-VLAN Routing: ........................................................................................................................ 1
Inter-VLAN routing methods: ......................................................................................................... 1
Legacy inter-VLAN routing:............................................................................................................. 1
802.1Q Encapsulation:.................................................................................................................... 2
Router-on-a-stick: ........................................................................................................................... 3
Topology Diagram for Router on a Stick: ....................................................................................... 3
R1 Running Configuration: ............................................................................................................. 4
SW Running Configuration: ............................................................................................................ 5
PING from VPC4 to VPC5 : .............................................................................................................. 5
PING from VPC5 to VPC7: ............................................................................................................... 6
Layer 3 switch using Switched Virtual Interface (SVI) .................................................................... 6
Topology Diagram for Multi-Layer Switch: .................................................................................... 7
SW Running Configuration: ............................................................................................................ 7
PING from VPC4 to other PC’s: ....................................................................................................... 8
Overview:
In this lab performed inter-VLAN routing. Now for communicating across the VLAN we have two
different methods first one is router on a stick, and another is using Layer 3 switch So I have
demonstrated inter-VLAN routing using both methods.
Inter-VLAN Routing:
VLANs are used to segment switched Layer 2 networks for a variety of reasons. Regardless of the
reason, 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.
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. VLANs
make it easier for one to segment a network, which in turn improves the performance of the
network and makes it more flexible, since they are logical connections.
Inter-VLAN routing methods:
Legacy inter-VLAN routing:
In this method, multiple router interfaces are used, each connecting to a switch port in different
VLANs. These interfaces are served as default gateways, which requires additional cabling when
the network has to be expanded.
Hence, adding additional network cables and improving infrastructure is more expensive.
1
802.1Q Encapsulation:
If you want to VLAN traffic between switches we have to use a trunk. A trunk connection is simply
a normal link but it is able to pass traffic from different VLANs and has a method to separate
traffic between VLANs. Here’s an example:
As you can see we have computers on both sides and they are in different VLANs, by using trunks
we can make sure all VLAN traffic can be sent between the switches. Because our regular Ethernet
frames don’t have anything to show to which VLAN they belong we will need another protocol.
2
There are two trunking protocols:
802.1Q: This is the most common trunking protocol. It’s a standard and supported by many
vendors.
ISL: This is the Cisco trunking protocol. Not all switches support it.
Let’s take a look at 802.1Q:
Here’s an example of an 802.1Q Ethernet frame. As you can see it’s the same as a normal Ethernet
frame, but we have added a tag in the middle (that’s the blue field). In our tag you will find a
“VLAN identifier” which is the VLAN to which this Ethernet frame belongs. This is how switches
know to which VLAN our traffic belongs.
Router-on-a-stick:
In this method, unlike the legacy routing, one physical interface port is used for routing the traffic
between the network segments. The network administrator doesn’t need to create separate
VLAN interfaces like fa0/1 to fa0/10.
Instead, all the interfaces from 1 to 10 are created with a single interface. This method is simple
to implement and used for small to medium-sized networks. On single interface multiple sub
interfaces are created.
R1 interface Ethernet 0/1 is the interface on which we make sub interfaces this interface between
router and switch is a trunk port. While the ports the connected from Switch to the PC’s are
access ports and are made part of that particular VLAN.
3
Topology Diagram for Router on a Stick:
R1 Running Configuration:
4
SW Running Configuration:
5
PING from VPC4 to VPC5:
PING from VPC5 to VPC7:
6
Layer 3 switch using Switched Virtual Interface (SVI)
This method of inter-VLAN routing that uses layer 3 multilayer switch and Switched Virtual
Interfaces (SVI) for communication across VLAN’s. SVIs are created for VLANs exists on the switch
which performs the same function for the VLANs as that of a router. Layer 3 switches are
expensive, which are primarily suitable for large organization networks.
Topology Diagram for Multi-Layer Switch:
SW Running Configuration:
7
PING from VPC5 to other VPC4:
8
PING from VPC7 to other PC’s: