Friday, May 29, 2009

Mixed Bag

This is what happens when you think too much for the title of your post... you end up with such a gross one, "Mixed bad", eh?

But as I always talk about what I've done in the last few days or weeks, perhaps a fortnight... this time I really have some mixed stuff in store.

West Bengal.... the first thing that might come to your mind is Mr Karat, who lost the battleground to the Gandhi Family but what comes to my mind is not the Communist but something way more dreadful, something which you can't escape... not even in your sweetest of sleeps[non wet ;)], a nightmare and day killer.... the HUMIDITY!!!!

When you've got a 90-95% average humidity and rainfalls which do no good for just over an hour of their vicinity, life's real tough. But as you might have heard, Aila Cyclone hit West Bengal ... though it didnt cause any regretable damage... trails are still visible, and roads say it all... here are some pics of the same:-

Just outside my hall, RK Hall of Residence

Water cluttering the ground... things were much worse in night

One of the "not so common" areas of the campus!


The trails of the monster are visible, but as the campus is fairly scarcely populated nowadays, the aftermath was not a big deal to handle :D.

But things in life are more important than L[Aila], and I being a fraction of workaholic did some progress in terms of my present works.

If you followed my posts... I am presently working on setting a mailserver, a webserver and a NLP project.

Well today I am going to discuss a bit about how domains are maintained, which is of direct consequence to mail/web or any sort of networking!

Consider the familiar www.google.com, www.yahoo.com or the less familiar like, cse.mit.edu.
Whatever I've written above are common in terms of regular use... but the concepts which make them theoretically consistent are pretty interesting.

So we know that when we give a address in Firefox it translates them to IP addresses.... if you didnt now you know.... :). Every human readable URL( Universal Resuource Locater ) converts to the computer format of xxx.xxx.xxx.xxx eg: 203.9.8.17 or 77.45.32.22 etc. I use the tool called 'nslookup' to do such queries... lemme take you through some output:

###############################################
www.google.com canonical name = www.l.google.com.
Name: www.l.google.com
Address: 209.85.153.104
###############################################
Name: google.com
Address: 209.85.171.100
Name: google.com
Address: 74.125.45.100
Name: google.com
Address: 74.125.67.100
###############################################
Name: gmail.com
Address: 64.233.161.83
Name: gmail.com
Address: 74.125.79.83
Name: gmail.com
Address: 209.85.171.83
################################################
mail.google.com canonical name = googlemail.l.google.com.
Name: googlemail.l.google.com
Address: 209.85.153.83
#################################################

So I made four IP addr lookups... www.google.com, google.com, mail.google.com, gmail.com

For a n00b, www.google.com and google.com are the same... aren't they... they dont make a diff when put in a browser ;). So are mail.google.com and gmail.com!

But in fact the above results show that something peculiar is going on!

This is what actually happens for finding the ultimate IP address corresponding web addr. Suppose I put cse.iitkgp.ernet.in and try to find the IP address... my computer will contact the "in" Domain Name Server which will have all entries which end with .in. Eg: ernet.in, gov.in etc.

As our target URL has a ernet.in we'll get the IP address of the ernet.in domain.
###########################################
Non-authoritative answer:
Name: ernet.in
Address: 202.41.97.64
###########################################

The DNS( Domain Name Server ) of ernet.in will have all entries of URL's which end in ernet.in.. eg: iitkgp.ernet.in BUT NOT cse.iitkgp.ernet.in because it is two domains deeper!

So we goto: iitkgp.ernet.in

###########################################
Name: iitkgp.ernet.in
Address: 144.16.192.55
###########################################

Then we'll goto cse.iitkgp.ernet.in

###########################################
Name: cse.iitkgp.ernet.in
Address: 144.16.192.57
###########################################

This is the order of the traversal... the IP's are just to tell that the long names are not just a conincidence... suppose you have a domain myspace.com anything preceding it will be your domain and you'll decide who owns it or not! So a URL like user1.myspace.com will be owned by myspace.com, and user11.user1.myspace.com by user1... if user1 has bought the full domain( there are some caveats here ).

This explains the difference b/w google.com and www.google.com. google.com is under the DNS servers of com and www.google.com under DNS of google.com! It's not a compulsion that all sites which have a website start with www, it's just a standard... I am not sure how Firefox guesses if www is to be prepended but all that should be doing would be nothing more than mere manipulation!

Like DNS translate URL's they also translate MRL's . There's a specific entry in the DNS telling who handles the mail for a particular domain... eg gmail.com :

##############################################
gmail.com mail exchanger = 30 alt3.gmail-smtp-in.l.google.com.
gmail.com mail exchanger = 40 alt4.gmail-smtp-in.l.google.com.
gmail.com mail exchanger = 5 gmail-smtp-in.l.google.com.
gmail.com mail exchanger = 10 alt1.gmail-smtp-in.l.google.com.
gmail.com mail exchanger = 20 alt2.gmail-smtp-in.l.google.com.
##############################################

A domain might have many [M]ail [E]xchanger records to signify that if one goes down... other picks up the mantle.

The above description is not by any means theoretically perfect or practically sound, but it does give an idea about how the Internet is one big database... one domain contains the information for other domains beneath it in the hierarchy! The experience of setting up a Mailserver has enlightened me about the Internet structure of my institute... and as it is one of those "restricted" and "secure" networks which is handled in a very careful manner, working my way out with the ISP was not an easy task at all... my mailinglist server is up and running... you might catch a glimpse of the web interface at:

http://maillist-cse.iitkgp.ernet.in/cgi-bin/mailman/listinfo/

Suggestions or accolades on mailing list, please do comment[ i am looking for a content filters, in case you have an idea]!

Well the second thing on which I've been on a high is the website I've been developing with one of my "brilliant" friends... we've worked most of the stuff out... you might catch a glimpse of the
same at:

http://maillist-cse.iitkgp.ernet.in/kgp/

The URL's might not work properly, but I'll fix them by time you visit the link.... do have a look :)!




No comments:

Post a Comment