Routing – How a packet gets from source to destination or from client to server

networkingrouting

I'm trying to understand how a packet gets from client to server. I understand that it leaves the local switch and heads to the internet to get routed to its destination but what happens inbetween?

1 <1 ms <1 ms <1 ms BrightBox.ee [192.168.1.1]
2 * * * Request timed out.
3 * * * Request timed out.
4 6 ms 5 ms 5 ms 213.1.114.77
5 6 ms 6 ms 6 ms 213.1.67.166
6 7 ms 12 ms 10 ms 87.237.20.136
7 8 ms 8 ms 8 ms 212.187.166.149
8 8 ms 8 ms 8 ms 149.6.8.142
9 8 ms 8 ms 8 ms 151.101.129.111

Lets say I'm travelling from 192.168.1.19 to 151.101.129.111. I understand the TCP/IP layers and the concepts of Link Layers, Transport Layers etc but when a packet gets forwarded to a router at say 213.1.114.77, how does it know that there is a link between 213.1.67.166 (5 on the table) and 151.101.129.111. I'm also aware of routing tables at each router that maintain the list of routers its connected to.

Hope you guys understand what I'm trying to ask.

Best Answer

When a packet gets forwarded to a router at say 213.1.114.77, how does it know that there is a link between 213.1.67.166 (5 on the table) and 151.101.129.111?

Short answer: Every router makes its own routing decision, based on the information it learns from other routers. So the router at hop 5 tells the router at hop 4 that it (R5) can get to 151.101.129.111. That's all R4 needs to know.

R5 knows it can reach the address because R6 tells it. And so on.

Routers learn about each other's routes by using routing protocols. The most common are OSPF, EIGRP and BGP.

@eddie 's link is also a good read.

Related Topic