cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
742
Views
20
Helpful
3
Replies

What are the functional differences between layer-3 switches and routers?

Viscid
Level 1
Level 1

Hi all,

From what I've used them for so far in studying and in class, layer-3 switches have basically just functioned as switches with the additional functionality of routing between VLANs. I was wondering what other, if any, functionalities they have added as compared to layer 2 switches? What separates layer 3 switches from routers?

Thanks for your time.

1 Accepted Solution

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

Hi,

Functionally, Layer-3 switches are routers in that they perform IP routing. However, the main difference lies in their construction: Layer-3 switches contain dedicated hardware that stores the routing table contents and performs lookups of IP addresses with extremely high speeds, independent of the CPU and the operating system. This allows Layer-3 switches to provide routing throughputs and latencies that are orders of magnitude better than routers. Routers perform all processes related to routing on their CPU as a part of their operating system code, and are thus much less efficient.

Everything has a price, though. Routers may be comparably slow to Layer-3 switches, and they have a poor port density (just a couple of Ethernet ports, as compared to tens of ports on Layer-3 switches), but because their operation is driven by software, they can be extended with new features relatively easily by upgrading their operating system. Layer-3 switches, on the other hand, benefit from a single-purpose dedicated hardware optimized for extremely fast lookups, but to implement a new feature basically means to develop a new version of the switch or a line card. Only a few Layer-3 switch platforms in Cisco's portfolio support NAT, for example - this operation is relatively complex to perform in hardware. The same goes for tunneling, encryption, etc.

So, from an end user's perspective, a Layer-3 switch is indistinguishable from a router - both have routing tables, both run routing protocols, both route IP packets. From a networkers perspective, however, Layer-3 switches provide much higher performance at the expense of flexibility in features.

Feel welcome to ask further!

Best regards,
Peter

View solution in original post

3 Replies 3

Peter Paluch
Cisco Employee
Cisco Employee

Hi,

Functionally, Layer-3 switches are routers in that they perform IP routing. However, the main difference lies in their construction: Layer-3 switches contain dedicated hardware that stores the routing table contents and performs lookups of IP addresses with extremely high speeds, independent of the CPU and the operating system. This allows Layer-3 switches to provide routing throughputs and latencies that are orders of magnitude better than routers. Routers perform all processes related to routing on their CPU as a part of their operating system code, and are thus much less efficient.

Everything has a price, though. Routers may be comparably slow to Layer-3 switches, and they have a poor port density (just a couple of Ethernet ports, as compared to tens of ports on Layer-3 switches), but because their operation is driven by software, they can be extended with new features relatively easily by upgrading their operating system. Layer-3 switches, on the other hand, benefit from a single-purpose dedicated hardware optimized for extremely fast lookups, but to implement a new feature basically means to develop a new version of the switch or a line card. Only a few Layer-3 switch platforms in Cisco's portfolio support NAT, for example - this operation is relatively complex to perform in hardware. The same goes for tunneling, encryption, etc.

So, from an end user's perspective, a Layer-3 switch is indistinguishable from a router - both have routing tables, both run routing protocols, both route IP packets. From a networkers perspective, however, Layer-3 switches provide much higher performance at the expense of flexibility in features.

Feel welcome to ask further!

Best regards,
Peter

Joseph W. Doherty
Hall of Fame
Hall of Fame

Disclaimer

The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages wha2tsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

Just to muddy the waters, vendors can confuse what's a L3 switch vs. what's a router.  For example, a 6500 and 7600 chassis were pretty similar because they can use some of exactly the same line cards and supervisors, and they even used to run the same IOS image.  Yet, the 6500 was a "L3 switch" and the 7600 was a "router".

Generally, a L3 switch has dedicated hardware for packet forwarding and is often feature poor compared to a "router".  It also, as Peter describes, often supports many ports, and those ports often support L2 switch features.

Router ports often don't support L2 features, and feature support is often much more, both hard (like non-ethernet) and soft (additional routing protocols or QoS features, etc.).  Do know, some "routers" will support L2 (and even L3) switch modules or ports.

BTW, when Peter notes routers can be slow compared to L3 switches, it's usually more a question of overall capacity.  For example, for the same price, a switch might support 48 gig ports at wire speed while a router might only support a pair of gig ports at wire speed.

Also know, some "routers" have special hardware to increase their capacity.  For example, the old 7200/7300 series with PXF, the old 7500 series with VIPs, and the current ASR1k series with its QFP.

Hi Joe,

Thanks for joining this thread - your answer is insightful as always!

Best regards,
Peter

Review Cisco Networking for a $25 gift card