0
6.6kviews
Explain the different classes of IP addresses and need of sub netting with the help of example.
1 Answer
0
77views

Classful Addressing

IPv4 addressing, at its inception, used the concept of classes. This architecture is called classful addressing. Although this scheme is becoming obsolete, we briefly discuss it here to show the rationale behind classless addressing.

In classful addressing, the address space is divided into five classes: A, B, C, D, and E. Each class occupies some part of the address space.

enter image description here

We can find the class of an address when given the address in binary notation or dotted-decimal notation. If the address is given in binary notation, the first few bits can immediately tell us the class of the address. If the address is given in decimal-dotted notation, the first byte defines the class.

enter image description here

Classes and Blocks:

One problem with classful addressing is that each class is divided into a fixed number of blocks with each block having a fixed size.

enter image description here

Class A addresses were designed for large organizations with a large number of attached hosts or routers. Class B addresses was designed for midsize organizations with tens of thousands of attached hosts or routers. Class C addresses were designed for small organizations with a small number of attached hosts or routers.

We can see the flaw in this design. A block in class A address is too large for almost any organization. This means most of the addresses in class A were wasted and were not used. A block in class B is also very large, probably too large for many of the organizations that received a class B block. A block in class C is probably too small for many organizations. Class D addresses were designed for multicasting

In c1assful addressing, a large part of the available addresses were wasted.

Netid and Hostid

In classful addressing, an IP address in class A, B, or C is divided into netid and hostid. These parts are of varying lengths, depending on the class of the address.

Mask

Although the length of the netid and hostid (in bits) is predetermined in classful addressing, we can also use a mask (also called the default mask), a 32-bit number made of contiguous 1s followed by contiguous as. The masks for classes A, B, and C are shown in Table below. The concept does not apply to classes D and E.

enter image description here

The mask can help us to find the netid and the hostid. For example, the mask for a class A address has eight 1s, which means the first 8 bits of any address in class A define the netid; the next 24 bits define the hostid.

The last column of above Table shows the mask in the form 1n where n can be 8, 16, or 24 in classful addressing. This notation is also called slash notation or Classless Interdomain Routing (CIDR) notation. The notation is used in classless addressing

Address Depletion

The flaws in classful addressing scheme combined with the fast growth of the Internet led to the near depletion of the available addresses. Yet the number of devices on the Internet is much less than the 232 address space. We have run out of class A and B addresses, and a class C block is too small for most midsize organizations. One solution that has alleviated the problem is the idea of classless or subnet addressing.

Subnet and Classless Addressing - Appear as one network to outside but consists of multiple networks inside.

enter image description here

Consider an organization that has been assigned a Class B IP address with a network ID of 150.100. Suppose the organization has many LANs, each consisting of no more than 100 hosts. Then seven bits are sufficient to uniquely identify each host in a subnetwork. The other nine bits can be used to identify the subnetworks within the organization. If a packet with a destination IP address of 150.100.12.176 arrives at the site from the outside network, which subnet should a router forward this packet? To find the subnet number, the router uses a subnet mask that consists of binary 1s for every bit position of the address except in the host ID field where binary 0s are used. For our example the subnet mask is 11111111 11111111 11111111 10000000 which corresponds to 255.255.255.128 in dotted-decimal notation. The router can determine the subnet number by performing a binary AND between the subnet mask and the IP address. In our example the IP address is given by 10010110 01100100 00001100 10000000 corresponding to 150.100.12.128 in dotted- decimal notation. This number is used to forward the packet to the correct subnetwork inside the organization. A host connected to this subnetwork must have an IP address between 150.100.12.129 and 150.100.12.254

Please log in to add an answer.