Wiki DE Start in the browser

Wiki › Devices

Layer 3 switch

A switch that also routes: VLAN interfaces (SVIs) as gateways, routing between VLANs, DHCP relay, OSPF and VXLAN.

Layer
2 und 3
See an example
2 demos

What for

In company networks departments are separated with VLANs. For them to still talk to each other, routing between the VLANs is needed. A layer 3 switch does that itself: it is switch and router in one device and routes at hardware speed. It is the standard device in the core and distribution layer.

SVIs: one gateway per VLAN

For every VLAN the switch gets a virtual interface (SVI, switch virtual interface) with an address, e.g. interface vlan 10 with 10.10.0.1/24. This address is the default gateway of all devices in VLAN 10. With IP routing switched on, the switch routes between all SVIs.

Switch(config)# ip routing
Switch(config)# interface vlan 10
Switch(config-if)# ip address 10.10.0.1/24
Switch(config-if)# ip helper-address 10.99.0.10

ip helper-address turns the switch into a DHCP relay: it forwards DHCP requests from the VLAN to a central DHCP server (DHCP).

What else it can do

Static routes and dynamic routing (OSPF, RIP and RIPng, BGP), IPv6 on the SVIs with router advertisements, DHCP pools directly on the switch, access lists on ports and SVIs, VRF and, as a VTEP, VXLAN.

How to do it in leyoNET

The same text as in the app’s help (F1 key).

Layer 3 switch

A switch that also routes: one virtual interface (SVI) with an IP address per VLAN acts as the gateway. VLANs can then talk without an external router. With IPv6 every SVI also gets an IPv6 address and announces its prefix in the VLAN (IPv6).

See an example

  • Demo “Layer 3 switch and DHCP relay” in leyoNETDemo “Layer 3 switch and DHCP relay” in leyoNET
    Layer 3 switch and DHCP relay

    A core switch routes between three VLANs, the DHCP server is central.

    The SVIs relay DHCP; then notebook 1 pings the server across the VLAN boundary.

    Watch live Project file

  • Demo “IPv6 on the layer 3 switch” in leyoNETDemo “IPv6 on the layer 3 switch” in leyoNET
    IPv6 on the layer 3 switch

    The core switch has an IPv6 address per VLAN (SVI) and routes between the VLANs. Floor 1 gets addresses by SLAAC, floor 2 by DHCPv6.

    The SVIs send router advertisements over the trunks into their VLAN. Notebook 2 pings notebook 1 across the VLAN boundary, then notebook 1 opens the intranet by name (AAAA).

    Watch live Project file

“Watch live” opens the network in leyoNET, the simulation runs in a loop. In the app you find it under File → Demo networks, with a step-by-step tour.

Practise

  • ★★★☆☆ UE07 Layer 3 switch: routing with SVIs · 3 goals · Worksheet (German)
  • ★★★☆☆ UE08 DHCP on the layer 3 switch · 5 goals · Worksheet (German)
  • ★★★★☆ UE09 External DHCP: central server with relay · 6 goals · Worksheet (German)
  • ★★★★☆ Campus with layer 3 switch and fiber · 7 goals · Worksheet (German)

In leyoNET under Tools → Exercise catalogue. Every exercise checks itself.

Read on

Found a mistake or have an idea? Source of this page on GitHub.