Inter-VLAN Routing on a Layer 3 Switch
Layer 3 Switch Inter-VLAN Routing and Switched Virtual Interfaces (SVIs) is the modern way of configuring Inter-VLAN routing. An SVI is a virtual interface that is configured on a Layer 3 switch.
- An SVI Interface has been created for each VLAN (2 in total) VLAN10 and VLAN20
- The link between Switch 1 (G0/0/0) and Switch 2 (F0/1) is configured as a TRUNK (accepting and forwarding traffic to/from all VLANS)
- The link between Switch 1 (G0/0/1) and Switch 3 (F0/1) is also configured as a TRUNK (accepting and forwarding traffic to/from all VLANS)
- F0/10 on Switch 2 is an access port forwarding only VLAN10 tagged traffic, PC1 is on VLAN10 and connected to Switch 2 via F0/10
- F0/10 on Switch 3 is also an access port forwarding only VLAN20 tagged traffic, PC2 is on VLAN20 and connected to Switch 3 via F0/10
- VLANs are able to communicate with each other since the Layer 3 Switch S1 is acting as a router
| Port | MAC Address | VLAN |
|---|---|---|
| SW1 G0/0/0 | TRUNK | 10,20 |
| SW1 G0/0/1 | TRUNK | 10,20 |
| SW2 F0/1 | TRUNK | 10,20 |
| SW3 F0/1 | TRUNK | 10,20 |
| SW2 F0/10 | PC1 MAC | 10 |
| SW3 F0/10 | PC2 MAC | 20 |
An SVI is created for a VLAN that resides on the switch. Although virtual, the SVI is able to perform functions for a VLAN the same as a physical router interface would.
It processes Layer 3 packets that are sent to/from all switch ports associated with a particular VLAN.
It is recommended to use a Layer 3 Inter-VLAN solution since its much faster than a router on a stick setup since everything is hardware switched and routed.
There is also no need for external links from the switch to the router for routing and EtherChannels can be used as trunk links between switches to increase bandwidth.
Also, the overall latency is much lower since data will not have to leave the switch in order to be routed to a different network and will be switched right away
One disadvantage of this solution is that Layer 3 switches are more expensive.
[NOTE] A layer 3 switch can also be called a “Multilayer Switch” because of its abilities to operate at both Layer 2 and Layer 3.