VLANs
Switched virtual interface
A switch's own address inside a VLAN: the VLAN's gateway when the switch routes.
The problem
carol, in engineering, needs to reach alice, in sales, but the building has no router, only two switches.
- coreSwitch gets a card in each VLAN on its own bridge:
br0.10with10.0.10.2,br0.20with10.0.20.2. Each is a switched virtual interface (SVI). - Each SVI is its VLAN's gateway: carol's default route points at
10.0.20.2. - With forwarding on, coreSwitch routes carol's packet out of VLAN 20 and into VLAN 10: a layer 3 switch.
- alice's reply goes back the same way, through
10.0.10.2: no extra cable, no separate router.
What you'd see
$ ip -br -4 addr show
br0 UP 10.0.1.2/24
br0.10@br0 UP 10.0.10.2/24
br0.20@br0 UP 10.0.20.2/24
br0.30@br0 UP 10.0.30.2/24
- Run on coreSwitch.
br0 10.0.1.2/24: the bridge itself, the switch's own address in VLAN 1, used to manage it.br0.10@br0,br0.20@br0,br0.30@br0: one SVI per VLAN, a VLAN card on the bridge, each holding that VLAN's gateway address.
Guess first
carol runs traceroute -n 10.0.10.10 to alice. How many hops does it list?
Show answer
Two: 1 10.0.20.2, coreSwitch's engineering SVI, then 2 10.0.10.10, alice. The switch counts as a router hop.
In short
A switched virtual interface (SVI) is a switch's own IP address inside a VLAN, which the hosts there use as their
gateway. With an SVI in several VLANs and routing on, the switch is a layer 3 switch: it routes between VLANs
itself, with no router on a stick. On IOS: ip routing, interface vlan 10, ip address …. Without routing, one SVI
is just the switch's management address.