Wednesday 16 September 2015

Classes of IP Addresses

Basics of Networking-IP Address

IP Addresses:

It is an address in a network which is used for communication between two computer. In Laymen terms as we need an address to send postcard or Letters from one destination to another similarly in network while sending mails or whenever we need communication computer uses unique identifiers to send information to specific computers on a Network.
TCP/IP is standard for how to communicate on the network.

Two Versions of IP Addresses are there:
IPV4:  IP’s displayed in dotted Decimal Notation. It uses 32 binary bits to create a secure unique address separated on the Network.
Expressed by four numbers separated by dots.
For ex: 192.168.10.1

IPV6: It uses 128 binary bits to create a single unique address on the Network.
Expressed in eight groups of hexadecimal digits (base-0). Numbers are separated by colons.
For ex: 2001:dcab::3257:9652

Classes of IP Addresses:

Five classes are defined on the base of IP Hierarchy.


In these classes of IP Addresses:
0: Reserved and represents all IP addresses.
127: Loop back IP Address. Generally used for testing.
255: Reserved for Broadcasting Purposes

IP Address Class
No. of bits for NID/HID
No. of N/w Id bits
Possible number of N/w per Id
No. of Host IP per N/W Id
Class A
     8/24
  8-1=7
  27 -2=126
224-2 = 166,277,274
Class B
    16/16
 16-2=14
  214 =16,384
216-2= 65,534
Class C
     24/8
 24-3=21
 221 = 2,09,752
28-2=254

                                IP Address based on Class Networks
No. of Networks = 2networkbits
No. of Hosts/Network = 2hostbits -2

Note: All classes are identified by their first octet of IP addresses:

Class A Addresses

The first bit of first octet is always set to 0(zero).
As defined above it lies in b/w 1-126
            00000000-011111111
                            1-126
 Default Subnet Mask of Class A Address: 255.0.0.0
 127.x.x.x reserved for loop back IP Address.

Class B Addresses

The first two bits of first octet are always set to 10.
It lies b/w 128-191
              100000000-10111111
                           128-191
     Default Subnet Mask of Class A Address: 255.255.0.0     


Class C Addresses

 The first three bits of first octet always set to 110
  It lies in b/w 192-223
                    11000000-11011111
                                192-223
     Default Subnet Mask of Class C Address: 255.255.255.0

Class D Addresses

 The first two bits of first octet are always set to 1110
 It lies in b/w 224-239
            11100000-11101111
                        224-239
Reserved for Multi-casting. No Need to extract the host address from the IP address as there is data not designed for particular host as we are using it for broadcasting purposes.
Don’t have any Subnet Mask.

Class E Addresses

  Only using it for Experimental purposes.

  It lies in b/w 240-254.