How do IP packets know what hoops/servers to go through to reach the intended recipient’s IP?

289 views

How do IP packets know what hoops/servers to go through to reach the intended recipient’s IP?

In: 2

6 Answers

Anonymous 0 Comments

There are multiple protocols that decide this. I may be going too deep on this one. If so, apologies.

This is a pretty deep subject once you get down to the fine details. Much of the Network+ is about answering this question on different networks. Almost all answers are “in most cases”.

LANs tend to work by having a switch find out which computers have which IP addresses and also what their hardware MAC is (typically built into a network card). Once they know, everything sent to them with a particular IP address is sent to that MAC and only that MAC.

Next getting out of the LAN typically works by IP address. A router is told explicitly, “Only this list of IPs is on your network” via a process known as subnetting. A computer that wants to reach the Internet is told the router’s IP address when it is set up to connect to the Internet. It sends a packet to the “default gateway”, and the router at that gateway says, “Oh, this isn’t one of mine”, and sends it out into the larger network. This can be a fairly small network that is broken up into smaller networks, a large network, or even the Internet. There may be several layers of routers until you route all the way out of your company’s network.

Typically, at this point, you are now on the Internet. You are likely on a very big network belonging to an Internet Service Provider. These providers have a variety of protocols that they might use. If the IP address is one that they control, they know where to send your packet, but if they do not, they do know which other networks the packet should go to. Their internal protocols then tell them what route to take, whatever they use.

At the edge of the network you have connections to other networks, the totality of which is the Internet. These networks are huge, but they talk, and they know things like, “Massive ISP X has addresses between A and B. I can see that this packet has an IP address between A and B, so I will send it to Massive ISP X.”

This is oversimplified quite a bit, and possibly a bit inaccurate in some details, but that should give you a general idea. If you want to know in more depth, you are probably looking at an entire course to get a networking certification such as the Network+.

Edited to note at the top that this might be TMI.

You are viewing 1 out of 6 answers, click here to view all answers.