How does a route impact latency, and who determines a connection route?

215 views

How does a route impact latency, and who determines a connection route?

In: 12

4 Answers

Anonymous 0 Comments

No single router knows ALL the IPs and the routes to get to them. They’re just not capable of of that.
Instead each router along the route knows it’s neighbors and they tell each other about what connections they have.

Lets say you have 3 routers connected in a line. A – B – C

So Router A has devices with 111 and 112 addresses. If router A gets data for 111, it knows exactly where to send it. It’s connected to it! But if it gets data for 333, it doesn’t have that connected to it, so it sends it out to Router B. Router B see’s that it doesn’t have 333 either, so it sends it out to Router C. C has 333 connected to it, so it sends it out!

Each time the data has to travel across a line, then a router has to read and figure out where to send the data, takes time. So in theory, you want the shortest trip. Instead of going A to B to C, what if we connect A directly to C? Then it has fewer “hops” and the data gets there faster.

But there are BILLIONS of routers in the world, we obviously can’t connect them ALL directly to each other. So instead, we build networks, or a big web of routers. Router A connects to BCDEF
Router B connects to ACDEFG
Router C connects to ABDEGH
And so on, until virtually every router in the world gets connected to each other through a series of hops.
Now lets say A wants to talk to H. But A isn’t connected to H. The data has to go through at least one other router first.

So what happens is, the routers talk to each other. A shouts out to it’s neighbors, “Hey, does anyone connect to H?” B comes back and says “I don’t!”. C says “I do!” So A knows to send the data to C, who will send it to H. A remembers that “Anything going to H, I’ll send to C.”
It gets much more complex when you have billions of routers and lots of hops, but it uses the same basic idea and usually just groups stuff up. For example, all addresses that start 155 might all belong to one ISP, so each router learns “Anything that starts with 155, send it this way” instead of memorizing each address.

Another way latency is impacted is by the speed of the connection between routers and the time it takes each router to examine the data and figure out where it goes. So if A has a very slow connection to C, then it may go slower than if A sent it to B who then sent it to C.
Or if C is getting TONS and TONS of Data, C might take longer to process the data and that adds latency. So shortest distance, or least amount of hops, may not always be the fastest.
One of the things modern routing protocols do is “rate” a connection and calculate the rating of a route to decide which way is the fastest. This can be VERY complex and isn’t always used though.

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