Octet

What is the difference between a layer 3 switch and a router?

Show the answer

Say this first

Both route IP. A layer 3 switch routes in ASICs at line rate across many Ethernet ports at a low cost per port, but with limited route and ACL tables, small buffers and a narrow feature set. A router forwards in software or a network processor and is built for the edge: WAN interfaces, full BGP tables, NAT and IPsec at scale, deep buffers and per-flow shaping. In a campus the layer 3 switch routes between VLANs; the router or firewall sits at the WAN and internet edge.

Go deeper

Layer 3 switchRouter
ForwardingFixed-function ASICCPU or programmable network processor
PortsDense EthernetFewer, mixed: Ethernet, LTE, serial, SFP
Route scaleBounded by TCAMLarge, full internet tables on edge routers
FeaturesACLs, basic QoS, some NAT and MPLS on newer modelsNAT, IPsec, zone firewall, hierarchical shaping, SD-WAN
BuffersShallowDeeper
Cost per portLowHigh

The line is blurring. Campus switches now do VXLAN and some MPLS, data center switches hold large tables, and routers carry switch modules. The useful question is: what must this box do, at what scale, with which features in the forwarding path?

Traps

  • Saying a layer 3 switch cannot run routing protocols. It runs OSPF, EIGRP and BGP; the limits are scale and features.
How did you do?Book 3.5 Implementation