written 8.4 years ago by |
Communication at the network layer is host-to-host (computer-to-computer); a computer somewhere in the world needs to communicate with another computer somewhere else in the world. Usually, computers communicate through the Internet. The packet transmitted by the sending computer may pass through several LANs or WANs before reaching the destination computer.
For this level of communication, we need a global addressing scheme; we called this logical addressing. The term IP address means logical address in the network layer of the TCP/IP protocol suite. An IPv4 address is a 32-bit address that uniquely and universally defines the connection of a device (for example, a computer or a router) to the Internet. IPv4 uses 32-bit addresses, which means that the address space is $2^{32}$.
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.
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.
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,
Subnetting
During the era of classful addressing, subnetting was introduced. If an organization was granted a large block in class A or B, it could divide the addresses into several contiguous groups and assign each group to smaller networks (called subnets) or, in rare cases, share part of the addresses with neighbors. Subnetting increases the number of 1s in the mask.
Supernetting
- The time came when most of the class A and class B addresses were depleted; however, there was still a huge demand for midsize blocks.
- The size of a class C block with a maximum number of 256 addresses did not satisfy the needs of most organizations.
- Even a midsize organization needed more addresses. One solution was supernetting.
- In supernetting, an organization can combine several class C blocks to create a larger range of addresses. In other words, several networks are combined to create a supernetwork or a supemet.
- An organization can apply for a set of class C blocks instead of just one. For example, an organization that needs 1000 addresses can be granted four contiguous class C blocks. The organization can then use these addresses to create one supernetwork. Supernetting decreases the number of Is in the mask. For example, if an organization is given four class C addresses, the mask changes from /24 to /22.