How does an ISP's router know which router to send network packets to if ....

wkrofl

Junior Member
Apr 20, 2013
12
0
0
...the data requested is not on the ISP's LAN?

I guess the same question is how does the home router know to send the packets to the ISP's router and not to another computer on the LAN?

This has to do with sub netting right?
 

Danimal1209

Senior member
Nov 9, 2011
355
0
0
Not really, no.

When you request to get information from an specific IP address you send that request to your default gateway(router in most cases) so he can find the address for you.

Each router contains a routing table. It will look through the table to see if there is an entry for that address. If he cannot find the address, he then sends it to his default gateway(ISP router in most cases). It keeps branching out from there until a router knows how to get there. If it's on your LAN, it will be in the LAN routers routing table.

I suggest you do a little research on how networks operate. There is a ton of free information available.
 

Udgnim

Diamond Member
Apr 16, 2008
3,679
122
106
I guess the same question is how does the home router know to send the packets to the ISP's router and not to another computer on the LAN?

let's say you are on 192.168.1.0, 255.255.255.0

if you have a default gateway IP address configured, any IP address that is outside the 192.168.1.0 255.255.255.0 network goes to the default gateway

the default gateway is typically a router interface IP

the router will look at the destination IP address of that packet and determines if it has any specific routes to that destination IP address, if not then it will likely have a default route to the ISP and send the packet to the ISP

the ISP router then looks at the destination IP address and determines if it has a route (default or specific) to that IP address

eventually the packet reaches its intended destination or it's determined that that IP address can't be reached

This has to do with sub netting right?

it just has to do with networks

routers create network boundaries and communicate with other routers via direct connections and routing tables to determine paths on how to get to a certain network
 

wkrofl

Junior Member
Apr 20, 2013
12
0
0
Not really, no.

When you request to get information from an specific IP address you send that request to your default gateway(router in most cases) so he can find the address for you.

Each router contains a routing table. It will look through the table to see if there is an entry for that address. If he cannot find the address, he then sends it to his default gateway(ISP router in most cases). It keeps branching out from there until a router knows how to get there. If it's on your LAN, it will be in the LAN routers routing table.

I suggest you do a little research on how networks operate. There is a ton of free information available.

It keeps branching until a router knows how to get there. That means it could possibly take 50 or 600 hops to get to a destination. How does a router know?! Do routers have caches? ( I am doing research )
 

Danimal1209

Senior member
Nov 9, 2011
355
0
0
You can usually get to a destination across the US in 10 - 15 hops.
Routers have a routing table. When it learns of an address, it puts it into its routing table so it knows where to send the packets next time it gets that address as a destination.

Packets also have a field in their header called Time To Live. It's basically a timer that counts down each time it leaves a routers interface.
So, if the TTL was 10, it could only reach 10 routers and then the 10th router would drop the packet. This prevents routing loops.

If you open up command prompt and type: c:>tracert www,google,com
or any other address, you can watch how many hops it takes to get to that web server.
 

itsmydamnation

Diamond Member
Feb 6, 2011
3,028
3,800
136
It keeps branching until a router knows how to get there. That means it could possibly take 50 or 600 hops to get to a destination. How does a router know?! Do routers have caches? ( I am doing research )

No it doesn't it will very quickly find the bit bucket. ISP's dont have a default route, they have a full inet BGP route table which consists of every known route on the internet. There are currently 259,735 routes in that table.