0% found this document useful (0 votes)
8 views2 pages

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

This document discusses using a router-on-a-stick configuration to allow inter-VLAN routing using a single physical interface on the router. It would be expensive to use multiple physical interfaces to route between many VLANs. Instead, a single interface can be used by configuring subinterfaces on the router and enabling 802.1Q trunking between the router and switch.

Uploaded by

Michael
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

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

This document discusses using a router-on-a-stick configuration to allow inter-VLAN routing using a single physical interface on the router. It would be expensive to use multiple physical interfaces to route between many VLANs. Instead, a single interface can be used by configuring subinterfaces on the router and enabling 802.1Q trunking between the router and switch.

Uploaded by

Michael
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Understanding Inter-VLAN Routing

Suppose that there are two hosts communicating with


each other in VLAN 10 (which is also the same IP
subnet), but they cannot communicate with devices
outside their local VLAN without the assistance of a
default gateway. A router could be implemented with
two physical interfaces: one connecting to an access
port on the switch that is been assigned to VLAN 10,
and another physical interface connected to yet a
different access port that has been configured for yet a
different VLAN. With two physical interfaces and a
different IP address on each, the router could perform
routing between the two VLANs.
What Is the Challenge of Only Using
Physical Interfaces?
So here is the problem: What if you have 50 VLANs?
Purchasing 50 physical interfaces for the router would
be pricey, let alone the fact that you would also be using
50 physical interfaces on the switch. One solution is to
use a technique called router-on-a-stick. Consider
Figure 6-1. R1 has one physical interface physically
connected to the switch. So, from a physical topology
perspective, it looks like the router is a lollipop or a
“router on a stick,” and that is where it gets its name.
Using Virtual “Sub” Interfaces
To use one physical interface, we have to play a little
game, where we tell the switch that we are going to do
trunking out to the router, which from the switch
perspective looks exactly like trunking to another
switch. And on the router, we tell the router to pay
attention to the 802.1Q tags and assign frames from
specific VLANs, based on the tags, to logical subinterfaces.
Each sub-interface has an IP address from
different subnets, as shown in Example 6-11.
Example 6-11 Configuring Router-on-a-Stick and
Switch Support for the Router
! Enabling trunking on the switchport connected to
SW1(config)# interface Gi 0/1
SW1(config-if)# switchport trunk encapsulation dot
SW1(config-if)# switchport mode trunk
! Move to R1:
! Make sure the physical interface isn't shutdown
R1(config)# interface Gi 0/1
R1(config-if)# no shutdown
! Create a logical sub interface, using any number
! The sub interface is configured as "0/1.10" to c
R1(config-if)# interface Gi 0/1.10
! Tell the router to process any dot1q frames tagg
! this logical interface
R1(config-subif)# encapsulation dot1q 10
! Provide an IP address in the same subnet as othe
R1(config-subif)# ip address [Link] 255.255.255
! Verify that this router can ping devices in VLAN
R1(config-subif)# do ping [Link]
The HOST A computer needs to configure R1’s address
of [Link] as its default gateway when trying to reach
nonlocal networks (that is, VLANs other than VLAN
10).
You can repeat the process of creating additional
subinterfaces
on the router to support more VLANs until
the router has a sub-interface in every VLAN you want.

You might also like