Inter-VLAN Routing
28 May 2022In this lab:
- Configuring separate VLAN interfaces on the router
- Utilizing a ‘Router on a Stick’ Topology
- Utilizing a layer 3 switch
Configuring separate VLAN interfaces on the router:
First we configure the defualt gateway IP addresses for the Sales and Engineering vlans on the two links connecting SW2 to R1. Now any traffic destined for an unknown network from the Sales or Engineering networks will be forwarded to R1.
R1
SW2
Don’t forgot to use no shutdown
on routers.
R1
Eng1 pinging Sales1 to verify inter-vlan communication.
Eng1
The vlans can communicate by routing all traffic to an unknown network to R1 the router.
R1 then routes the traffic out the appropiate interface for the specific vlan.
Since each vlan has their own link to the router there is no need to configure trunk links.
Utilizing a ‘Router on a Stick’ Topology
Working off the last configuration, we will now shutdown Fa0/1 so all inter-vlan traffic must pass through Fa0/0.
This will create the ‘router on a stick’ look and allows us to pass inter-vlan traffic through one link.
Therefore we don’t need to take up additional interfaces when configuring multiple vlans, as the router could run out of interfaces.
R1
Now in order to allow vlan traffic through Fa0/0 we need to configure sub interfaces on R1.
We will remove the ip address from the single link and create sub interfaces on the interface, giving them the default ip address for their specific vlans.
Also ensuring that the link is configured with the specific vlan encapsulation.
R1
Now we need to remember to reconfigure SW2 Fa0/1 as a trunk link.
Before we configured it as an access point since it was only sending vlan 10 traffic over.
Now it needs to send multiple vlan traffic and thus needs to be reconfigured from an access link to a trunk link.
SW2
Now we have connectivity.
Eng1
Utilizing a layer 3 switch
Configuring inter-vlan traffic on a layer 3 switch is simple.
- Enable layer 3 routing :
ip routing
- Configure vlan interface :
interface vlan <vlan#>
- Configure vlan interface ip address :
ip address <ip> <subnet>