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

295 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

They don’t. IP packets don’t “know” anything. The data in it has information of where it’s from and where it’s instructed to go. This comes from routing tables the host machine knows because a router told it so. Once it reaches the router, the router reframes the packet to to tell it where it *thinks* it should go. So on and so forth.

And I think your question is based on thinking a packet stays the same. It doesn’t. What routers do is strip part of it and add parts to get it to the next hop it needs to go. If it doesn’t know where to go, it asks it’s own network if they know and then pass it forward. Again, the cycle repeats.

If no one knows, that’s why you get error messages. There wasn’t a route or something along the way said “NOPE!”

Look up Layer 2 and Layer 3 networking for a more detailed explanation.

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