Tuesday, December 15, 2009

IP ADDRESS CLASSES

IP addresses were originally organized into classes. The address class determined the potential size of the network.

The class of an address specified which of the bits were used to identify the network, the network ID, or which bits were used to identify the host ID, host computer. It also defined the total number of hosts subnets per network. There were five classes of IP addresses: classes A through E.

Classful addressing is no longer in common usage and has now been replaced with classless addressing. Any netmask can now be assigned to any IP address range.

Network and Host ID Fields

The four octets that make up an IP address are conventionally represented by a, b, c, and d respectively. The following table shows how the octets are distributed in classes A, B, and C.

Class IP Address Network ID Host ID
A a.b.c.d a b.c.d
B a.b.c.d a.b c.d
C a.b.c.d a.b.c d


Class A: Class A addresses are specified to networks with large number of total hosts. Class A allows for 126 networks by using the first octet for the network ID. The first bit in this octet, is always set and fixed to zero. And next seven bits in the octet is all set to one, which then complete network ID. The 24 bits in the remaining octets represent the hosts ID, allowing 126 networks and approximately 17 million hosts per network. Class A network number values begin at 1 and end at 127.

Class B: Class B addresses are specified to medium to large sized of networks. Class B allows for 16,384 networks by using the first two octets for the network ID. The two bits in the first octet are always set and fixed to 1 0. The remaining 6 bits, together with the next octet, complete network ID. The 16 bits in the third and fourth octet represent host ID, allowing for approximately 65,000 hosts per network. Class B network number values begin at 128 and end at 191.

Class C: Class C addresses are used in small local area networks (LANs). Class C allows for approximately 2 million networks by using the first three octets for the network ID. In class C address three bits are always set and fixed to 1 1 0. And in the first three octets 21 bits complete the total network ID. The 8 bits of the last octet represent the host ID allowing for 254 hosts per one network. Class C network number values begin at 192 and end at 223.

Class D and E: Classes D and E are not allocated to hosts. Class D addresses are used for multicasting, and class E addresses are not available for general use: they are reserved for future purposes.