Packet Forwarding in Routers

There are more than one ways that leads to the destination

Intuition of Routing

The job of routers is to do routing. The end. If only routings were that simple. In this story, we will take a look at how routers actually do their job.

Routing is similar to how we navigate in Google Maps

Packet Forwarding in Router

We know that routers are needed for packets to go from a local network to any remote networks. Routing is basically the process of forwarding a packet from a router’s entry interface out to an exit interface. Routing and forwarding is sometimes used interchangbly. So, how exactly does a router forwards packets?

Visualising the forwarding action in routers

Routing Table

Let’s take a deeper dive into the components inside a routing table. We can easily get the routing table on any routers using show ip route command.

The structure of a Routing Table


The code section indicates the types of routing for each routes. The code is abbreviated into C, R, S etc. We simply refers to the code table at the start of the routing table to corresponding routing types.

Destination Networks

As the name implies, the destination network component indicates the network address of the destination. It means the ‘network’ that we are trying to get to from this router. This is similar to the ‘destination’ we typed into Google maps for navigation.

Admin Distance (AD)

This value indicates the precedence of the routes on a router. Suppose that we have two routes that leads to the same destination. Here, the router pick the route priority based on the AD value.

[Distance Value/Metrics]Example:
Default Distance Value
R [120/5]
R 192.168.1./024 [120/2]

Next Hop

This field indicates the IP address of the next hop router. Network packets are forwarded from one router to another en-route to the destination. The ‘hop’ here loosely refers to the routers along the transmission path. The next hop router is simply the next adjacent router that the local router will forward the packets to next.

The Next Hop Router

Exit Interface

Remember router works by ‘receiving’ a packet from one interface and ‘forward’ this packet out to another interface. The interface that the packets are being forward out to; is called the Exit Interface. This is normally tagged as the interface names; for example, e0/0, fa0/0 or g0/0 depending on the interface types.

Packets entering a router from fa0/0 and going out from fa0/1 (this process is call forwarding)
Packets going IN and getting OUT from Router0 towards the destination

Reading a routing table

Making sense of Router0 Routing Table

I’m just a little boy, lost in the tech world. But remember, love is a riddle, and life with tech is more amazing than ever