Discussion: Router vs. Layer 3 Switches

2023 SEASON SALE Networking and Security Showcase In-stock ICT products at exclusive discounts

When a router receives a packet, it looks at the Layer 3 source and destination addresses to determine the path the packet should take. A standard switch relies on the MAC addresses to determine the source and destination of a packet, which is Layer 2 (Data) networking.

Generally speaking, a Layer-3 switch (routing switch) is primarily a switch (a Layer-2 device) that has been enhanced or taught some routing (Layer 3) capabilities. A router is a Layer-3 device that simply do routing only. In the case of a switching router, it is primarily a router that may use switching technology (high-speed ASICs) for speed and performance (as well as also supporting Layer-2 bridging functions).

The fundamental difference between a router and a Layer 3 switch is that Layer 3 switches have optimized hardware to pass data as fast as Layer 2 switches, yet they make decisions on how to transmit traffic at Layer 3, just like a router. Within the LAN environment, a Layer 3 switch is usually faster than a router because it is built on switching hardware. In fact, many of Cisco’s Layer 3 switches are actually routers that operate faster because they are built on “switching” hardware with customized chips inside the box.

 

Examples: Layer 2 switches, Layer-3 switches or routing switches and Routers

Layer-2 switches
Cisco: Catalyst 2950, 2960 series

Layer-3 switches or routing switches
Cisco:
Catalyst 3550, Cisco 3560, 3750, 4500, Cisco 6500 series
Juniper: EX series

Routers (with some bridging and/or security features) or switching routers
Cisco: 1800, 1900, 2600, 2800, 2900, 3700, 3800, 3900, 7200, 7600, ASR 1000 series
Juniper: MX series, J series, M series

Notes: The current Cisco Catalyst layer-3 switches are 3560, 3750, 4500 series, 4900 series, and 6500 series.

To understand better of switching router and routing switch differences, following is an illustration. In early Cisco switches (i.e. Catalyst 3500 switches), there are only basic Layer-2 capabilities such as bridging and switching. With newer models (i.e. Catalyst 3550 or 3560 switches), there are also some routing capabilities such as terminating multiple Layer-3 interfaces and running dynamic routing protocol. In router world, early Cisco routers (i.e. 1600 or 2500 model), there are only basic Layer-3 capabilities such as running dynamic routing protocol, terminating Serial ports, and running non-IP protocols such as IPX and SNA. With newer models (i.e. 1700, 1800, 2600 or 2800 models), there are also some Layer-2 capabilities such as bridging and switching. In addition there are some WIC (WAN Interface Cards) and NM (Network Modules) with Ethernet ports supporting bridging and switching in those newer router models even further such as WIC-4ESW Ethernet Switching card for 1700 series, HWIC-4ESW High-Density Ethernet Switching card for 1800 and 2800 series, and NM-16ESW Ethernet Switching module for 2600 and 2800 series.

As a broad category, routing switches use hardware to create shortcut paths through the middle of the network, by bypassing the traditional software-based router. However, unlike traditional routers that utilize general-purpose CPUs for both control-plane and data-plane functions, Layer-3 switches use high-speed application specific integrated circuits (ASICs) in the data plane. By removing CPUs from the data-plane forwarding path, wire-speed performance can be obtained. This results in a much faster version of the traditional router. In Cisco world, this routing switch ASIC technology implementation as example applies to Catalyst 6500 switch series. These kind of switches are typically blade or module based switch which you have to specify which “switch brain” (called Supervisor Engine in Cisco world) and which port modules you like the switch to have.

In the case of a switching router as primarily a router that uses switching technology (high-speed ASICs) for speed and performance (as well as also supporting Layer-2 bridging functions), there are Cisco 7600 series and Juniper MX series routers as examples. These kind of routers are typically blade or module-based router which you have to specify which “router brain” (also called Supervisor Engine in Cisco world) and which port modules you like the router to have.

Further, the Cisco 7600 series router Supervisor Engine modules are compatible with the Cisco Catalyst 6500 series switch due to identical architecture between the router and the switch. In other words, you could use the same Supervisor Engine model on either Cisco 7600 series router or Catalyst 6500 series switch.

 

Discussion: Router vs. Layer 3 Switches  —from Cisco learning home

