Sections:
Overview:
Inter-VLAN Routing Options
Legacy Inter-VLAN Routing
The original Inter-VLAN routing method utilized an external router with multiple Ethernet interfaces configured in their own respective VLAN to support the hosts in that VLAN.
Pros
Cons
(ROAS) Router on a Stick
In a ROAS configuration, a single external router is used to route traffic between VLANs on a network. A single physical link is logically sub-divided into sub interfaces each corresponding to a different VLAN. The router uses 802.1Q encapsulation to distinguish different VLANs.
The physical link towards the switch is typically configured as a trunk link for the switch to carry multiple VLANs.
With sub-interfaces on the router, each is configured with its own IP address that will act as the default gateway for devices in that VLAN.
Pros
Cons
(SVIs) Layer 3 switches using SVIs
In a Layer 3 switch SVI configuration, a layer 3 switch is used to route traffic between VLANs through SVIs or Switched Virtual Interfaces. SVIs represent a either a VLAN gateway for hosts or a management interface for the switch and functions similarly to a router's interface but on a switch. The switch associates each VLAN with an IP address serving as the default gateway for hosts in that VLAN.
Pros
Cons
Lab Topology
Scenario:
Legacy Inter-VLAN Configuration
HQ-Core-SW1
Verify active trunks & vlans.
Assign access ports to the core switch uplinks towards the router and verify.
Gateway-R1
Assign IPs to the router interfaces supporting the default gateways of all VLANs.
PC Ping Tests to Gateways
VLAN 80 (Servers)
VLAN 10 (Engineering)
VLAN 20 (Finance)
VLAN 60 (MGMT)
Packet Captures
Gateway-R1 Gi0/0 (VLAN 10)
Gateway-R1 0/1 (VLAN 20)
Gateway-R1 Gi0/2 (VLAN 80)
Gateway-R1 Gi0/3 (VLAN 60)
(ROAS) Inter-VLAN Routing Configuration
Scenario:
HQ-Core-SW1
Assign uplink of the core switch a trunk role with the allowed vlans.
Gateway-R1
Configure sub-interfaces on the router and assign them a vlan and IP.
Sub-interfaces are configured by specifying the physical link identifier followed by a period then a number. Specifying the vlan number is best practice.
Sub-interface for VLAN 60 is set to the native vlan.
PC Ping Tests to Gateways
VLAN 80 (Servers)
VLAN 10 (Engineering)
VLAN 20 (Finance)
VLAN 60 (MGMT)
Packet Captures
Each packet is tagged with a 802.1Q header tag with the originating source VLAN.
VLAN 10 - Engineering to Gateway
VLAN 20 - Finance to Gateway
VLAN 60 - MGMT to Gateway
VLAN 80 - Servers to Gateway
(SVIs) Inter-VLAN Routing Configuration
Scenario:
HQ-Core-SW1
Configure SVIs & assign IP addresses & enable layer 3 routing.
Confirm all SVIs and routed port are in an up/up state.
Confirm port Gi1/0 is a layer 3 routed port.
Add a default route towards the gateway router performing NAT.
Gateway-R1
IP address configurations.
NAT (PAT) configuration.
Adding default route towards Internet & return route towards the VLAN subnets.
PC Ping Tests to Gateways
VLAN 80 (Servers)
Perform ping tests to the SVI gateway, PCs in different VLANs, & Internet.
VLAN 10 (Engineering)
Perform ping tests to the SVI gateway, PCs in different VLANs, & Internet.
VLAN 20 (Finance)
Perform ping tests to the SVI gateway, PCs in different VLANs, & Internet.
VLAN 60 (MGMT)
Perform ping tests to the SVI gateway, PCs in different VLANs, & Internet.
Packet Captures
Gi1/0 Routed Port - Core Switch to Router (Pre-NAT)
Gi0/0 Router Port - Router to Internet (Post-NAT - all traffic sourced from router)