Comment on How does data sent over the internet know where to go?
wkk@lemmy.world 8 months agowww.khanacademy.org/computing/…/internet-routing
I wouldn’t call that “messy and inefficient” but you do you. I’d be curious to know what’s a “clean and efficient” solution for you when it comes to routing packets around the planet :)
OmegaMouse@pawb.social 8 months ago
Ah yeah this and @MelastSB@sh.itjust.works 's comment clarify the routing table thing. Before I was assuming they just blindly forwarded stuff until one router knows where to go, but if they have a rough idea from the IP address prefix that makes more sense.
towerful@programming.dev 8 months ago
They dont have a rough idea, they have a very accurate picture of where they should send a packet based on the IP address.
Routers at the internet-backbone scale actually announce the IP addresses they are responsible for, as well as other routes (with an additional path cost added) that they can reach.
So, they match a destination IP to the most accurate IP block in their routing table (so a destination of 8.8.8.8 with 2 entries of 8.8.8.0/24 and 8.8.0.0/16, it will match the 8.8.8.0/24 route) and forward the packet to the router that announced it.
Routing at the internet scale is much smarter than routing at the home (even business) level