In the earlier period of networking the Layer 2 switch was the fastest devices for forwarding data just like the data is physically received and forward onto other ports and the router was comparatively slow in the process. The network engineer thinks about to extend the switch portion into access, distribution and core layer as much as possible. When they extend the layer 2 switches to these layers they created loop issues. To solve this problem, the engineers used the spanning-tree protocol but it is still enabling flexibility and redundancy in inter-switch connections. With the development of technologies the router became faster and cheaper, So, the routing becomes possible at wire speed.
Therefore router has transferred to core and distribution layers without affecting the performance of the network. The users are distributed into separate VLANs and subnets, and the network engineers start configuring the distribution swathes as layer 3 gateways for the users of access switch VLANs. So, each distribution switch required its own unique IP address matching to each access switch VLAN. The Layer 3 routed ports are uses between the distribution and the core layer switch. The engineers not dependant on spanning tree protocol because there are no physical loops in the layer 2 portion of the topology.
We can configure switch virtual interface (SVI) for both on multilayer switch and Layer 2 switch for a VLAN that exists on that switch. But only the multilayer (layer 3 supported) switch can do inter-VLAN routing. The Switch Virtual Interface is not a physical port, therefore, its called a virtual interface. It is functioning on multilayer switch just like router interface and that can be configured in the same way as a router interface. The SVI provides layer 3 processing for packets to all associated hosts of that VLAN. Whenever you want to configure the SVI, ensure the particular VLAN existence on the switch. In the figure above, the switch must have VLAN 100 and VLAN 200 in the VLAN database if not, the SVI interface stays down. The reason for that we required SVI are following.
To offer a gateway for a VLAN.
Providing Layer 3 IP connectivity to the switch
To support routing protocol and bridging configurations
The topology consisting of two VLANs which required inter-VLAN routing using a switch virtual interface (SVI). The configuration steps are following.
We enable routing on the switch using “IP routing”. If routing is not enabled on the switch we can’t communicate with other VLANs. With this command, switch build its routing table over the IP address information on the switch virtual interfaces. We can verify the ip routing configuration using the “show ip route” and “show startup-config” commands. The figure below illustrates the switch routing table.
As I said earlier that we can configure the SVI interface for both Layer 3 and Layer 2 switches, but the difference is the “ip routing”. On layer 2 switches, we use the SVI only for remote management of the switch.
We can verify the interface configuration by using the “show ip interface brief” command. Just like we are using the command for router interface verification. The command will show all ports and virtual interface of the switch. We can also use the “show interfaces” command if we want to see all ports and VLAN interface. If we just want required interface, we can use the command with interface ID, such as, “show interfaces vlan 100”, this command will only display the settings of interface VLAN 100. For the other commands, you can read my earlier articles.
- The SVI is faster than router-on-a-stick because everything is hardware switched and routed.
- It is not required any external links from the switch to the router for routing.
- The limitation of one link is over in this method because we can use Layer 2 Ether Channels between the switches to get more bandwidth.
The only disadvantage of layer 3 switches, it is too much.
Switch Virtual Interface – Inter-VLAN Routing Configuration