What is Switch Virtual Interface (SVI) – Everything to Know

In the earlier networking period, the Layer 2 switch was the fastest device for forwarding data, just as data was physically received and forwarded onto other ports. The router was comparatively slow in the process.

The network engineer thinks about extending the switch portion into access, distribution, and core layers as much as possible. When they extended the layer 2 switches to these layers, they created loop issues.

To solve this problem, the engineers used the spanning-tree protocol, which still enables flexibility and redundancy in inter-switch connections. With the development of technologies, routers became faster and cheaper, so routing became possible at wire speed.

Therefore, the router has transferred to the core and distribution layers without affecting the network’s performance. 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 requires a unique IP address matching each access switch VLAN. The Layer 3 routed ports are used between the distribution and the core layer switch. The engineers are not dependent on the spanning tree protocol because there are no physical loops in the layer 2 portion of the topology.

Switch Virtual Interface (SVI)

We can configure a switch virtual interface (SVI) for both a multilayer switch and a Layer 2 switch for a VLAN that exists on that switch. However, only the multilayer (layer 3 supported) switch can do inter-VLAN routing.

The Switch Virtual Interface is not a physical port; therefore, it’s called a virtual interface. It functions on a multilayer switch like a router interface and can be configured similarly.

The SVI provides layer 3 processing for packets to all associated hosts of that VLAN. Whenever you want to configure the SVI, ensure that the particular VLAN exists 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. We required SVI for the following reasons.

  • 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 required inter-VLAN routing using a switch virtual interface (SVI). The configuration steps are the 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, the switch builds its routing table over the IP address information on its 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, we can configure the switch virtual interface (SVI) interface for both Layer 3 and Layer 2 switches, but the difference is the “ip routing.” On layer 2 switches, we use the switch virtual interface (SVI) only for remote switch management.

We can verify the interface configuration by using the “show ip interface brief” command. Just like we use the command for router interface verification.

The command will show all ports and the switch’s virtual interface. We can also use the “show interfaces” command to see all ports and the VLAN interface. If we want the 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.

Advantages

  • The switch virtual interface (SVI) is faster than router-on-a-stick because everything is hardware switched and routed.
  • It does not require any external links from the switch to the router for routing.
  • In this method, the limitation of one link is over because we can use Layer 2 Ether Channels between the switches to get more bandwidth.

Disadvantages

The only disadvantage of layer 3 switches is that they are too costly.