I have been looking at network programming for a while now, but one thing puzzled me. I know the internet is a series of routers of different sizes, connecting up to the top levels, and each device is assigned an IP address. When I request for an IP, how does it know where it is? How does your packet know what "path" to take to reach the other device? As well, how does one access things behind a NAT? Do you append something to the address or is it handled by the router that connects the NAT to the internet? Thanks, SFI
this might be a good starting point http://computer.howstuffworks.com/internet/basics/internet-infrastructure.htm
Thanks Cudni, but I was looking for something like this: http://communication.howstuffworks.com/convergence/router5.htm From what I understand now, a packet goes through a router which attempts to match it with a local IP, if not move it to a router upstream. These routers have ranges to forward to different IPs. So the ISP will scan if the request IP is from it's network, if not, then send upstream. Then at the top level routers they will have ranges (eg 153.x.x.x) that are detected and route the packet downstream.