Routing is the transportation of data across a network where the data passes through at least one intermediate device.
Routing and bridging are often compared as they appear to carry out the same function. However, there is one distinct difference. Bridging occurs at the OSI Layer 2 (Data Link Layer) and utilises MAC addresses, whilst routing occurs at the OSI Layer 3 (Networking Layer) and utilises IP addresses.
Routing involves two basic functions:
- Determining optimal routing paths; and
- Transporting information through a network.
In the context of the routing process, the latter is referred to as packet switching.
Routing protocol uses metrics derived from path variables such as: bandwidth, cost, hop count, load and delay to discover the optimal path to a destination. Routing protocols will run these values through complex formulas to find the optimal path. This information is put into the routing table and the device is informed of which interface to use. Once this has been ascertained the router will use information in the table to route the data.