All Exams Test series for 1 year @ ₹349 only
Question

You need 500 subnets, each with about 100 usable host addresses per subnet. What network mass will you assign using a class B network address?

The correct answer is

255.255.255.128

Understanding the Network Subnetting Problem

This question asks us to find the correct subnet mask for a Class B network address to meet specific requirements: creating at least 500 subnets, with each subnet needing to support approximately 100 usable host addresses. Subnetting involves dividing a large network into smaller, more manageable subnetworks. This is done by borrowing bits from the host portion of the IP address and adding them to the network portion, which is reflected in the subnet mask.

Class B Network Address Basics

A Class B network address uses the first two octets for the network portion and the last two octets for the host portion by default.

  • Default network bits: 16
  • Default host bits: 16
  • Default subnet mask: 255.255.0.0

In a Class B network, the first two octets are fixed for the network ID, and the remaining 16 bits are available for host addresses or for subnetting.

Analyzing Requirements: Subnets and Hosts

We need to satisfy two main conditions:

  1. At least 500 subnets.
  2. About 100 usable host addresses per subnet.

Requirement 1: Number of Subnets

The number of subnets is determined by the number of bits borrowed from the host portion. If 's' is the number of bits borrowed for subnetting, the number of possible subnets is $2^s$. We need at least 500 subnets:

$2^s \ge 500$

  • If $s=8$, $2^8 = 256$ (Not enough)
  • If $s=9$, $2^9 = 512$ (Enough)

So, we need to borrow at least 9 bits for subnetting.

Requirement 2: Usable Host Addresses per Subnet

The number of usable host addresses per subnet is determined by the number of remaining host bits. If 'h' is the number of bits left for hosts, the number of usable host addresses is $2^h - 2$. We need about 100 usable hosts:

$2^h - 2 \ge 100$

$2^h \ge 102$

  • If $h=6$, $2^6 = 64$ ($64 - 2 = 62$ usable hosts, Not enough)
  • If $h=7$, $2^7 = 128$ ($128 - 2 = 126$ usable hosts, Enough)

So, we need at least 7 bits remaining for host addresses.

Calculating the Subnet Mask

A standard Class B network has 16 network bits and 16 host bits. We determined we need 7 host bits ($h=7$). Since the original host portion has 16 bits, the number of bits borrowed for subnetting is $16 - h = 16 - 7 = 9$.

This confirms our earlier calculation that we need 9 subnet bits ($s=9$).

The subnet mask is created by setting the network bits and the borrowed subnet bits to 1, and the host bits to 0.

  • Default network bits (Class B): 16 (all 1s)
  • Borrowed subnet bits: 9 (all 1s)
  • Remaining host bits: 7 (all 0s)

Total bits for the mask: 16 (network) + 9 (subnet) + 7 (host) = 32 bits.

Let's write this in binary, grouped by octets:

  • Octet 1: 8 network bits -> 11111111 ($255_{10}$)
  • Octet 2: 8 network bits -> 11111111 ($255_{10}$)
  • Octet 3: 8 subnet bits (borrowed from host portion) -> 11111111 ($255_{10}$)
  • Octet 4: 1 subnet bit (borrowed) + 7 host bits (remaining) -> 10000000 ($128_{10}$)

Combining these, the subnet mask in dotted decimal format is 255.255.255.128.

Verifying the Calculated Mask

Let's check if the mask 255.255.255.128 meets the requirements.

Mask in binary: 11111111.11111111.11111111.10000000

  • Number of network and subnet bits (1s): $8 + 8 + 8 + 1 = 25$.
  • Number of host bits (0s): 7.

Assuming a Class B network (first 16 bits are network by default):

  • Subnet bits borrowed: $25 - 16 = 9$. Number of subnets = $2^9 = 512$. (Meets the >= 500 subnet requirement)
  • Host bits remaining: 7. Usable hosts per subnet = $2^7 - 2 = 128 - 2 = 126$. (Meets the >= 100 usable hosts requirement)

The subnet mask 255.255.255.128 satisfies both conditions.

Comparing with Options

Let's look at the provided options and their corresponding host bits and subnet bits for a Class B network:

Subnet Mask Binary Representation (last two octets) Total 1s (Network+Subnet) Host Bits (0s) Usable Hosts ($2^h-2$) Subnet Bits (Total 1s - 16) Number of Subnets ($2^s$)
255.255.255.252 11111111.11111100 30 2 $2^2-2 = 2$ $30-16 = 14$ $2^{14} = 16384$
255.255.255.128 11111111.10000000 25 7 $2^7-2 = 126$ $25-16 = 9$ $2^9 = 512$
255.255.255.0 11111111.00000000 24 8 $2^8-2 = 254$ $24-16 = 8$ $2^8 = 256$
255.255.254.0 11111110.00000000 23 9 $2^9-2 = 510$ $23-16 = 7$ $2^7 = 128$

From the table, the subnet mask 255.255.255.128 provides 512 subnets and 126 usable hosts per subnet, meeting both the requirement for at least 500 subnets and about 100 usable hosts.

Conclusion

To create approximately 500 subnets, each with about 100 usable host addresses, from a Class B network, you need to borrow 9 bits for subnetting, leaving 7 bits for hosts. This results in a subnet mask of 255.255.255.128.

Revision Table: Subnetting Concepts

Concept Description
IP Address A unique numerical label assigned to each device in a computer network. IPv4 addresses are 32 bits long.
Subnet Mask A 32-bit number used to distinguish the network portion from the host portion of an IP address.
Network Address The identifier for the network itself. All host bits are 0.
Broadcast Address Used to send data to all devices on a network or subnet. All host bits are 1.
Usable Hosts IP addresses within a subnet that can be assigned to devices ($2^h - 2$, excluding network and broadcast addresses).
Subnetting The process of dividing a large network into smaller subnetworks.

Additional Information: Classful vs. Classless Addressing

Historically, IP addresses were divided into classes (A, B, C, D, E). Class A, B, and C had default network/host boundaries. Subnetting within these classes, while possible, often adhered to these boundaries.

Modern networking primarily uses Classless Inter-Domain Routing (CIDR), which ignores the traditional class boundaries. CIDR notation uses a slash followed by a number (e.g., /25), indicating the total number of network and subnet bits (the prefix length).

In this problem, we started with a Class B network assumption, but the subnetting process itself results in a mask (255.255.255.128) which corresponds to a /25 prefix length (25 network/subnet bits). This is an example of how subnetting moves towards a more flexible, classless approach, even when starting from a classful address space. Using CIDR allows for Variable Length Subnet Masking (VLSM), where different subnets within the same larger network can have different mask lengths.

Was this answer helpful?

Important Questions from Network Layer

  1. Firewall is a device that filters access to the protected network from the outside network. Firewalls can filter the packets on the basis of

    (A) Source IP Address

    (B) Destination IP Address

    (C) TCP Source Port

    (D) UDP Source Port

    (E) TCP Destination Port

    Choose the correct answer from the options given below:

  2. The full form of ICANN is

  3. What is the name of the protocol that allows a client to send a broadcast message with its MAC address and receive an IP address in reply?

  4. In OSI model network layer is responsible for _______.

  5. Which of the following delays are present in packet switching?

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App