What is I.T: IP address (part 1)

W

What is an IP address?

IP is an abbreviation for the term Internet Protocol, and hence an IP address is an Internet Protocol address, but it’s probably easier to think of it as your internet address.

In much the same way that your postal address describes the location of your house in the ‘real-world’, an Internet address describes the location of a computer on the internet.

So take for example the address of the White House

1600 Pennsylvania Avenue
NW Washington, D.C.
20500 U.S.

Ever stop to wonder how anyone from Malaysia could send a letter to President Obama by just addressing their letter to the correct address? In fact, the address of the White House is the same regardless of whether you’re sending it from Malaysia, Japan, Australia or even Timbuktu.

Postal addresses

So how do these postal addresses work?

Well first of all their unique.This is so no one gets the Presidents email, and the President doesn’t get yours. If addresses weren’t unique, the whole system wouldn’t work.

Secondly, the addresses has a hierarchy. Read from the bottom up,

you first notice that the address is in the U.S,
then you notice it’s in Postal Code 20500,
then you work your way to District of Columbia,
then to the NW Washington (which represents a quadrant in D.C),
and finally to Pennsylvania Avenue at which point you just look for a big white house at number 1600. (the one with a helicopter on the lawn)

 

Postal addresses vs. IP Addresses

The hierarchy and uniqueness help the post-office route your letter, imagine you wanted to send a letter to the President and you drop off your letter at the Post-Office in KL.

The post-man in KL reads the address bottom-up, and places your letter in the pile for the U.S. From there the physical letter reaches the shores of the U.S, where another post-man reads the address bottom-up and sees that it’s marked for postal code 20500. So he sends it off to the post-office that covers that particular postal code, eventually it reaches the post-office that serves the North-West quadrant of D.C. and the last post-man delivers it to 1600 Pennsylvania Avenue.

At each post-office, the postman in charge looks at the address, and routes the letter accordingly, with each route getting the letter closer and closer to it’s final destination.

IP addresses

Just like how postal addresses are unique, IP addresses are unique for every device connected to the internet. Otherwise the whole system wouldn’t work. So when you login to the web you have an IP address that is unique to you.

These IP addresses are allocated to different ISPs like Maxis, Telekom Malaysia & Digi by a central authority called Iana (Internet assigned numbers authority), these guys are the main authority that ‘own’ all the IP addresses on the internet.  In fact, Malaysian ISPs have been allocated 24,859 by Iana, and everytime you logon to the internet from a Malaysian ISP you’ll be automatically be given any one of these 24,859 IP addresses. My IP address right now as I write this 115.134.5.49, and you can check your IP address right now at this link here.

Similarly IP addresses have a hierarchy and a common structure.  In terms of structure IP addresses are usually represented as a 4 numbers called ‘octets’ separated by a dot. An octet has a minimum value of 0, and a maximum value of 255, hence all IP addresses across the internet fall into the range of

0.0.0.0 – 255.255.255.255

IP Routing

So imagine rather than sending a physical letter you wanted to send a data-packet to the whitehouse website at IP address 185.25.196.110.

The first thing to note is that the post-men and post-offices of the internet are called routers–cause the route the information. Your home will usually have one supplied by your local ISP, for Unifi subscribers it’s the orange and white device that Telekom Malaysia gave you.

The ‘letters’ of the internet are the IP ‘packets’, little packets of data that just like letters have the destination address in plain sight.

How IP addressing works

Now the first step is usually my PC sending the IP packet to my home router, which then forwards it to a local Malaysian router that looks at the destination IP address of my packet (185.25.196.110), it will then lookup its routing table and discover that it should route all IPs that start with 185.25 to a router in the UK (for example). Once my packet reaches the UK, a router there looks at my destination IP address and performs a similar lookup, and this point it looks up its routing table and finds it should route all IPs that start with 185.25.19 to New York, USA.

A router in New York may do a similar routing, till eventually the last router in the chain can actually route the full IP address 185.25.196.110, and at that IP address would sit the server that host the website for one Barack Hussein Obama.

Just like how the post-men help route a physical letter from Malaysia to the US, routers help move my data packets from Malaysia to the US, using fundamentally the same system, with each route getting me closer and closer to my destination, till my packet eventually reaches the server it was intended  for. Only this is done in milliseconds and not days.

But how does my computer know the IP address of the Whitehouse in the first place? That’s for next week’s instalment of What is I.T.

7 comments

Astound us with your intelligence