🎓 BookMCQ
← Back to 18. Introduction to Network Layer

📝 IPv4 address space structure (12 MCQs)

The 32-Bit IPv4 Address Space

IPv4 uses a 32-bit address field, providing 2^32 possible bit patterns. Addresses are displayed as four decimal octets to make them easier to read. Allocation and subnetting divide this space into network prefixes and interface addresses, while certain ranges are reserved for private use, multicast, loopback, or special purposes. These responsibilities connect separate IP networks while preserving a consistent addressing framework for end systems.

Binary Octets and Dotted-Decimal Notation

Each octet represents eight bits and therefore has 256 possible values, from 0 through 255. The displayed address is a notation for a 32-bit value, not four independent network identifiers. The division between network and host bits is determined by the prefix length, not by the dots. These fields allow forwarding devices to interpret packet purpose and choose the appropriate next processing action.

Address Blocks and Reserved Ranges

An address block is expressed as a prefix, such as 198.51.100.0/24. The prefix defines the block size, and the remaining host bits define addresses inside it. Certain blocks are reserved for documentation, private addressing, multicast, loopback, link-local use, or other special functions. Each hop repeats the required lookup, while link-specific framing is rebuilt for the next transmission.

Calculating the Size of a Prefix Block

A /24 prefix leaves 8 host bits, so it contains 2^8, or 256, address values. In a conventional subnet, the all-zero host value identifies the network and the all-one host value is the directed broadcast, leaving 254 ordinary host addresses. Special-purpose prefixes have different rules. This illustrates how the stated network information controls the packet's treatment at that stage.

How Address Structure Supports Routing

Routers aggregate addresses into prefixes so that one route can represent many destinations. Subnetting divides a larger allocation into smaller networks, while route aggregation combines contiguous blocks when their boundaries align. This hierarchical structure helps conserve routing-table space and supports scalable forwarding across the Internet. This division keeps internetwork delivery separate from local transmission and end-to-end application behavior.

Misunderstandings About the IPv4 Space

'IPv4 has unlimited addresses' is incorrect because its address field is 32 bits. 'Every /24 always has 256 assignable hosts' is incorrect because conventional subnets reserve two addresses. 'Dotted decimal defines the network boundary' is incorrect because the prefix or mask determines that boundary. Such distinctions prevent assigning guarantees or processing steps to a layer that does not provide them.

IPv4 Address-Structure Calculations

Calculate address-block size using 2 raised to the number of host bits. Convert octets to binary when finding network boundaries, and distinguish total addresses from usable host addresses. Interpret special-purpose ranges carefully, and use prefix length rather than visual octet boundaries to determine subnet membership. Show the intermediate values and justify each choice instead of stating only the final result.

IPv4 Structure and Prefix Terms

  • Address space - set of possible addresses
  • Dotted decimal - four decimal octets
  • Octet - eight-bit address unit
  • Prefix - leading network bits
  • Host bits - identify hosts within subnet
  • Address aggregation - combines contiguous network prefixes
3
Easy
6
Medium
3
Hard

📝 All IPv4 address space structure MCQs

Q1. If a host changes its IP address from 10.0.0.5 to 10.0.1.5 while remaining in the same /16 network, which of the following statements is true about its address space?

A.Its network prefix changes
B.Its host identifier changes ✅
C.Both network and host parts change
D.No part changes
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The /16 mask (255.255.0.0) keeps the first two octets fixed, so the network portion stays the same. Changing the third octet from 0 to 1 modifies only the host identifier within that network, leaving the network prefix unchanged. Hence the host identifier is what changes.

Q2. Compare classful and classless addressing: which statement accurately reflects a key difference regarding address space utilization?

A.Classful networks always allocate a fixed-size address block regardless of host count
B.Classless addressing allows variable-length subnet masks to fit the exact number of hosts ✅
C.Classful addressing supports CIDR notation
D.Classless addressing eliminates the need for network identifiers
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Classless (CIDR) permits the use of variable‑length subnet masks, enabling subnets to be sized precisely to the number of required hosts. This reduces wasted addresses compared to classful schemes, where each class has a predetermined block size that may be far larger than needed.

Q3. Applying CIDR, a network administrator wants to allocate exactly 200 host addresses. Which subnet mask provides the smallest possible address space that satisfies this requirement?

A./23 ✅
B./24
C./25
D./22
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: A /23 mask yields 2^(32‑23)=512 total addresses, minus network and broadcast addresses, leaving 510 usable hosts. This is the smallest block that meets or exceeds the 200‑host requirement, whereas /24 gives only 254 usable (still enough) but uses a larger network prefix, making /23 the minimal fit.

Q4. What does the term \address space\ refer to in IPv4?

