π IPv4 Addresses (12 MCQs)
Identifying Interfaces Across IP Networks
An IPv4 address is a 32-bit logical identifier assigned to a network interface for communication using Internet Protocol version 4. It is normally written as four decimal octets separated by dots. The address and its subnet prefix identify the network portion and host portion, allowing hosts and routers to make local-delivery and forwarding decisions. Network-layer decisions remain independent of the particular cable or wireless link carrying each packet.
Four Octets and Network Prefix
The 32 bits are divided into four 8-bit octets, each ranging from 0 to 255. A prefix length such as /24 specifies how many leading bits identify the network. The remaining bits identify hosts within that subnet, subject to reserved network and broadcast addresses in ordinary IPv4 subnets. Every device must interpret the relevant fields consistently to preserve correct packet delivery.
Using the Subnet Mask for Local Delivery
A host applies its subnet mask to its own address and the destination address to determine whether the destination is local. If both network portions match, it resolves the destination's link-layer address and sends directly. Otherwise, it sends the packet to a configured default gateway for routing. Local link addressing is resolved separately for each outgoing segment along the route.
Interpreting an IPv4 Address and Prefix
Consider 192.168.10.25/24. The first 24 bits identify network 192.168.10.0, while the host portion identifies .25. The subnet's directed broadcast address is 192.168.10.255, and the usual assignable host range is 192.168.10.1 through 192.168.10.254. Following the same steps with different addresses or rates produces a different forwarding result. This illustrates how the stated network information controls the packet's treatment at that stage.
IPv4 Addressing in LANs and Internetworks
IPv4 addressing supports communication within local networks and across routers. Public addresses are globally routable when properly allocated, while private ranges are reused inside private networks and commonly reach the Internet through translation. Address configuration, subnetting, routing tables, and ARP work together to deliver packets. These functions work together, but each protocol layer retains its own data unit and responsibility.
Misconceptions About IPv4 Addresses
'An IP address identifies a physical computer permanently' is incorrect because it identifies an interface and may be reassigned. 'Every address ending in .255 is a broadcast' is incorrect because broadcast depends on the subnet prefix. 'The subnet mask is part of the transmitted IPv4 address' is incorrect because it is configuration information.
IPv4 Address Interpretation in Examinations
Convert between dotted-decimal and binary notation, identify the prefix length, and calculate the network and broadcast addresses. Determine whether two hosts share a subnet and when a default gateway is needed. Distinguish private and public ranges, host addresses, network identifiers, and broadcast addresses. State the relevant rule first, then apply it systematically to the supplied network information.
IPv4 Addressing Terms
- IPv4 - 32-bit Internet Protocol
- Octet - eight-bit address unit
- Prefix length - counts network-leading bits
- Subnet mask - separates network and host bits
- Network address - identifies an IP subnet
- Broadcast address - targets all subnet hosts
π All IPv4 Addresses MCQs
Q1. What is the size, in bits, of an IPv4 address?
π Explanation: An IPv4 address consists of four octets, each 8 bits, giving a total of bits. This fixed length allows routers to process addresses efficiently and is the standard defined in the TCP/IP suite. Therefore, the address space is exactly 32 bits long, providing about 4.3 billion unique identifiers.
Q2. In a network that uses a /24 subnet mask, how many usable host addresses are available?
π Explanation: A /24 mask leaves 8 bits for host addresses, yielding total addresses. The first address is the network identifier and the last is the broadcast address, so subtracting these two leaves 254 usable host addresses. Hence option C is correct.
Q3. Given the IPv4 address 192.168.10.0 with a /26 prefix, what is the broadcast address for that subnet?
π Explanation: A /26 prefix allocates 26 network bits and 6 host bits, giving addresses per subnet. Starting at .0, the highest address in the block is .63, which serves as the broadcast address. Therefore, option D correctly identifies the broadcast address.
Q4. Which of the following statements about classful IPv4 addressing is false?
π Explanation: Classβ―D addresses (224.0.0.0/4) are reserved for multicast traffic, not for standard unicast communication. The other statements correctly describe classful characteristics, making the claim about Classβ―D being used for unicast false.
Q5. Why do private IP address ranges help reduce the demand for public IPv4 addresses?
π Explanation: Private ranges such as 10.0.0.0/8 are not advertised globally, allowing many organizations to use the same addresses internally. This reuse conserves the limited pool of public IPv4 addresses, reducing the overall demand for globally unique addresses.
Q6. In a /28 subnet where the network address is 172.16.0.0, which address is most commonly assigned as the default gateway?
π Explanation: A /28 subnet contains 16 addresses; .0 is the network identifier and .15 the broadcast address. The first usable host, .1, is traditionally chosen as the gateway because it is easy to remember and consistently positioned across subnets.
Q7. How does Classless Inter-Domain Routing (CIDR) improve routing efficiency in the Internet?
π Explanation: CIDR enables route summarization, where several contiguous address blocks are combined into one routing entry. This reduces the size of routing tables, lowers lookup times, and conserves memory, resulting in more efficient Internet routing.
Q8. An organization needs at least 500 hosts on a single subnet. Which subnet mask should be applied to satisfy this requirement?
π Explanation: To host 500 devices, a subnet must provide at least addresses; subtracting two reserved addresses leaves 510 usable hosts. A /23 mask (32β9=23) yields exactly this capacity, making it the appropriate choice.
Q9. When a classβ―B network (default /16) is subnetted with a /18 mask, how does the number of possible subnets change?
π Explanation: Changing from /16 to /18 adds two bits for subnetting. Each added bit doubles the subnet count, so the original classβ―B network can be divided into subnets. This illustrates the exponential increase in subnets when extra subnet bits are used.
Q10. In the IPv4 address 10.0.0.0/8, what is the decimal value of the first octet of the network address?
π Explanation: The address 10.0.0.0 belongs to the private Classβ―A range, where the first octet identifies the network portion. Its value is simply the decimal number 10, while the remaining octets are set to zero for the network identifier.
Q11. What is the most significant impact of IPv4 address exhaustion on the adoption of Network Address Translation (NAT)?
π Explanation: As the pool of globally unique IPv4 addresses dwindles, organizations increasingly rely on NAT to allow multiple internal devices to share a single public address. This necessity drives widespread NAT deployment, making it a dominant technique for conserving address space.
Q12. Two LANs with subnets 192.168.1.0/24 and 192.168.2.0/24 need to communicate without a router. Which technique enables this communication?
π Explanation: Bridging operates at Layerβ―2, linking separate Ethernet segments into a single broadcast domain. By using a bridge or switch that forwards frames between the two subnets, devices can exchange traffic directly without requiring Layerβ―3 routing, satisfying the requirement for communication without a router.