- check out the stylin' NEW Collusion haxor gear at Jinx Hackwear!!! -
- sign up on the Collusion Syndicate's infotainment discussion lists!!! -

Volume 19
Jan 2001


 HOME

 TechKnow
 Media Hack
 Parallax
 Reviews
 Fiction
 Humor
 Events
 Offsite

 Mission
 Responses
 Discussion
 #Collusion
 NEW!

 Submit a Story
 Collusioneers
 © & TM Info
 Contact Us


SETI@Home

Join the
Collusion
SETI Team!




IP Addressing and Virtual Domains
 by TexorcisT

Okay. This is some basic shit, but I've seen some confused comments lately so here's how it works:

When you point your browser at "http://www.something.com", it references the some name service like a DNS server to convert "www.something.com" to an IP address and then request information from the http port (usualy 80) of the machine at that IP address.

An IP address is an eight byte number. The IP addy for "www.something.com" is "11001110000110000000011000000010". The actual decimal value of this address is "3457680898". This is commonly called dotless IP notation. IP addy's are usualy notated as a series of four period (dot) delimited octets. The IP addy for "www.something.com" would most commonly be notated as "206.24.6.2", that being the decimal values of the four seperate octets of "[11001110].[00011000].[00000110].[00000010]".

Converting an IP addy to dotless IP can be done in two ways.

Direct conversion:

  1. multibly the first octet by 256 cubed
    "206*2563=3456106496"
  2. multibly the second octet by 256 squared
    "24*2562=1572864"
  3. multibly the third octet by 256
    "6*256=1536"
  4. add the forth octet to all the previous results
    "3456106496+1572864+1536+2=3457680898"
Conversion thru Bin:
  1. convert each octets to binary
    "206.24.6.2=[11001110].[00011000].[00000110].[00000010]"
  2. convert entire bin number to decimal
    "[11001110000110000000011000000010]=3457680898"
To convert it back can be done both ways as well.

Direct conversion:

  1. divide the dotless IP by 256 cubed and ignore the remainder to get your first octet
    "3457680898/2563=206.x"
  2. subtract the first octet multiplied by 256 cubed from the dotless IP and divide the sum by 256 squared for your second octet
    "(3457680898-206*2563)/2562=24.x"
  3. subtract the first octet multiplied by 256 cubed and the second octet multiplied by 256 squared from the dotless IP and divide the sum by 256 for your third octet
    "(3457680898-206*2563-24*2562)/256=6.x"
  4. subtract the first octet multiplied by 256 cubed and the second octet multiplied by 256 squared and the third octet multiplied by 256 from the dotless IP for your forth octet
    "(3457680898-206*2563-24*2562-6*256)/256=2"
Conversion thru Bin:
  1. convert the dotless IP to binary
    "3457680898=[11001110000110000000011000000010]"
  2. convert one byte segments in to the perspective dec octets
    "[11001110].[00011000].[00000110].[00000010]=206.24.6.2"

note: if you don't know how to convert dec to bin and back, any good scientific calculator (including windows calc in sci mode) will do it for you. There's also a nifty little converter at http://www.norad.net/

So, you can reach the "www.something.com" website by pointing at "http://www.something.com". You can also reach that same server by pointing your browser at it's IP address with either "http://3457680898" or "http://206.24.6.2" but you won't always get the "www.something.com" website. This is because of Virtual Domains. You're talking to the same port on the same server but not asking for the same information.

After you attatch to the "http" port on the web server, your browser asks to "GET" a document. When pointing your browser at "http://www.something.com", your browser connects to the "http" port and requests a document with "GET HTTP://WWW.SOMETHING.COM". This server is using Virtual Domains, which means it is hosting several different sites with different domain names on the same IP address. When it receives the request to "GET HTTP://WWW.SOMETHING.COM" it knows which site you want. However, if you point your browser to "http://206.24.6.2" your browser will request "GET HTTP://206.24.6.2" and since it can't know which Virtual Domain you want, it serves you the default site, which in this case is "westnet.com". For this reason, the only time you can use an IP address to directly point to a site is if: a) there is only one site served on that particular IP addy, b) it is the default site on that IP addy, or c) you know an alternate path to fetch the documents from the root domain (often "/~[username]").

Hope this made it crystal.

l8rz - Tx


Additional information on this topic can be found at http://www.nwi.net/~pchelp/obscure.htm

Also, Norad.net hosts a online conversion tool.