Terminology: Switch vs Router
By stretch | Wednesday, January 19, 2011 at 3:38 a.m. UTC
In the course of their studies, many newbie networkers get hung up on the differences between a router and a switch, so I wanted to take a moment to offer modern definitions for the two terms.
Traditionally - I'm talking about a decade ago - a router was a device which made forwarding decisions at layer three and was software-based, whereas a switch was hardware-based and forwarded traffic based on layer two addresses. The two classifications have grown toward one another in recent years, with terms like "integrated bridging" and "multilayer switch" resulting in a significant amount of terminology overlap.
Helping to perpetuate the confusion are small office/home office (SOHO) devices which typically embed a switch within a router as is illustrated below. A similar design is found in enterprise routers employing Ethernet switch modules.
My advice to newbies is this: rather than relying on traditional definitions, a network device should be classified on its actual function in a network. The following are some of the major differentiating characteristics of routers and switches in modern networks.
- Forward packets based on information at layer 3 and above
- Establish network address translation (NAT) boundaries
- Terminate virtual circuits (VPNs)
- Encrypt and decrypt traffic
- Implement complex filters (stateful inspection, routing policy, etc.)
- Support modular physical interfaces of several types
- Forward packets (frames, if you prefer) primarily at layer 2
- Aggregate many connections into a few higher-bandwidth links
- Provide a much higher-throughput backplane
- Include mostly fixed copper or fiber Ethernet interfaces
You might have noticed that I did not include routing protocols on the routers list. This because often even edge switches will run a routing protocol if configured with routed interfaces.
Generally speaking, a device marketed as a router is always deployed as such. The confusion regarding device classification stems from multilayer switches (those with interfaces which can be configured to operate at layer two or at layer three). Again, classification should be made only considering the device's ultimate implementation.
As an example, consider an access edge device which aggregates a few dozen workstations to one or two routed distribution links through a VLAN interface (SVI). Though technically a router, the device can be readily recognized as fulfilling the duties of a switch.
A second example: suppose a multilayer switch such as the Cisco Catalyst 3560 is employed as a low-cost CPE device to terminate a Metro Ethernet link at the WAN edge. The switch serves only two or three routed links. Although designed as a switch, the device's role in this instance is primarily as a router.
In reality, terminology is never perfect, and it doesn't need to be. Avoid getting hung up on ambiguous labels and learn to classify devices by the roles they fill.
Posted in Design
January 19, 2011 at 5:45 a.m. UTC
s/device's roll in/device's role in/
Otherwise great to see clarification posts like this!
PS> Where is the IPv6?! :P
January 19, 2011 at 7:54 a.m. UTC
it's Layer 3! Like IPv4! :D
January 19, 2011 at 10:32 a.m. UTC
Excellent description of the difference.
January 19, 2011 at 11:19 a.m. UTC
And to add more chaos to definitions :-) MPLS is Miltiprotocol Label Switching because that's what router does - it looks into MPLS label rather than bothering with slow traditional Layer 3 IP lookup and sends packet to output interface as fast as it can. Cisco GSR - just the name "Gigabit Switch Router" sounds confusing enough. Or 7600s are often thrown to the same category as switches, they contain X tens of Ethernet ports and do switching work, but infact they are "7600 Series Routers" officially. (Okay I know this may be niche topic here or separate chapter, but still interesting enough to mention.)
January 19, 2011 at 9:21 p.m. UTC
"a router was a device which made forwarding decisions at layer three and was software-based, whereas a switch was hardware-based" .
I never really understood that and it gets more confusing in Multi layer switches (CEF, process switching etc..). Aren't those dedicated layer 2 ASICs running some sort of software? Or the structure of the TCAM isnt formed by the IOS?
January 20, 2011 at 3:47 a.m. UTC
In the world of Layer 3 switches and switching routers, another definition which works is that a switch by default has one VLAN domain per chassis, while a router has a VLAN domain per port...
January 20, 2011 at 8:10 a.m. UTC
I would mention use/amount of the expensive TCAM memory
January 20, 2011 at 8:33 a.m. UTC
Stretch, I would really appreciate (and a lot of people would benefit) if you would use the more traditional terminology (before the marketing people started to confuse everyone to promote their wares):
- ROUTER is a device performing layer-3 forwarding
- BRIDGE is a device performing layer-2 forwarding
A SWITCH can be anything, but usually performs the forwarding in hardware. We have layer-2 switches (aka bridges), layer-3 switches (aka routers), Frame Relay switches, ATM switches ...
We simply have to try to cut through all the marketing **** and instill the fundamentals into newbies. Once they get the difference between a ROUTER and a BRIDGE, they'll be able to analyze for themselves what a particular SWITCH does and how to use it.
January 20, 2011 at 2:51 p.m. UTC
For reasons I discussed in the article, the traditional terminologies are no longer sufficient. I also feel that the term "bridge" is antiquated. While technically correct, no one sets out to "buy a bridge" or "install a bridge" in their network.
The problem isn't marketing terminology so much as it is evolution of technology over the last couple decades.
January 20, 2011 at 4:00 p.m. UTC
When routers were imbedded into switches the term of "SwitchRouter" was also banded around for a while :0)
January 20, 2011 at 7:01 p.m. UTC
flintstone, I just came in here to say that same thing. When I get a smartypants customer that wants to have a brief understanding of "how all that stuff works", I find myself reaching for the term Switch-Router to describe that L2 and L3 functions are happening in the same device.
Also agree with Ivan, I tell n00bs to only think of a switch as a multi-port bridge.
January 21, 2011 at 7:51 a.m. UTC
while I agree with your good intentions, the problem we all have with "switch" is that the word is severely overloaded with incompatible meanings, making it ripe for marketing exploitation (read: confusing the customers).
If we teach the n00bs (to paraphrase @nick) what the different networking functions are, using totally unambiguous names like "routing" and "bridging", then we have a fighting chance that they might start using their brains to figure out what's actually going on when reading marketing collaterals.
If we give in and start using the word "switching" (emm ... yeah, it's actually bridging, but really fast ... unless it's on layer-3, when it's sort-of like routing, but still damn fast ... but wait, some boxes can do both and call it multilayer switching ... ah, and then there's ATM switching), the confusion is guaranteed.
Just my €0.02, as always ;)
January 21, 2011 at 1:32 p.m. UTC
nick, I believe that's how CCNA (CCENT respectively) starts, explaining network devices - repeater, hub, bridge, switch, and then defining switch as basically a group of bridges bound together. This goes all allong up until CCNP SWITCH exam where you meet multilayer switch for the first time. Router is defined as operating on Layer 3.
January 21, 2011 at 3:30 p.m. UTC
While I agree with Ivan that bridge is a more technically accurate term and that calling them switches leads to a lot of confusion, I can also see what Stretch is saying.
Whether we agree with it or not, the term "switch" is already embedded in our industry, and "bridge" has been antiquated. I don't think I've met anyone who would refer to a device like a 2960 as a "bridge". While I would love to see this change, I think the reality is that it's already engrained in network engineers to the point that a change isn't likely.
I think if we start teaching the "n00bs" that they should refer to them as bridges we will be setting them up for disappointment. The first time they try to have an insightful conversation with a seasoned network engineer and call the device a "bridge", they will either be "corrected" or possibly lose some credibility. I think they would be fighting an uphill battle as junior staff to try to get others to change to "bridge", especially when industry leaders like Cisco refer to them as switches not only in their marketing drivel, but also in their educational books and curriculum.
January 23, 2011 at 10:06 a.m. UTC
@Josh: got the point. Giving up on this particular windmills crusade; let the confusion rule!
January 23, 2011 at 4:23 p.m. UTC
like if we use Catalyst 6500 switch that is bundled with all the technologies as 7600 series routes... so it is quite confusing these days.
January 25, 2011 at 9:02 p.m. UTC
But, what's a "rooter"? Love working with British blokes & their rooters.
January 27, 2011 at 6:44 p.m. UTC
@Brannen: LMAO!! I hear that all the time too! Every time I hear it I think of roto-rooter.
March 8, 2011 at 5:09 p.m. UTC
Switching: The act of moving packets off of and back onto the wire.
Routing: Switching based on destination IP.
Firewalling: Inspection and filtering of traffic.
Forget about hardware nomenclature. Let's get a bit more fundamental. The fact is that most devices perform one or more functions. I am reminded of a collegue exclaiming, "It's a firewall, not a router!" My typical response being, "It's both and it's also a switch." My collegue just couldn't wrap his head around the fact that these functions could be physically integrated. So, my c2950 is a switch and my c7200 is a switch and a router and my asa is a switch and a router and a firewall.