What is SVI?
Switched Virtual Interface
An SVI (Switched Virtual Interface) is a virtual layer 3 interface on a switch for one VLAN, usually acting as that VLAN's default gateway.
A layer 2 switch moves frames within a VLAN but cannot pass traffic between VLANs; that needs routing. On a layer 3 switch, you create one SVI per VLAN (on Cisco-style platforms it's configured as interface Vlan10) and give it an IP address from that VLAN's subnet, such as 192.0.2.1/24. To the hosts in the VLAN, the SVI looks like a router port on their LAN, so they use its address as their gateway. To the switch's routing table, each SVI is a connected network, so the switch routes between VLANs internally, usually in hardware at full speed. An SVI has no physical port of its own; on many platforms it only comes up when the VLAN exists and at least one port in that VLAN is up.
SVIs are the usual alternative to router on a stick, where a separate router has one subinterface per VLAN on a single 802.1Q trunk. The concepts are identical, but the SVI keeps inter-VLAN traffic inside the switch instead of sending it up and back down one link. They are also distinct from a routed port, a physical switch port turned into a plain layer 3 interface with no VLAN, which is typical for links between switches in a routed fabric. Common problems: a VLAN with no active ports leaving its SVI down, forgetting to enable IP routing on the switch, and missing return routes on other routers for the subnets behind the SVIs. Pairs of switches often share a gateway address on their SVIs with VRRP. The Switching basics lesson routes between VLANs with a router on a stick, the same design an SVI implements inside the switch.
Lessons that use SVI
- Switching basics: layer 2, VLANs and IP addressingBeginner · 40 min
How a switch learns MAC addresses and floods broadcasts, how IP subnets and default gateways decide where packets go, how VLANs split a switch into separate networks, and how trunks and a router connect them. Built on a real switch, three PCs and a VyOS router.