Multilayer switch

Also known as: Layer 3 switch

On this page 7

A multilayer switch is a network switch that forwards Ethernet frames by MAC address and also routes IP packets between subnets, performing both decisions in dedicated forwarding hardware at wire speed. In Ethernet & switching it is often called a Layer 3 switch, because its defining extra capability is routing at the network layer of the OSI model.

Multilayer switches became the standard building block of campus distribution and core layers and of data center fabrics. They replace the older design in which a separate router, attached through a single trunk, carried all traffic between VLANs, a pattern known as router on a stick that quickly turned into a bottleneck.

How a multilayer switch forwards and routes

A multilayer switch separates its work into a control plane that builds tables in software and a data plane that applies them in silicon. The control plane runs routing protocols such as OSPF or BGP, learns neighbors through ARP and IPv6 Neighbor Discovery, and then programs the resulting forwarding entries into the switching ASIC.

For each incoming frame, the ASIC first checks whether the destination MAC address belongs to the switch itself. If it does not, the frame is bridged within its VLAN using the MAC address table. If it does, the packet is routed: the chip looks up the destination IP address, decrements the TTL or hop limit, rewrites source and destination MAC addresses and recalculates the checksum before sending the frame into the egress VLAN.

These lookups rely on two memory types. CAM supports exact-match searches for MAC addresses, while TCAM (ternary content-addressable memory) supports longest-prefix matches and access control entries in a single clock cycle. The table below shows which memory serves which lookup.

TableMemory typeLookup keyPurpose
MAC address tableCAM or hash tableVLAN and destination MACLayer 2 bridging
Forwarding information baseTCAM or algorithmic memoryLongest IP prefixLayer 3 next hop
Adjacency tableSRAMNext-hop identifierRewrite MAC and egress port
ACL and QoS tableTCAMAddresses, ports, protocolFilter, mark or police traffic
Hardware tables inside a multilayer switch

Interfaces that provide routing between VLANs

Routing on a multilayer switch is attached to logical or physical Layer 3 interfaces, each holding an IP address that serves as a gateway. The most common is the switched virtual interface (SVI), a virtual interface bound to one VLAN that acts as the default gateway for hosts in that VLAN.

Interface typeConfiguration ideaTypical use
Switched virtual interfaceIP address on a VLAN interfaceGateway for an access VLAN
Routed portPhysical port with switching disabledPoint-to-point uplink to a router
Routed port channelAggregated links with one IP addressResilient high-capacity uplink
SubinterfaceTagged logical interface on a routed portSeveral routed links on one cable
Loopback interfaceAlways-up virtual addressRouter ID and management
Layer 3 interface types on a multilayer switch

Because the gateway lives on the switch, traffic between two VLANs on the same chassis never leaves the device. Gateway redundancy is usually added with VRRP or HSRP, so that a second switch takes over the virtual gateway address within seconds if the first one fails.

Multilayer switch compared with router and Layer 2 switch

A multilayer switch sits between a plain Layer 2 switch and a router: it offers far higher port density and routing throughput than a router of similar price, but usually fewer WAN features and smaller route tables. The comparison below highlights the practical differences.

PropertyLayer 2 switchMultilayer switchRouter
Forwarding decisionMAC address onlyMAC and IP addressIP address and policies
Inter-VLAN routingNot supportedIn hardware at line rateOften in software or NPU
Port densityHighHighLow to moderate
WAN interfaces and NATNoneLimited or absentExtensive
Route table capacityNot applicableThousands to a few hundred thousandUp to full Internet tables
Device roles compared

The phrase multilayer also covers devices that inspect Layer 4 port numbers for access control lists, QoS classification and load sharing. Some vendors once marketed Layer 4 to Layer 7 switches, but modern usage generally means a Layer 3 switch with Layer 4 awareness.

Where multilayer switches fit in network design

Network architects place multilayer switches wherever many VLANs must be routed with low latency. In a three-tier campus, the distribution layer terminates access VLANs and routes toward the core; in a collapsed core, one pair of multilayer switches performs both roles.

SituationRecommended placementReason
Small office, few VLANsRouting on the core switchAvoids a separate router for internal traffic
Campus with many buildingsRouting at the distribution layerLimits broadcast domains per building
Data center leaf and spineRouting at every leaf switchRemoves Spanning Tree from the fabric
Internet edge with NATDedicated router or firewallNeeds stateful and WAN functions
Choosing where to route

Pushing routing down to the access or leaf layer, a design called routed access, shrinks every broadcast domain to one switch and allows equal-cost multipath routing across uplinks instead of blocked redundant links.

Limitations and common configuration mistakes

The main hard limit is TCAM capacity. When routes, ACL entries or IPv6 prefixes exceed the hardware tables, the switch may punt packets to the CPU, where forwarding slows by orders of magnitude, or it may drop new entries entirely. Capacity planning must therefore include IPv4, IPv6 and ACL scale together.

  • Routing disabled globally: many platforms require ip routing before SVIs forward between VLANs.
  • SVI stays down: an SVI is up only when its VLAN exists and has at least one active port.
  • Wrong host gateway: hosts that point to another address bypass the switch and send traffic off-path.
  • Asymmetric routing with redundancy: mismatched VRRP and Spanning Tree roots cause suboptimal paths.
  • Licensing gaps: advanced protocols such as BGP may need a higher software license tier.

In plain words

Think of an office building where each floor is a separate department. An ordinary switch is like a hallway that lets people on one floor reach each other. To visit another floor, they once had to walk to a separate building, the router, and come back.

A multilayer switch puts the elevator inside the building. It still connects people on the same floor, but it also moves them between floors quickly, without the long detour. The result is faster communication between departments with fewer devices.

A real-world example

A secondary school network has separate VLANs for staff, students, printers, security cameras and guest Wi-Fi, all previously routed by one small router over a single 1 Gbit/s trunk. During exams, file transfers between the student VLAN and the file server VLAN saturated that trunk, and logins slowed to more than a minute.

The network team installs a pair of multilayer switches as the core, creates an SVI for each VLAN and uses VRRP for the gateway addresses. The router now handles only Internet traffic and NAT. Traffic between VLANs is routed at line rate inside the core switches, uplinks run at 10 Gbit/s, and login times fall to a few seconds even at peak load.