Introduction to Data Communications | ||
---|---|---|
Previous | 54c. Network Masking | Next |
If we examine our IP address of 142.110.237.1, and use a subnet mask of 255.255.255.0. It can be seen that the network portion of the IP address is 142.110.237 and the host portion is 1. The network address is typically written 142.110.237.0 and the host is sometimes written 0.0.0.1.
Now if host 142.110.237.1 wanted to send a datagram to 142.110.237.21. It would look at the network portion of the IP address of the destination and determine that it is on the local network. It would then send the datagram out.
If host 142.110.237.1 wanted to send a datagram to 142.110.150.108. It would look at the network portion of the IP address of the destination and determine that it is not on the same network. It is on 142.110.150.0 network and it would send it to the default gateway. The default gateway is a router that knows how to reach the other networks.
Class Masking
Class A, B and C networks use masks and not subnet masks. Masks are similar to subnet masks except that usually they are used in routers and not workstations.
A Class A network has a mask of 255.0.0.0 which allows approximately 16.7 million host addresses. Also, a Class B network has a mask of 255.255.0.0 which allows approximately 65 thousand host addresses. Both classes of networks have too many hosts for one network to handle. Imagine 65,000 users trying to access a network service at the same time. The network would be swamped with requests and slow down to a crawl.
The solution is to divide the network up into smaller workable networks called subnets. This is most commonly done by fooling the host machine into believing it is on a Class C network (only 254 hosts) by using a Class C mask: 255.255.255.0. This mask is called the subnet mask.
Thus for a Class A network using a subnet mask of 255.255.255.0, you can have roughly 65 thousand subnets of 254 hosts. On a Class B network using a subnet mask of 255.255.255.0, you can have roughly 254 subnets of 254 hosts.
Introduction to Data Communications | ||
---|---|---|
Previous | Table of Contents | Next |