Unit 2: Network Devices·Lesson 2.10 (10 of 10 in this unit)·15 of 104 in the Network Fundamentals course
Router vs Layer 3 Switch
Both devices can route, so why buy two? The answer is scale and features. This lesson shows what they share, where each is better, and where each belongs in a network.
Beginner · 9 min read · Before this: Routing vs switching, VLANs
Covers Inter-VLAN routing, SVIs and routed ports, Hardware vs software forwarding, WAN, NAT and VPN features and Where to place each.
Technical definition
A Layer 3 switch is a switch that can also route between networks and VLANs using IP addresses, with forwarding done in hardware. It combines the port density of a switch with basic router functions.
Router and Layer 3 switch: same routing, different job
On small screens, swipe sideways or focus the diagram and use the arrow keys.
The line between them has blurred: many routers have switch ports and many Layer 3 switches have routed ports. Pick by the job: dense LAN routing, or the WAN edge with its extra features.
What they share
Both devices make routing decisions with a routing table. They can learn routes statically or from routing protocols, route between networks and VLANs, apply access control lists and keep each routed interface in its own broadcast domain.
How a Layer 3 switch routes between VLANs
On a Layer 3 switch you create an SVI for each VLAN and give it an IP address, which becomes the default gateway for that VLAN. Traffic between VLANs is routed inside the switch, so it does not need to leave through a trunk to an external router. You can also turn a port into a routed port, a Layer 3 interface with an IP address, for links to other routers or switches.
Router and Layer 3 switch compared
On small screens, swipe sideways or focus the diagram and use the arrow keys.
Header row, topics and answers use different colours so each row reads across.
Where to place each
Use Layer 3 switches where many VLANs need fast routing between them, usually the distribution or core of a campus. Use a router, or a firewall that routes, where the network meets the outside world and needs NAT, VPN tunnels and WAN links. A small office often uses one device that does it all, but the roles are still distinct.
Test yourself
Predict · scenario 1
Hosts in VLAN 10 and VLAN 20 must talk at wire speed inside a campus. What fits best?
Predict · scenario 2
Which feature points to a router rather than a Layer 3 switch?
Predict · scenario 3
What is the IP address on an SVI used as?
FAQ
Can a Layer 3 switch replace a router?
Inside a campus, often yes: it can route between VLANs at wire speed. At the Internet or WAN edge you usually still want a router or firewall for NAT, VPN and WAN interface types.
What is an SVI?
A switched virtual interface is a logical Layer 3 interface for a VLAN. Its IP address acts as the default gateway for hosts in that VLAN.
Is a Layer 3 switch faster than a router?
For LAN routing between VLANs, usually yes, because forwarding runs in dedicated hardware. A router does more per packet, such as NAT and VPN, so it suits fewer, richer links.