Q: As we all know that Layer 3 switch can perform the routing tasks if routing is enabled. But I`ve some questions regarding this:

1. What is the main difference between this two?

2. What is the choosing criteria between this two i.e. when should I use which one? What’s about the cost effects?

3. Why router is needed if there is existence of Layer 3 Switch?

Re1: L3 switches do not have WAN interfaces.

You can connect Ethernet circuits to a switch so you only need a router if you want to connect traditional circuits such as E1 E1 SDH or old technology such as X21 V35 or async circuits. As far as I know Call Manager Express does not run on a switch but does on a router. Switches support Wi-Fi controller, Firewall so are quite powerful. So you need to understand the business requirement before deciding router or switch. Also routers can include switch modules.

Re2: If it routes, it’s a router.

L3-switch is a marketing term.  It’s a router with only Ethernet interfaces and lots of them.  It also has a switching function to it. Which makes it both a router and a switch? The differences will vary based on model.  It depends…  Cost varies as well, everywhere from inexpensive to very expensive! And truly there isn’t a “need”. You need an L3 device of some sort to exit your subnet. How you design that, or what specific piece you use is entirely up to you.

Re3: Traditionally, Routers were devices that connected the LAN to the WAN and switches were just LAN devices and you may add a layer 3 switch to the lan if you had some vlans and didn’t want to use a router.

However, as technology changes, the tradition of the WAN and LAN are fading.  My “WAN” links are actually 1 gig single mode fiber circuits that terminate to an ethernet fiber interface on a Layer 3 switch, a 6500, 4500, 3750 or even a 3560.  Now some will say that I have a MAN with those kinds of links.  It seems that as Scott said, Cisco Marketing is still stuck on calling a router a device that terminates a traditional WAN link,  I do agree that if the device routes, it is a router…. to some degree.

One thing I did notice regarding routers and layer 3 switches, and I will admit that router model and IOS version may play very heavily into this, and that is Routers seem to support more traffic monitoring features, such as netflow and nbar where as Layer 3 switches don’t seem to have that kind of support…. until you get to the 6500.

Re4: Technically, the differences are:

1- L3 Switch do switching at layer 3 by preserving the source and destination mac and preserving the TTL value of the IP header of the 1st routed packet, so the first packet is routed using normal routing lookup, but after that all packet are switched.

2- router do normal routing lookup, but by introducing fast switching and CEF, packets are also now switched on a router.

3- Switches doesnt support some QoS features.

4- Switches doesnt support NAT.

5- The forwarding on switches is done on ASIC (Application Specific Integrated Circuits) which is done in hardware rather than a software.

6- Forwarding on routers are done in a software.

7- router supports different WAN technologies (modules) unlike switches.

Re5: I was just thinking about this.  I didn’t learn about Layer 3 switches until the bcmsn.  I know in CCNA they were still really pushing the router vs switch concept.  Talk about throwing a monkey wrench into things when you throw in the concept of Layer 3 switch.

So to review:

1. A pure router will do just that, typically no switch ports, in today’s cisco world I don’t even know if they make one of these, wouldn’t that be something like an ASA with 1 or (2) 100 mb or gig ports with a serial port or similiar?

2.  A switch will just allow connections to edge devices, a true layer 2 switch like a 2960, Int vlan’s is what allows management of the switch at layer 3.  No routing between vlans, this is where router on a stick comes into play.

3.  A layer 3 switch integrates both abilities, but it depends on the model on how integrated and featurific it is.  Will it support netflow?  Will it route between vlans?  If you do a show ip route what will be displayed?  How does it implement vlans, is it traditional vlan.dat file or will it do the switching way with show vlan? — The simplest true layer 3 switch will support all switching features, but have the ability to do routed ports and route between the vlans.  I have had a Integrated services router like a 1760 or 3725 or similiar where they had a small switch module, say 4-24 (100).

The definition of a layer 3 switch also may include the ability for a port to be either a routed port or a switched port, the commands switch port vs no switch port followed by having to assign it an ip address.

This is another point that also took some getting used to.  In a port that can be either layer 2 or layer 3, or strictly layer 3 or layer 2.    Example, a router can only do layer 3, so to do inter vlan routing  while connecting to another switch via  trunk port you have to give it sub interfaces to a physical switch port, give each one its own ip address and tag it with the encapsulation dot1q #.  Router on a stick, vs. switchport mode trunk command with layer 3 interfaces via the “int vlan 1” with an ip address assignment.

While I understand the ccna approach to teaching fundamentals and where thing started, it no doubts confuses someone especially when a question asks about the differences between a hub/switch/router.  In today’s world, hubs don’t really exist, and in a large company odds are you’re going to be using a layer 3 switch.

Re6: Not sure that is accurate. I think most layer 3 switches can handle BGP, but to what extent? Full tables? Probably not. Dishing out money for 2 Cisco 2821’s or Cisco 2921’s is going to be way cheaper than purchasing another Cisco 6500 for our network….not to mention our Catalyst 6500 already does a lot of work…and now I am going to throw BGP at it….AH it would just shut off and give me the middle line card!

 

More Notes: Layer 2 and Layer 3 Switch Evolution

…To be continued…


 

Share This Post

Post Comment