Networking Fundamentals: Differences Between Switching and Routing

ceflayer2layer3routingswitching

I have seen quite a few discussions regarding MPLS stating things like:
MPLS combines the performance and capabilities of Layer 2 (data link layer) switching with the proven scalability of Layer 3 (network layer) routing.
Additionally, i have also heard technical discussions around switching vs routing.
They say switching is faster than routing.I have the below questions:

Q1: Is switching actually faster than routing? If so, how?

Q2:Hardware is faster than software.Is that true ?

Q3:I know that derivations of CEF,Fast switching are made using above concepts.
How does this actually fit in ? I read the differences b/w CEF,Fast Switching and Process Switching, but i could not get a clear cut picture.

Q4: How is MPLS taking advantage of the switching vs routing speeds?

Best Answer

Don't equate marketing literature with technical discussions :-)

Let me answer your second question first:

Hardware is faster than software, in practically all cases. When we say "hardware," we mean devices that are purposely designed to forward packets as fast as possible. The usual limitation is the physical properties of the integrated circuit technology. Software, on the other hand, uses a general purpose processor that has to perform several operations in order to forward a packet (read data, move it to another part of memory, perform some calculations, move it again, etc). This is generally significantly slower that hardware-based systems.

The switching vs. routing debate is largely moot in modern networks. Once upon a time, routers did their forwarding in software, but modern enterprise routers use hardware and software in combination to forward packets at line rate - that is, as fast as they are received. So essentially, there is no difference between routing and switching. That is one reason you will see the term "layer 3 switches" used. It's partly a marketing effort to make them "sound" faster.

Questions about CEF, fast, and process switching have been asked and answered here already, so I won't repeat them.

So your last question assumes there is a major difference between routing and switching -- but as you can see, there isn't any longer.

Related Topic