Reputation: 466
The path an IP packet takes up the network "tree" is pretty clear to me (or so I think):
Am I in the right network?
Am I there yet?
This only really accounts for going up the network. I'm not sure how to reconcile this with getting back down, say across the internet through all the gateways in between two personal computers. I know about NAT, so a gateway can receive a packet intended for it, and forward it to a device on its network, but that's surely not the whole story - for example, what if is no NAT (perhaps with IPv6)?
It would seem routers would need tables to guide packets to the right branches, (alternative destination instead of another gateway), and that top level internet routers would need huge tables to reliably route packets.
Upvotes: 0
Views: 413
Reputation: 536
Well for the most part that is the case, you have huge routing tables that help route a packet from source to destination.
I'm not really sure what you meant by "going down the tree", but in the end of the day your private router at home get's a unique IP address from your ISP.
Your router probably doesn't have a specific route for a packet destined to facebook servers, but it also has a default gateway.
This means you'll keep getting through default gateways until your packet reaches a router that doe's know the specific router for a destination IP of a packet.
When the packet (let's say from facebook servers) get's back, the destination would be the unique IPv4 address (or IPv6, but we'll focus on 4) of your router.
Again it would go through all the default gateways, until reaching some router that knows what to do with the destination IP.
To help with routing, there are few predefined rules/ranges of addresses for each country/organization, and that helps route packets to/from them over the internet.
Btw, between the same organization. a lot of times they use tunneling - which i recommend reading on since it might help you get an even better understanding on the topic.
Upvotes: 1