πŸŽ“ BookMCQ
← Back to 19. Network Layer Protocols

πŸ“ 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.
5
Easy
7
Medium
4
Hard

πŸ“ All Internet Protocol (IP) Overview MCQs

Q1. What does DHCP stand for?

A.Dynamic Host Configuration Protocol βœ…
B.Distributed Host Control Procedure
C.Dynamic Hypertext Communication Process
D.Direct Host Configuration Protocol
πŸ’‘ Difficulty: easy | βœ… Correct: A

πŸ“– 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?

A.Network Layer βœ…
B.Transport Layer
C.Data Link Layer
D.Application Layer
πŸ’‘ Difficulty: easy | βœ… Correct: A

πŸ“– 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?

A.30
B.40
C.50 βœ…
D.60
πŸ’‘ Difficulty: easy | βœ… Correct: C

πŸ“– 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?

A.110.40.243.255
B.110.40.241.255 βœ…
C.110.40.242.255
D.110.40.240.255
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– 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?

A.00******
B.01******
C.10****** βœ…
D.11******
πŸ’‘ Difficulty: medium | βœ… Correct: C

πŸ“– 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?

A.m2 βœ…
B.m0
C.m3
D.m1
πŸ’‘ Difficulty: hard | βœ… Correct: A

πŸ“– 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?

A.NAT shares one public address among many private hosts, while DHCP assigns unique addresses to each host.
B.NAT assigns static addresses, whereas DHCP provides dynamic leasing. βœ…
C.NAT translates address spaces, whereas DHCP supplies configuration parameters, including addresses, to hosts.
D.Both NAT and DHCP reduce the number of required public addresses, but NAT does so by translation and DHCP by allocation.
πŸ’‘ Difficulty: easy | βœ… Correct: B

πŸ“– 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?

A.By configuring a default route to the original /21 block only.
B.By adding more specific /22 and /23 routes that override the broader /21 route.
C.By discarding the original /21 route and using only the /22 and /23 routes.
D.By using NAT to map the smaller blocks to the original address space. βœ…
πŸ’‘ Difficulty: easy | βœ… Correct: D

πŸ“– 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?

A.1024
B.2048
C.3072 βœ…
D.4096
πŸ’‘ Difficulty: medium | βœ… Correct: C

πŸ“– 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?

A.16.12.66.0
B.16.12.67.0 βœ…
C.16.12.68.0
D.16.12.69.0
πŸ’‘ Difficulty: hard | βœ… Correct: B

πŸ“– 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?

A.398 βœ…
B.448
C.498
D.548
πŸ’‘ Difficulty: hard | βœ… Correct: A

πŸ“– 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?

A.A /25 provides 126 usable host addresses per subnet, double the 62 of a /26.
B.A /25 reduces the number of network bits, freeing more host bits.
C.A /25 allows overlapping address ranges, increasing total hosts. βœ…
D.A /25 uses variable‑length subnet masks, which inherently increase host capacity.
πŸ’‘ Difficulty: medium | βœ… Correct: C

πŸ“– 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?

A.70.14.0.0/18 βœ…
B.110.40.240.0/22
C.170.40.11.0/24
D.All provide the same number of hosts
πŸ’‘ Difficulty: medium | βœ… Correct: A

πŸ“– 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?

A.3 bits
B.4 bits
C.5 bits
D.6 bits βœ…
πŸ’‘ Difficulty: hard | βœ… Correct: D

πŸ“– Explanation: Eight equal networks require log⁑28=3\log_2 8 = 3 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?

A.192.168.0.0/22
B.192.168.0.0/23 βœ…
C.192.168.0.0/24
D.192.168.0.0/21
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– 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?

A.m0 βœ…
B.m1
C.m2
D.Drop the packet
πŸ’‘ Difficulty: medium | βœ… Correct: A

πŸ“– 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.

πŸ”— Related Topics (MCQs)