The Internet is a global network which connects several hundreds and thousands of local networks. In this tutorial I will discuss about internet addressing in IPV4. There are two address methods IPV4 and IPV6. IPV4 is 32 bits (4 bytes) long and IPV6 is 128 bits long. So by using IPV4 you can have at most 2^32 or four billions public IP address. A public IP address is accessible from any part of the network. Well private IP address is accessible from the local network, where it resides. The IPV4 addressing has two different formats to represent IP address.
- Class full IP address
- Class less IP address (CIDR)
Class full IP address:
In class full addressing the IP address is partitioned in different sections with different block size. They are
- Class 'A'
- Class 'B'
- Class 'C'
- Class 'D'
- Class 'E'
Actually class 'A','B' and 'C' are well-known to all. The first three classes are unicast address. Class 'D' is multicast and class 'E' is reserved for future use. Every class has associated IP address range.
Class | Start with | IP address range | Number of Blocks | Total Addresses |
-------------------------------------------------------------------------------------------------
A | 0 | 0.0.0.0. to 127.255.255.255 | 128* | 2147483648* |
-------------------------------------------------------------------------------------------------
B | 10 | 128.0.0.0 to 191.255.255.255 | 16384** | 1073741824** |
-------------------------------------------------------------------------------------------------
C | 110 | 192.0.0.0 to 223.255.255.255 | 2097152*** | 536870912*** |
-------------------------------------------------------------------------------------------------
D | 1110 | 224.0.0.0 to 239.255.255.255 | 1 | 268435456 |
-------------------------------------------------------------------------------------------------
E | 1111 | 240.0.0.0 to 255.255.255.255 | 1 | 268435456 |
-------------------------------------------------------------------------------------------------
*Actually the class 'A' has 125 blocks to use in the global internet. Three blocks are used for different purpose. The block with the starting address 10.0.0.0 to 10.255.255.255 is used for private network. That is this block of address are used in home network and the host with the private network address are not accessible from the outside of the network.
The block with the address of 127.0.0.0 to 127.255.255.255 is used as loopback address. That is to test an application on the same machine. The datagrams are not gone out the host when using loopback address. It will come back at the same machine. If you run a server on your machine and at the browser type 'http: //127.x.y.z' (x, y, z are any number from 0~255), it will show you the server default page.
The block with the address 0.0.0.0 to 0.255.255.255 is used for two different purposes. If all zero it is used as 'The host on this network'. When a host does not know its IP address it will send a datagram using the address 0.0.0.0 in its network. If DHCP or other method is established it will work with the datagram and lease a IP address to the host for specific amount of time.
**Sixteen blocks of the class 'B' address are reserved for private addressing. The blocks with the address 172.16.0.0 to 172.31.255.255 are user for this purpose.
***Two hundred fifty-six blocks are used for private addresses. The ranges are 192.168.0.0 to 192.168.255.255