| < Day Day Up > |
|
The IP addressing scheme discussed earlier has a main problem: it is likely that the IP addresses will get exhausted fast. To overcome this problem, subnet addressing and supernet addressing are used.
In subnet addressing, a site that has a number of networks will have a single IP address. Consider a site with three physical networks. Instead of assigning three IP addresses, only one IP address can be assigned.
In subnetting, the IP address is divided into two portions—network portion and local portion. The network portion is for the external network consumption, and the local portion is for the local administrator. The local portion is divided into the physical network portion and the host portion. In essence, we are creating a hierarchical network with the Internet as part of the address and the local part containing the physical address portion and the host portion. For instance, in decimal notation, the first two fields can be used for the Internet portion, the third field for local network ID, and the fourth for the host, so that of the 32 bits, 16 bits are for network ID, 8 bits are for the local network ID, and 8 bits are for the host ID.
To make better use of the IP addresses, subnet addressing is used. In subnet addressing, a site that has a number of networks uses a single IP address. A packet received with the subnet addressing is routed to the correct destination using subnet mask.
For the other routers to know that subnet addressing scheme is used at a site, there should be a way to let others know this subnet addressing scheme. This is done through a 32-bit subnet mask. Bits in the subnet mask are set to 1 if the subnet treats the corresponding IP address bit as network address bit and 0 if the subnet does not treat the corresponding IP address bit as network address bit. As an example, a site may have the first 16 bits for the network ID, 8 bits for the local network ID and the remaining 8 bits for host ID. In such a case, the subnet mask is
The subnet mask is generally represented in dotted decimal notation as 255.255.0.0.
| < Day Day Up > |
|