Lukej2680 Tech Blog

Inter-VLAN Routing

This lab configures routing between the Sales and Engineering vlans created in the VLANs lab.

Topology pic

In 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

Gateway R1

SW2

Gateway SW2

Don’t forgot to use no shutdown on routers.

R1

No Shut R1

Eng1 pinging Sales1 to verify inter-vlan communication.

Eng1

seperate_interface_ping

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

shutdown_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

subinterfaces_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

trunk SW2

Now we have connectivity.

Eng1

router_on_a_stick_ping

Utilizing a layer 3 switch
Configuring inter-vlan traffic on a layer 3 switch is simple.

  1. Enable layer 3 routing                           : ip routing
  2. Configure vlan interface                       : interface vlan <vlan#>
  3. Configure vlan interface ip address    : ip address <ip> <subnet>
SW2

layer3_switch_config

This lab is a lab taken from Neil Andersons CCNA Udemy course. All work is mine however the lab itself is not my property.
All Labs were done using Cisco Packet Tracer.