📝 Classless addressing CIDR and subnetting (28 MCQs)
Variable-Length Prefixes for Efficient Allocation
Classless Inter-Domain Routing, or CIDR, represents IPv4 networks with an explicit prefix length rather than fixed address classes. A prefix such as /20 identifies the first 20 network bits. Subnetting divides an address block into smaller prefixes, while route aggregation combines suitable contiguous blocks to reduce routing information. Network-layer decisions remain independent of the particular cable or wireless link carrying each packet.
Subnet Masks and Host-Bit Calculations
A subnet mask contains consecutive one bits for the network prefix followed by zero bits for host addresses. The number of addresses in a block is 2 raised to the number of host bits. For conventional IPv4 subnets, the network and directed-broadcast addresses are generally unavailable for ordinary host assignment.
Finding Network and Broadcast Addresses
To find the network address, perform a bitwise AND between the IPv4 address and subnet mask. The broadcast address sets all host bits to one. The first and last ordinary host values can then be determined for a conventional subnet, subject to special prefix rules such as /31 point-to-point links.
Subnetting a /24 into Four Equal Networks
Dividing 192.168.10.0/24 into four equal subnets borrows two host bits, producing /26 blocks. The subnet network addresses are 192.168.10.0, .64, .128, and .192. Each block contains 64 addresses, typically 62 ordinary host addresses, with its own directed-broadcast address. Following the same steps with different addresses or rates produces a different forwarding result.
CIDR and Hierarchical Internet Routing
CIDR reduces waste by allocating address blocks that suit organizational size and supports aggregation when prefixes are aligned. Routers use prefix matching rather than old class boundaries. Subnetting also separates departments or links, supports address planning, and helps control broadcast domains when combined with appropriate Layer 2 design. These functions work together, but each protocol layer retains its own data unit and responsibility.
Misconceptions About CIDR and Subnetting
'A /26 contains 26 host addresses' is incorrect because 26 is the prefix length. 'Every subnet has 254 usable hosts' is incorrect because host capacity depends on remaining bits. 'CIDR follows Class A, B and C defaults' is incorrect because it uses explicit variable-length prefixes. Questions often test this distinction by changing the address, device, or communication conditions.
CIDR Calculations to Practice
Convert prefix lengths into masks, determine host bits, and calculate block size. Use bitwise AND to find the network, then set host bits to one for the broadcast address. Practice subnet ranges, equal-size subnet division, aggregation boundaries, and the special treatment of /31 and /32 prefixes. State the relevant rule first, then apply it systematically to the supplied network information.
CIDR and Subnetting Terms
- CIDR - uses variable-length IP prefixes
- Prefix length - counts network bits
- Subnetting - divides a network block
- Subnet mask - marks network address bits
- Broadcast address - targets subnet-wide hosts
- Aggregation - combines aligned routes
📝 All Classless addressing CIDR and subnetting MCQs
Q1. What does CIDR stand for in the context of IP addressing?
📖 Explanation: CIDR is an acronym for Classless Inter-Domain Routing, a method that allows flexible allocation of IP address blocks without being constrained by traditional class boundaries, enabling more efficient use of the address space.
Q2. In CIDR notation, what does the suffix /24 indicate?
📖 Explanation: The /24 suffix specifies that the first 24 bits of the address constitute the network portion, leaving the remaining 8 bits for host addresses, which corresponds to a subnet mask of 255.255.255.0.
Q3. Which of the following IP ranges is reserved for private networks in classless addressing?
📖 Explanation: All three ranges are designated for private use: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16, allowing organizations to assign internal addresses without risking collisions on the public Internet.
Q4. What is the maximum number of host addresses available in a /26 subnet?
📖 Explanation: A /26 subnet provides 32 total addresses; subtracting the network and broadcast addresses leaves 30 usable hosts, but the standard calculation yields 2^{6}-2 = 62 usable host addresses.
Q5. If Link A has a capacity of 150 kbps and Link B has 100 kbps, what is the throughput of the path?
📖 Explanation: Throughput is limited by the bottleneck, the link with the smallest capacity, so the path can sustain only 100 kbps, regardless of the higher capacity of the other link.
Q6. A user connects via a 56 kbps dial‑up line while the server uses a 100 Mbps link. Which link determines the end‑to‑end throughput?
📖 Explanation: The end‑to‑end throughput is constrained by the slower side of the connection; the 56 kbps dial‑up line is the bottleneck, so it dictates the maximum achievable rate.
Q7. Given three sequential links with capacities 200 kbps, 120 kbps, and 80 kbps, if the source sends data at 150 kbps, what will happen over time?
📖 Explanation: The overall path is limited by the smallest link capacity (80 kbps). Even if the source attempts 150 kbps, the flow will be throttled to 80 kbps after the bottleneck, causing queuing upstream.
Q8. If the average data rate on Link3 is 100 kbps while its maximum capacity is 150 kbps, what can be inferred about the link’s utilization?
📖 Explanation: Since the average traffic (100 kbps) is well below the link’s capacity (150 kbps), the link is operating below its full potential, indicating under‑utilization.
Q9. Assume two access links with rates R1 = 20 Mbps and R2 = 5 Mbps, and a backbone link of 100 Gbps. If a file of size 500 MB is transferred, which factor most influences total transfer time?
📖 Explanation: The slowest component dictates the overall transfer rate; with R2 at 5 Mbps, the end‑to‑end throughput cannot exceed this value, making it the dominant factor in determining how long the 500 MB file takes to download.
Q10. In a network where the bottleneck link’s capacity is reduced by 30%, how does the end‑to‑end throughput change relative to its original value?
📖 Explanation: Throughput is directly tied to the bottleneck capacity; a 30 % reduction in that link’s bandwidth reduces the maximum achievable end‑to‑end rate by the same percentage.
Q11. If a path consists of an access link of 10 Mbps, a backbone link of 1 Gbps, and another access link of 2 Mbps, what is the theoretical maximum throughput?
📖 Explanation: The smallest link capacity—2 Mbps—limits the entire path, so the maximum sustainable throughput cannot exceed 2 Mbps despite the higher capacities of the other segments.
Q12. When both access links have equal capacity, how does adding a higher‑capacity backbone affect overall throughput?
📖 Explanation: If the two access links are identical, the backbone’s higher capacity does not change the bottleneck; the end‑to‑end throughput remains equal to the access link rate.
Q13. Suppose a traffic flow experiences a delay of 5 ms on Link A and 15 ms on Link B. If the packet size is 1,500 bytes, which link contributes more to the overall latency?
📖 Explanation: Latency consists of propagation delay plus transmission time; the larger 15 ms delay on Link B dominates, making it the primary contributor to total end‑to‑end latency.
Q14. Compare the effect of increasing the subnet mask from /24 to /26 on the number of available host addresses.
📖 Explanation: A /24 provides 256 total addresses (254 usable), whereas a /26 provides only 64 total addresses (62 usable), so moving to a longer mask reduces the number of hosts that can be assigned.
Q15. Which scenario provides a higher average throughput: (i) two 100 Mbps access links, or (ii) one 100 Mbps and one 50 Mbps link?
📖 Explanation: Throughput is limited by the smallest link; scenario i has both links at 100 Mbps, so the bottleneck is 100 Mbps, whereas scenario ii is limited to 50 Mbps, making scenario i superior.
Q16. Evaluate the impact on routing table size when using classless addressing versus classful addressing for the same number of networks.
📖 Explanation: Classless addressing allows aggregation of contiguous prefixes, reducing the number of distinct entries required in routing tables, whereas classful addressing forces fixed‑size networks, often leading to more entries.
Q17. Differentiate between the concepts of “network prefix” and “host identifier” in CIDR notation.
📖 Explanation: In CIDR, the prefix (the left‑most bits) defines the network portion, while the remaining bits specify the host within that network, clearly separating the two roles.
Q18. Given two networks: 192.168.0.0/24 and 192.168.1.0/24, analyze whether they can be aggregated into a single CIDR block without including unused addresses.
📖 Explanation: Both /24 networks are contiguous, so they can be combined into a single /23 block (192.168.0.0/23) which covers exactly those two /24 subnets without adding unrelated addresses.
Q19. Assess how the choice of subnet mask influences the probability of address exhaustion in a growing organization.
📖 Explanation: Using a smaller mask (shorter prefix) yields larger subnets with more host addresses, thereby lowering the chance of running out of addresses as the organization expands.
Q20. Contrast the routing efficiency of classful versus classless addressing when the network contains many small subnets.
📖 Explanation: Classless addressing permits variable‑length prefixes, enabling precise aggregation of many small subnets, which reduces routing table entries and improves efficiency compared with the rigid classful scheme.
Q21. Identify which of the following CIDR blocks represents the smallest network: /30, /24, /16, /8.
📖 Explanation: A longer prefix length corresponds to a smaller network; /30 provides only 4 IP addresses (2 usable), making it the smallest among the listed options.
Q22. If a company splits a /16 block into ten equal subnets, what is the new subnet mask length?
📖 Explanation: Dividing a /16 into 2^4 = 16 subnets requires four additional network bits, resulting in a /20 mask for each equal‑size subnet.
Q23. Analyze the effect on end‑to‑end latency if the bottleneck link’s capacity is increased from 100 kbps to 200 kbps while all other links remain unchanged.
📖 Explanation: Doubling the bottleneck capacity cuts the time needed to transmit a given amount of data, but overall latency also depends on propagation and processing delays, so the reduction is less than a perfect 50 %.
Q24. Apply the principle of the bottleneck to determine the throughput when the three links have capacities 80, 120, and 200 Mbps respectively.
📖 Explanation: The smallest capacity (80 Mbps) dictates the maximum flow that can traverse the entire path, so the achievable throughput cannot exceed 80 Mbps.
Q25. Explain why classless addressing allows more efficient use of IP address space compared to classful addressing.
📖 Explanation: By permitting arbitrary prefix lengths, CIDR enables organizations to allocate exactly the number of addresses required, reducing the number of unused addresses that would be inevitable under the rigid classful scheme.
Q26. Synthesize a strategy to allocate IP addresses for a data center that requires both large and small subnets using CIDR.
📖 Explanation: A hierarchical plan that starts with a large block (e.g., /16) and then creates smaller (/24) and medium (/22) sub‑blocks matches the varying size requirements while preserving aggregation for efficient routing.
Q27. Apply the concept of variable‑length subnet masking to minimize routing table entries in an ISP.
📖 Explanation: An ISP can combine multiple contiguous prefixes into a single aggregated entry (e.g., 192.0.2.0/22) using VLSM, thereby shrinking the global routing table and simplifying forwarding decisions.
Q28. Given a network where the average throughput is determined by the minimum of two access links, propose how traffic engineering could improve the effective throughput without changing physical link capacities.
📖 Explanation: By distributing traffic over several parallel paths or employing techniques like multipath TCP, the effective bandwidth seen by applications can rise, even though each individual physical link’s capacity remains unchanged.