A.The set of all possible MAC addresses
B.The range of port numbers
C.The collection of all IP addresses that can be assigned within the protocol ✅
D.The physical layout of network cables
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: In IPv4, address space denotes the entire pool of 32‑bit IP addresses that can be assigned to interfaces. It encompasses every possible numeric address from 0.0.0.0 to 255.255.255.255, subject to reserved ranges, and defines the limits for network and host allocations.

Q5. When a router receives a datagram with a destination address outside its own address space, what must it do?

A.Drop the packet and generate an ICMP error
B.Forward the packet based on its routing table ✅
C.Encapsulate it in a new frame with its own MAC address
D.Broadcast it on all interfaces
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Routers operate at the network layer and are not concerned with the source's address space. Upon receiving a packet destined for an external network, they consult their routing table to determine the next hop and forward the datagram accordingly, ensuring end‑to‑end delivery across multiple networks.

Q6. Evaluate the impact of overlapping address spaces in two interfacing networks on routing decisions. Which outcome is most likely?

A.Routing tables will merge automatically without conflict
B.Packets will be dropped due to ambiguous routes
C.Both networks will use the same default gateway
D.Routing may select an incorrect path, leading to misdelivery or loops ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: When address spaces overlap, routers cannot uniquely determine the correct outgoing interface for a destination, causing ambiguous routes. This ambiguity can result in packets being sent to the wrong network, creating potential loops or misdelivery, unless additional mechanisms such as route tagging or NAT are employed to disambiguate.

Q7. Apply the principle of hierarchical addressing: how does dividing address space into network and subnet portions improve routing efficiency?

A.It reduces the number of required routers globally
B.It allows routers to aggregate routes and limit table size
C.It eliminates the need for IP addresses on end hosts ✅
D.It increases the maximum number of possible hosts per network
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: Hierarchical addressing separates a large address space into network and subnet identifiers, enabling routers to summarize multiple sub‑nets into a single route entry. This aggregation shrinks routing tables, speeds up lookup operations, and reduces the processing overhead on backbone routers, thereby enhancing overall routing efficiency.

Q8. If a /20 network is split into equal-sized subnets, how many subnets are created and how many host addresses does each subnet contain?

A.16 subnets, 254 hosts each ✅
B.8 subnets, 510 hosts each
C.4 subnets, 1022 hosts each
D.2 subnets, 2046 hosts each
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: A /20 network has a 12‑bit host portion. Subnetting to /24 adds 4 bits to the network portion, producing 2^4 = 16 subnets. Each /24 subnet retains an 8‑bit host portion, yielding 2^8 = 256 total addresses, minus network and broadcast addresses, resulting in 254 usable host addresses per subnet.

Q9. Differentiate between public and private address spaces: which of the following ranges is reserved for private use?

A.8.0.0.0/8
B.100.64.0.0/10
C.172.31.0.0/16
D.192.168.0.0/16 ✅
💡 Difficulty: easy | ✅ Correct: D

📖 Explanation: Private IPv4 address ranges are defined by RFC 1918 and include 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. Among the options, 192.168.0.0/16 is explicitly designated for private networks, meaning these addresses are not routable on the public Internet and are intended for internal use.

Q10. Synthesize a strategy for allocating address space in a large enterprise using VLSM to minimize waste while supporting growth. Which approach best reflects this strategy?

A.Assign a single /16 block to the entire enterprise
B.Create equal‑sized /24 subnets for every department regardless of size
C.Allocate variable‑length masks based on the exact host count of each department and reserve a pool for future expansion ✅
D.Use only private address ranges and ignore VLSM considerations
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: Using Variable Length Subnet Masking (VLSM), the enterprise can tailor each subnet's size to the precise number of hosts required, avoiding unnecessary address wastage. By also reserving a contiguous address pool for future departments, the network remains flexible and scalable without having to renumber existing subnets.

Q11. Which layer directly provides services to the network layer?

A.Data-link ✅
B.Transport
C.Application
D.Physical
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The data‑link layer (Layer 2) supplies the network layer with framing, error detection, and MAC addressing, enabling the network layer to forward IP datagrams across a physical link. It abstracts the underlying hardware, delivering reliable bit‑level transmission services that the network layer relies upon for host‑to‑host delivery.

Q12. Analyze why the IPv4 address space is considered limited compared to IPv6, focusing on the number of bits and resulting address count. Which statement is correct?

A.IPv4 uses 64 bits, giving 2^64 addresses, while IPv6 uses 128 bits
B.IPv4 uses 32 bits, yielding about 4.3 billion addresses, whereas IPv6 uses 128 bits, providing 3.4 × 10^38 addresses
C.Both IPv4 and IPv6 provide the same number of addresses but differ in format ✅
D.IPv6 reduces the address space to simplify routing
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: IPv4's 32‑bit address format caps the total pool at roughly 4.3 billion unique addresses, which has proven insufficient for the modern, device‑rich Internet. IPv6 expands the address field to 128 bits, dramatically increasing the address pool to an astronomically larger number, thereby eliminating scarcity concerns.

🔗 Related Topics (MCQs)