Terminology within networking can sometimes get confusing. Networking has many different terms that can be used in different ways depending on the context and the related technologies being discussed.
Three of the most commonly used terms that can introduce some level of confusion are routing, forwarding, and switching.
In this article, we’ll discuss how these terms are used and what they mean in different contexts related to varying functionalities of networking devices.
Among the three terms, routing is arguable the most clear-cut regarding its meaning. Routing is the process of determining the best path for data packets to follow in order to reach their intended destination across different networks.
Routing occurs in devices operating at Layer 3 of the OSI model. These devices include routers, Layer 3 switches, firewalls, and wireless access points, to name a few.
They analyze the destination IP address found in the data packet’s header and consult their routing tables to determine the most efficient path to the destination.
Routing can be performed using static or dynamic methods, where static routing involves manually configuring the routes, while dynamic routing protocols, such as OSPF, EIGRP or BGP, can automatically update the routing tables based on network conditions.
A routing device is said to “route” a packet when it performs the following steps:
- The device receives an IP packet on one of its interfaces
- It decapsulates it up to Layer 3 and reads the destination IP address
- It consults its routing table to determine the egress interface out of which it should be sent
- It re-encapsulates it with the appropriate MAC addresses in the frame header
- It sends it out of the egress interface
This whole process is called routing, which occurs exclusively within a single Layer 3 device.
However, the term routing can also be used in a broader sense, where it refers to a network’s collective routing capabilities and mechanisms.
In this context, routing refers to the combined, coordinated effort of all routing devices within a network to get that packet to where it has to go.
The term “switching,” in its most commonly used meaning, refers to moving data packets within a single network segment or subnet at the OSI model’s Data Link Layer (Layer 2).
Switches are the devices responsible for this process. They use the destination MAC address of a data packet to determine the appropriate egress port to forward the packet.
Switches maintain MAC address tables to keep track of the devices connected to each of their ports. This process helps to reduce collisions and improve network efficiency by sending data only to the intended recipient rather than broadcasting it to all devices on the network.
However, “switching” can also be used more broadly, independent of any specific layer in the OSI model.
The term “switching” originated from the concept of switches used to control electrical current flow in electrical circuits. In an electrical circuit, a switch can connect or disconnect a current flow between different points in the circuit.
In telecom, this term was adopted initially by telephone switches which connected the caller to the appropriate called party based on the telephone number dialed.
Carrying the metaphor to data networks, a network device will switch data by performing the appropriate actions so that data that enters the device is sent out of the correct egress interface to get it to its intended destination, regardless of the Layer of the OSI model at which this takes place.
So generically speaking, a router will “switch” a packet from the ingress interface to a particular egress interface. Similarly, a switch will “switch” a frame from the ingress interface to a specific egress interface.
Whether the term is being used more broadly to refer to such a process in general or more specifically to refer to Layer 2 switching can be understood from the related context.
The term forwarding has similar connotations to both routing and switching. Forwarding is the actual process of moving data packets from the ingress port to the egress port of a networking device, such as a router or switch.
It involves examining the destination address of a data packet or frame, either the IP address or the MAC address, respectively, and determining the appropriate outgoing port based on routing or switching information.
Forwarding ensures that data packets are directed toward their intended destinations, enabling efficient and reliable communication between devices on a network.
One particular use of the term “forwarding” comes from a mechanism called Cisco Express Forwarding (CEF) which is a proprietary technology developed by Cisco to optimize the forwarding of IP packets.
The interesting thing here is the CEF is a mechanism primarily used by routers for Layer 3 switching. The use of the term “forwarding” in the acronym is noted here. And what is even more interesting is this quote from Cisco’s related documentation on CEF:
“Cisco Express Forwarding (CEF) switching is a proprietary form of scalable switching intended to tackle the problems associated with demand caching. With CEF switching, the information which is conventionally stored in a route cache is split up over several data structures.”
Notice that the terms forwarding, switching, and routing have all been used in some form in this description!
You can see how the meanings of the terms do indeed overlap, depending upon the context, and must be deciphered based on the background of their particular usage.
The following table helps to further categorize the meaning of each term in the varying contexts in which they are typically used:
|Layer 3 devices||The process of determining the best path using IP addresses and routing tables.||The act of moving data that arrives on an ingress interface to the appropriate egress interface.||The mechanisms involved in moving data that arrives on an ingress interface to the appropriate egress interface.|
|Layer 3 networks||The collective operation of moving packets to their intended destinations within a network composed of multiple Layer 3 devices, using IP addresses and routing tables.||–||–|
|Layer 2 devices||–||The act of moving frames within a single network segment or subnet from the ingress interface to the appropriate egress interface.||The mechanisms involved in moving frames within a single network segment or subnet at Data Link Layer (Layer 2) from ingress to egress interfaces, based on the destination MAC address and the MAC address table.|
As telecom and networking professionals, it is important for us to be able to communicate in a manner that is understandable by others and to comprehend the multiple meanings that terms often have in different contexts.
For this reason, grasping the nuances in the meanings of these three particular terms is an important part of achieving this level of communication and comprehension, making both your job easier and that of your partners, coworkers, and collaborators.
- Comparison of Fiber Optic vs Copper Ethernet Cables in Networking
- Understanding IP Prefix Lists in TCP/IP Networks (With Cisco Examples)
- The Purpose of Routing Protocols in TCP/IP Networking
- What is a Wildcard Mask – All About Wildcard Masks Used in Networking
- What is Asymmetric Routing – Causes and Problems in Networks