Tuesday, June 29, 2010

How the internet works

Understanding all the nuances of technology, from how a computer encodes a single bit onto a wire for transmission, all the way up to the protocols everyone knows about, like HTTP and HTML, it's amazing to me that we don't have more connection issues.

I was seriously deliberating this, in my head, a few days ago, and an issue I dealt with today, reminded me of all those things and how the simplest thing can make the whole system go away.

The issue I was trying to resolve for a customer was that a particular webpage refused to load... The cause, as I had determined it, was that an administrator for that webpage had disallowed access from that particular address for whatever reason.

Going through the steps though, I checked through all the different layers and made sure the connection was going okay, that the DNS resolution was working correctly, and that the IP settings were correct.

To think of it, when we type google.com into a browser address bar, the browser instructs the system to establish a connection, the system, knowing it has to resolve the name, examines it's DNS settings, if the DNS servers are not listed as a connected route in the routing tables, it then needs to connect to the default gateway on the default route, in which case, it needs to ARP the default gateway for it's MAC address.

After resolving the mac address of the default gateway, it has to assemble a UDP DNS lookup request for the server, with the default gateway's MAC address, the DNS server's IP address, and the request information containing google.com.

After it receives a response, it need to then check the resulting IP for google, and compare that to local routing tables. It then needs to determine whether it needs to send out the SYN request on the same adapter to the same default gateway, and initiate the TCP session.

All this in approximately 1/10th of a second or less.

That's a lot of things to do in so little time... but we do it so often, without thinking, that the relevance of everything gets lost in translation. This process, and appreciation of it is definitely lost on end-users.

Oh well, I appreciate my DHCP and DNS servers, as well as my local default gateway for everything they do for me, each and every nanosecond.

No comments:

Post a Comment