Shiva's Blog

IP Version 4 Subnetting

Clasfull Addressing

Class 1st Octet Number of Host Subnet Mask
Class A 1- 126 16.7 Million 255.0.0.0 (/8)
Class B 128 - 191 65 Thousand 255.255.0.0 (/16)
Class C 192 - 223 254 255.255.255.0 (/24)
Class D 224.0.0.0 - 239.255.255.255   Used for multicasting
Class E 240.0.0.0 - 255.255.255.255   Reserved for experimental use

Public vs Private Addressing

Any organization use private addresses on its network, as the public Ip is limited and for the hundreds of the machine with in the network each machine cannot be allowed the public IPs. In Network a technology called NAT or network address translation is used.

NAT or network address translation allows to share the single public IP in a private network with multiple devices. Routers are able to perform NAT function. Routers are configured with the NAT function and these routers sit in between the private and public network to establish the connection between the public network for all the devices with in the private network.

Poxy servers fulfills requests for the Internet resources on behalf of clients. the server must be configured with the public IP address towards the external interface.

Other Reserved Address ranges

There are two additional classes of IP address (D and E that use the values above 223.255.255.255:

Loopback Address:

loop back address are the special address that points to the local host. These address are usesful to test if the TCP/IP is installed on the machine. By default the class 4 network range 127.0.0.1 to 127.255.255.255 is a loopback address and is automatically assigned to the networking devices, which points to self. However, the routers or the networking devices can be assigned a valid IP address as a loopback address as well, these scenarios are used in real time environment to connect to the device for troubleshooting. When the loop back address is assigned a valid IP address the host will process the packet regardless of the physical interface on which it has been received.

Other:

There are few other IPv4 address ranges are reserved for special use and are not publicly routable:

When planning an IPv4 network addressing scheme:

When you are performing subnet calculations, try to think in terms of the number of mask bits. IT helps to remember that each power of 2 is double the previous one:

22 23 24 25 26 27 28
4 8 16 32 64 128 256

Also memorize the decimal values for the numbers of bits set to 1 in an octet within a mask:

1 2 3 4 5 6 7 8
128 192 224 240 248 252 256 255