You are on page 1of 6

Subnets

What is a subnet?
A subnet is logical division of a larger network. Basically, a portion of a network that shares a
network address with other portions of the network and is distinguishable by a subnet number.

In a subnetted network, the host portion of the IP address is further split into a subnet number
and a host number by use of a subnet mask. This allows you to divide a network into smaller
networks to enhance routing and logically group the computers and resources in your
network.

What is a subnet mask?


A subnet mask is a number that, when coupled with the IP address, provides a clear distinction
between the network number and the host number. The subnet mask is created so that the 0
bits (or "off" bits) in the mask show the host number and the 1 bits (or "on" bits) mask the
network number. For example, a computer uses an IP address of 10.1.2.3. The network mask
that the computer is configured to use is 255.255.255.0. This network mask, when viewed as
a set of binary digits, is 11111111.11111111.11111111.00000000 and only the last octet of
the address is seen as the host number. Therefore, the host number of the IP address 10.1.2.3
is 3.

Subnet masks and classful subnets


Address classes have different subnet masks that are naturally associated with them. Class
A networks, because only the first octet signifies the network, are associated with an 8-bit
network mask (255.0.0.0). Class B subnets, using the first 16 bits for their network address,
use a natural subnet mask of 255.255.0.0. Class C subnets use only the last octet to describe
the host number and, therefore, have a natural subnet mask of 255.255.255.0.

classful networks, meaning subnets that only use the natural mask, are impractical in most
situations and are very often modified using a bit-mask. This means that, instead of a subnet
mask based on the class of network, a subnet mask is created that further divides networks
(subnetting) or merges networks (supernetting) to allow greater flexibility for the network
administrator. This use of bit-masks to determine the destination network is known as
Classless Inter-Domain Routing (CIDR).

When you are recording address and netmask combinations, writing the entire address and
netmask in dot decimal notation may be cumbersome and frustrating. An easier method of
describing an address/netmask combination is to simply specify the number of bits in the
network mask at the end of the address. For example, 10.0.0.0/24 describes a network,
10.0.0.0, that uses a network mask with 24 "on" bits (255.255.255.0).
The subnet mask for a particular network is 255.255.31.0. Which of the following
pairs of IP addresses could belong to this network?
(A) 172.57.88.62 and 172.56.87.233
(B) 10.35.28.2 and 10.35.29.4
(C) 191.203.31.87 and 191.234.31.88
(D) 128.8.129.43 and 128.8.161.55

Answer: (D)

Explanation:
Background required – Subnetting and SubNet Mask
Answer – D
Explanation – Suppose we have a host A with IP Address IPA and Subnet mask of
the subnet of which A is a part is Ms. Now when A wants to send packet to a host B
with an IP address say IPB, then A will first AND the subnet-Mask Ms with IPA to find
out the subnet-id IDN of the subnet in order to identify whether IPB belongs to the
same network. Now if B also belongs to the same network, then IPB BITWISE-
AND Ms must be equal to IDN which A has calculated.
If IPA and IPB belongs to same network, we must have
IPA BITWISE-AND Ms == IPBBITWISE-AND Ms
Out of the 4 options, only option D matches.
128.8.129.43 BITWISE-AND 255.255.31.0 = 128.8.1.0
128.8.161.55 BITWISE-AND 255.255.31.0 = 128.8.1.0

You might also like