Bookmark and Share

Layman’s understanding of Networking & UDP/TCP/IP

Posted: Wednesday, February 4th, 2009 at 11:08 pmUpdated: Tuesday, April 7th, 2009 at 10:10 pm

What About Domain Names

I hope my explanation above is pretty clear. So one thing that I did not mention emphasize above is the address as I feel it’s obvious that when you send a mail, you need to recipient information like name and address.

As computer network resembles how post office works, all the datagrams need to have an address (in case of UDP). In TCP, you need an address to make a connection to. In computer, all address are pretty much numbers. We human, however, are good with names. Therefore, there’s an obvious disjoint here. Let’s introduce Domain Name System (DNS).

Domain Name System (DNS) is pretty much an address translation service. You give it a name, it returns you the address as needed by computer to do its thing. In other words, it’s like a phone book. You may not know the phone number of a particular person, but you know the name. In the phone book, you associate a name with a phone number. In the internet, you associate a domain to an IP address.

Domain Registration

In your phone book, you can have James phone number as 415-555-1234 and on someone else’s phone book, James’ phone number maybe 510-123-4567. That is fine as long as you only use your own phone book, and someone else use theirs. On the internet, however, you can’t have the same name resolving to different address. Thus, they’ve setup a registration service. It is basically a way for you to register a name so that no conflict of names exists (like in the case of James above). For that, you have to pay some companies for their services. One company I like to use is GoDaddy.

Name Servers & Resolving Domain Names to an Address

Have you seen address not found problems while browsing a website before? Read on and I’ll explain you why it happens.
addressnotfound

When you type a domain address in your browser, for example, your computer tries to resole it to the eqivalent IP address so that it can connect. here’s what your computer does behind a scene when making connection.

  1. See if the domain address is listed in resolv.conf file. You can think of resolv.conf as your own personal phone book. This file is always consulted first.
  2. If it’s not on resolv.conf, pass query to your DNS server as specified in your settings. DNS stands for Domain Name System. It ia a system where you give a domain name and it will return you the corresponding IP address of the domain name.
  3. DNS returns you the IP address.
  4. Now that your computer knows the IP address, it can then make connection to it.

So now you know the prerequisite of your computer making connection, you can debug your connection further when you have address not found error above. It may not be that your internet is down. It may just be that the domain address really doesn’t have a corresponding IP address, or that your DNS server is down.

30,000 feet view of how Domain Name System (DNS) works

30kviewdns
So let’s assume that you want to go to this website, www.microshell.com. First your computer needs the IP address of www.microshell.com so that your web browser can make connection to the server to download this page.

  1. First, your computer will ask your DNS server if it knows www.microshell.com.
  2. Chances are, your DNS server doesn’t know about www.microshell.com. So it forwarded the request to the next level domain, the com root domain.
  3. com root domain doesn’t know about www.microshell.com. However, it knows that Microshell DNS server knows www.microshell.com. So it tells your DNS server that Microshell DNS server knows about it.
  4. Then your DNS server asks Microshell DNS server about www.microshell.com.
  5. Microshell DNS server knows about www.microshell.com and returns the IP address
  6. Your DNS then returns the IP address that it got from Microshell DNS server.
  7. We just resolved www.microshell.com to its equivalent IP address.

Pages: 1 2 3

9 Responses to “Layman’s understanding of Networking & UDP/TCP/IP”

  1. Siriquelle Says:

    This is a great article.. I was searching the web for a clear explanation to UDP and this hit the nail on the head, thank you.

  2. Sonny Says:

    This is one of the best explanations of computer networks, I’ve been using this analogy since I’ve learned about networking and I’m only 18. Thanks.

  3. Mohammad Says:

    This is a realy great article
    I was looking for a long time for an article or any book that explains these things in such easy way to understand.
    Now i can read the books i have and understand it.

    Thank you very much

  4. Fauzi Says:

    Very nice discussion. I guess you could say TCP is more like a phone call.

  5. arun bansal Says:

    great article sir………..

  6. Kanchan Says:

    Great Article

  7. Kanchan Says:

    I salute you for this explanation, all books make things diffuclt, when things can be made easy like this..
    Thank you su much..

  8. Tabrez Says:

    Nice explanation with equivalent examples which helped a lot..Thanks a lot

  9. kalyan Says:

    Awesome and thanks for enlightening with this easy and simple to understand article

Leave a Reply


+ 6 = fourteen