sorry, i still don't understand. so what process does the router go through for packets which are addressed to IP addresses that are not on the router's LAN (e.g. accessable via the Internet), and the router it's own connection to the ISP?
Printable View
sorry, i still don't understand. so what process does the router go through for packets which are addressed to IP addresses that are not on the router's LAN (e.g. accessable via the Internet), and the router it's own connection to the ISP?
You'll need to understand about ip addresses and subnet masks. Especially what's the network and host address of an IP.
The router will look at the destination IP and compare that to it's routing table. If it cannot find a match it will send it to the default gateway.
The next router (usually on your ISPs network) will do the same, and the next router, and the next until the end point is reached.
yeah, i do have a pretty good understanding of routing tables.
i think that answered my question. i know that, as far as machines on one's LAN are concerned, one's router (which has an Internet connection) is the default gateway. i was just wondering how that router routes packets?
so it too has a default gateway, which is a router at one's ISP, where packets with a destination that is not on one's LAN are routed. so, for example, if you were to request a web-page, the HTTP request would probably be sent to the router on your LAN, then your ISPs router, then an Internet backbone router etc. am i correct?
regards,
- user0182
Yep, that's it. Each router forwards it to the next depending on it's routing table.Quote:
Originally Posted by user0182
On your PC and/or home network router the routing table is usually pretty simple, 1 or 2 local networks and a default gateway. The routing tables on the backbone of a big ISP can get pretty large. ISPs usually don't have static routes but use BGP to dynamically build the routing tables. With BGP routers can talk to each other so information about what network is reachable via what route gets automatically distributed.
so, how does a home router figure-out what it's default gateway should be (i.e. how does one's LAN router get the IP address of the ISP's router)?
A home router usually either a) gets an IP from the ISP automatically via DHCP, which is leased to the router's WAN port, or b) has the WAN IP set manually, either by instructions sent from the ISP or other means. Usually, when DHCP is involved, not only is the IP for the router itself sent, but also other information, such as the IP of the default gateway, IP(s) of the DNS server(s), IP(s) of the DHCP server(s), lease time, etc...
NukEvil is correct.
You either get the default gateway from DHCP or you set it by hand.
thanks guys, that's been really helpful and interesting.
so, does that mean that a typical home router acts differently on it's different interface types (i.e. uplink, standard). i mean; as many home routers act as a DHCP router for their LAN nodes, does this mean that the router acts as a router/server on it's standard interfaces and as a client on it's uplink interface?
many thanks,
- user0182
If it's set up that way, yes. Most home routers are a DHCP client on the WAN interface and a DHCP server for their internal (W)LAN interface(s).