π Internet Protocol (IP) Overview (16 MCQs)
IP as the Network Layer Delivery Service
Internet Protocol provides the basic connectionless service used to move datagrams across interconnected networks. It identifies source and destination hosts with logical addresses and allows routers to forward packets independently of the applications that created them. IP does not establish a dedicated end-to-end connection or guarantee delivery, ordering, or error recovery; reliability, when required, is supplied by higher-layer protocols such as TCP.
Datagrams, Addresses and Best-Effort Delivery
An IP datagram contains a header and payload. The header carries source and destination IP addresses, a protocol identifier, length information and fields used during forwarding. Routers examine the destination address and select a next hop from their forwarding tables. Each link can carry the datagram in a different frame format, while the IP packet remains the network-layer unit.
Encapsulation and Router Forwarding
A sending host places a transport segment inside an IP datagram, then encapsulates that datagram in a data-link frame for the first link. Each router removes the incoming frame header, examines the IP header, decreases the IPv4 TTL, updates the header checksum and constructs a new frame for the outgoing link. The destination host finally passes the payload to the indicated upper-layer protocol.
Example of an IP Datagram Crossing Two Networks
A computer with address 192.0.2.10 sends an IP packet to 198.51.100.20 through a router. The first Ethernet frame is addressed to the router's local MAC address, not the remote computer's MAC address. The router forwards the same IP destination toward the next network, creating a new link-layer frame for that outgoing connection.
How IP Relates to Transport and Data Link Layers
IP operates between transport services and the data-link technologies used on individual links. TCP or UDP identifies the receiving application through port numbers, while IP identifies the destination host or interface. Ethernet, Wi-Fi and point-to-point links carry IP datagrams in their own frames. This separation allows different network technologies to interoperate through a common internetwork layer.
Misunderstandings About IP Delivery Guarantees
'IP guarantees that every packet arrives' is incorrect because IP offers best-effort delivery. 'An IP address identifies an application' is incorrect because transport ports identify application endpoints. 'The destination MAC address is carried unchanged across the Internet' is incorrect because each router builds a new link-layer frame for its next hop.
What to Identify in IP Packet Questions
In examination problems, identify the network-layer role, datagram header, source and destination addresses, upper-layer protocol field and router forwarding decision. Trace encapsulation across different links without confusing MAC and IP addresses. Explain why packets can be lost, duplicated or delivered out of order, and distinguish IP's best-effort service from reliability provided by TCP.
IP Addressing and Packet-Delivery Terminology
- Datagram - Connectionless packet at network layer.
- IP address - Logical interface identifier.
- Forwarding - Next-hop packet transfer.
- TTL - Limits IPv4 packet lifetime.
- Protocol field - Identifies upper-layer protocol.
- Best effort - No delivery or ordering guarantee.
π All Internet Protocol (IP) Overview MCQs
Q1. What does DHCP stand for?
π Explanation: Dynamic Host Configuration Protocol is the correct expansion of DHCP. It is a network protocol that automatically assigns IP addresses and other configuration parameters to devices on a network, allowing them to communicate efficiently without manual setup.
Q2. In which OSI layer does the Internet Protocol (IP) primarily operate?
π Explanation: IP is a core protocol of the Internet suite that functions at the Network layer (Layer 3) of the OSI model. It is responsible for logical addressing and routing of packets across network boundaries, distinguishing it from transport or application layer functions.
Q3. A DHCP server has a pool of 200 addresses. If 150 hosts obtain leases, how many addresses remain free?
π Explanation: Subtracting the number of allocated leases from the total pool gives the remaining addresses: 200β―ββ―150β―=β―50. Therefore, 50 addresses are still available for future lease requests, illustrating basic resource tracking in DHCP management.
Q4. What is the broadcast address for the network 110.40.240.0/22?
π Explanation: A /22 mask corresponds to 255.255.252.0, leaving the last 10 bits for host addresses. Setting all host bits to 1 yields the broadcast address 110.40.243.255, which is the highest address in that subnet.
Q5. In an 8βbit address space equally divided among four networks, what binary prefix identifies network N2?
π Explanation: Dividing 8 bits into four equal parts allocates 2 bits for the network identifier. The identifiers are 00 for N0, 01 for N1, 10 for N2, and 11 for N3. Thus, N2 is represented by the binary prefix 10 followed by six wildcard bits.
Q6. A packet destined for 10100101 arrives at the router connecting four /8 networks. Which interface forwards it?
π Explanation: The first two bits of the address (10) match the prefix assigned to network N2, which is connected to interface m2. Because longestβprefix matching selects the most specific matching entry, the router forwards the packet out of interface m2.
Q7. How do NAT and DHCP differ in conserving IP addresses?
π Explanation: NAT conserves addresses by allowing many internal devices to appear as a single external address through translation, whereas DHCP conserves addresses by dynamically allocating a pool of addresses to hosts as needed, avoiding permanent assignments.
Q8. When the block 12.44.184.0/21 is split into a /22 for a medium company and a /23 for a small company, how can routing still work correctly?
π Explanation: Routers use longestβprefix matching, so more specific /22 and /23 entries take precedence over the broader /21 entry. This ensures packets destined for the subβorganizations are correctly directed, while traffic for the remaining addresses follows the original /21 route.
Q9. An ISP has block 16.12.64.0/20 and allocates eight organizations each 256 addresses. How many addresses remain unallocated?
π Explanation: A /20 contains 2^{12}=4096 addresses. Eight allocations of 256 addresses consume 8β―Γβ―256β―=β―2048 addresses, leaving 4096β―ββ―2048β―=β―2048 unallocated. The answer therefore is 2048, which corresponds to option C.
Q10. What is the first address of the fourth organization's allocation in the above ISP scenario?
π Explanation: Each organization receives a /24 block (256 addresses). Starting at 16.12.64.0, the blocks are: .64.0, .65.0, .66.0, and .67.0. Hence, the fourth organization begins at 16.12.67.0.
Q11. For ISP block 80.70.56.0/21, after allocating two 500βaddress orgs, two 250βaddress orgs, and three 50βaddress orgs, how many addresses are left unused?
π Explanation: A /21 provides 2^{11}=2048 addresses. Allocations total 2Γ500β―+β―2Γ250β―+β―3Γ50β―=β―1000β―+β―500β―+β―150β―=β―1650. Subtracting from 2048 leaves 398 unused addresses, matching option A.
Q12. Why does subnetting 170.40.11.0/24 into two /25 subnets support more hosts than using a single /26 subnet?
π Explanation: A /25 mask (255.255.255.128) leaves 7 host bits, yielding 2^{7}β―ββ―2β―=β―126 usable addresses per subnet. In contrast, a /26 mask leaves only 6 host bits, giving 62 usable addresses. Splitting into two /25s therefore provides twice the host capacity per subnet.
Q13. Which of the following blocks provides the greatest number of host addresses?
π Explanation: A /18 mask leaves 14 host bits, yielding 2^{14}β―ββ―2β―=β―16382 usable addresses. The /22 leaves 10 host bits (1022 hosts) and the /24 leaves 8 host bits (254 hosts). Hence, the 70.14.0.0/18 block offers the most host addresses.
Q14. In a 12βbit internet divided equally among eight networks, what prefix length should each forwardingβtable entry use?
π Explanation: Eight equal networks require bits for the network identifier. Therefore each entry uses a 3βbit prefix (e.g., 000, 001, β¦, 111). This length uniquely identifies each network while leaving the remaining 9 bits for host addresses.
Q15. Three contiguous /24 blocks (192.168.0.0/24, 192.168.1.0/24, 192.168.2.0/24) are combined into a single supernet. Which CIDR notation correctly represents the aggregated block?
π Explanation: Combining three /24 blocks that share the first 22 bits forms a /22 network (192.168.0.0β―ββ―192.168.3.255). The correct CIDR notation for this supernet is 192.168.0.0/22, which is option B.
Q16. In the 9βbit address space scenario, the forwarding table contains entries: 00 β m0, 01 β m1, 1 β m2. To which interface will a packet with destination 011011001 be sent?
π Explanation: The destination address begins with the bits β01β, matching the prefix 01 in the table, which maps to interface m1. Therefore, the packet is forwarded out of interface m1.