Just like each place in the world has an address – Each machine on the internet has an address called the IP Address. For instance, your computer has an IP address, the server that hosts this website has an IP adress, and so on. And when we use “www.zarrata.com”, we are actually referring to IP address “220.127.116.11” which is assigned to zarrata.com. You can find your own IP at http://whatismyipaddress.com/
Then, of course, we would need a database that has all the IP’s corresponding to all the websites on the internet. It could then be used to translate the human-friendly address or domain names(zarrata.com) to the real(IP) address(18.104.22.168). This database is called the DNS (Domain Name System).
Now, an IP address is actually used in binary for communication by the computer. For instance, 22.214.171.124 translates to 11011000.00011011.00111101.10001001 – each number is represented by 8 positions in binary form – and are hence, called octets. The complete IP address is then a 32-bit number (made from 4 octets). Each of these 32 bits can be either 0 or 1 – thus allowing 2^(32) unique IP addresses which is about 4.3 billion possibilities.
[PS – The IP address considered here is the most prevalent version of the IP address – called IPv4. The other being IPv6]
Now, the first half of the IP address – the first 2 octets – 216.27 is the network part and the second half – the last 2 octects 61.137 form the machine or host part. ie-the first half is the neighborhood or street where you live and the second half is the exact house in the neighborhood. Hence, machines having the same first half of the IP belong to the same network. For instace, 126.96.36.199 & 188.8.131.52 belong to the same network.
Subnets & Subnetting
Networks having a large number of hosts are divided into subnetworks or subnets. A subnet number is assigned to each subnet. The second half or host part now has the host and the subnet number combined together – using the AND operation.
Consider a large network 192.168.10.0 that has the IP addresses ranging from 192.168.10.1 – 192.168.10.224
(225 is the maximum value of any octet – since, 256 is not an octect; 256 = 100000000. Here 224 is used since 192.168.10.255 is a BROADCAST ADDRESS and cannot be used).
Now, we wish to divide the network into two subnetworks:
The first network consisting of the machines 192.168.10.1 – 192.168.10.127
The second network consisting of the machines 192.168.10.128 – 192.168.10.225
It is done by using a subnet mask which is defined by :
1)The class of IP(see table below) – here, the mask to be used is 255.255.255.0
2)The address that divided the network – here, 192.168.10.128
Hence, the mask obtained from 1) & 2) is 255.255.255.128
|Class||Address Range||Subnet Mask|
|Class A||1.xxx.xxx.xxx – 126.xxx.xxx.xxx||255.0.0.0|
|Class B||128.xxx.xxx.xxx – 191.xxx.xxx.xxx||255.255.0.0|
|Class C||192.xxx.xxx.xxx – 223.xxx.xxx.xxx||255.225.225.0|
|Class D||224.xxx.xxx.xxx – 239.xxx.xxx.xxx||Reserved for multicast groups|
|Class E||240.xxx.xxx.xxx – 254.xxx.xxx.xxx||Reserved for future use, research & development|
[Note – 127.x.x.x addresses are reserved for loopback or localhost]