DHCP, ARP & NAT Questions with Answers

25 practice questions on DHCP, ARP & NAT (Computer Networks) with answers and step-by-step solutions. Try 10 samples below, then practise all 25 free in the AptiNest app.

Sample questions

Question 1Easy

How is an ARP request sent on an Ethernet LAN?

  1. As a broadcast frame
  2. As a unicast to the router
  3. Over TCP port 80
  4. As a multicast to DNS servers

Answer: A. As a broadcast frame

Explanation

The requester does not know the target's MAC, so it broadcasts "who has this IP?"; the owner replies by unicast.

Step-by-step solution

  1. ARP request is broadcast to all devices on the LAN.
  2. All devices check if the IP matches theirs.
  3. The device with the matching IP responds via unicast.
  4. Broadcast frame ensures all devices receive the request.
  5. Final answer: As a broadcast frame.

Why the other options are wrong

  • B. A unicast to the router would not find the target; ARP is sent as a broadcast to all hosts.
  • C. ARP is a link-layer protocol, not TCP; it does not use port 80.
  • D. ARP does not multicast to DNS servers; it asks the local link who owns an IP address.

Tip: Remember ARP broadcasts to discover MAC addresses.

Question 2Easy

What is the correct order of messages when a client obtains an address from DHCP?

  1. Offer, Discover, Acknowledge, Request
  2. Discover, Request, Offer, Acknowledge
  3. Discover, Offer, Request, Acknowledge
  4. Request, Offer, Discover, Acknowledge

Answer: C. Discover, Offer, Request, Acknowledge

Explanation

The DORA exchange: the client broadcasts Discover, servers Offer, the client Requests one offer and the server Acknowledges.

Step-by-step solution

  1. Client sends Discover to find DHCP servers.
  2. Servers respond with Offer containing an IP address.
  3. Client requests the offered IP address.
  4. Server acknowledges the request and assigns the IP.

Why the other options are wrong

  • A. Offer comes after Discover, not before; the client must first send Discover.
  • B. Request comes after Offer; Discover starts the process, so this order is wrong.
  • D. The client sends Request only after an Offer, so starting with Request is not possible.

Tip: Remember DORA: Discover, Offer, Request, Acknowledge.

Question 3Easy

How did NAT help with IPv4 address exhaustion?

  1. Devices share few public IPs
  2. It made IPv4 addresses 64 bits long
  3. It removes the need for subnets
  4. It assigns IPv6 addresses to IPv4 hosts

Answer: A. Devices share few public IPs

Explanation

Private ranges are reused in every organisation while only the NAT device needs public addresses.

Step-by-step solution

  1. Without NAT, every device needing internet access would need its own unique public IPv4 address.
  2. The roughly 4-billion-address IPv4 space can't cover every device on earth.
  3. NAT lets one public IP front an entire private network, so only the edge router consumes a public address.
  4. Private ranges (10.x, 172.16-31.x, 192.168.x) are reused inside countless separate networks without clashing.

Why the other options are wrong

  • B. NAT doesn't change the address length; IPv4 addresses stay 32 bits. (64-bit addressing isn't a real IP standard at all.)
  • C. Subnetting is still used everywhere alongside NAT; NAT doesn't remove the need for it.
  • D. NAT translates IPv4-to-IPv4 addresses; it doesn't assign IPv6 addresses to IPv4 hosts.

Tip: One public IP in front, many private IPs behind - that's the saving.

Question 4Easy

Which protocol maps a hostname such as mail.example.com to an IP address?

  1. DNS
  2. NAT
  3. ARP
  4. DHCP

Answer: A. DNS

Explanation

DNS resolves names to IPs; ARP resolves IPs to MAC addresses on the local link.

Step-by-step solution

  1. A browser knows a hostname (mail.example.com) but needs an IP address to open a TCP connection.
  2. DNS is the directory service that performs this hostname-to-IP lookup, via a hierarchy of resolvers and authoritative servers.

Why the other options are wrong

  • B. NAT translates one IP address to another (e.g. private to public); it doesn't resolve names at all.
  • C. ARP maps an IP address to a MAC address on the local link, a different kind of resolution entirely.
  • D. DHCP assigns IP configuration to a host; it doesn't look up hostnames.

Tip: DNS = name to IP; ARP = IP to MAC. Keep the two resolution layers straight.

Question 5Medium

Which IPv4 block is reserved for carrier-grade NAT shared address space?

  1. 172.16.0.0/12
  2. 192.0.2.0/24
  3. 169.254.0.0/16
  4. 100.64.0.0/10

Answer: D. 100.64.0.0/10

Explanation

100.64.0.0/10 (RFC 6598) is shared address space between ISP and customer equipment.

Step-by-step solution

  1. ISPs that run their own carrier-grade NAT (CGNAT) need an address range distinct from customers' own private ranges, so the two never collide.
  2. RFC 6598 reserved 100.64.0.0/10 as 'shared address space' for exactly this ISP-to-customer-equipment use.

Why the other options are wrong

  • A. 172.16.0.0/12 is an ordinary RFC 1918 private range, the same kind customers already use inside their own networks - reusing it for CGNAT would risk collisions.
  • B. 192.0.2.0/24 (TEST-NET-1) is reserved for documentation and examples, not for live addressing.
  • C. 169.254.0.0/16 is the link-local (APIPA) range a host picks for itself when no DHCP server answers, unrelated to CGNAT.

Tip: 100.64.0.0/10 is the ISP's own private range, separate from your router's 192.168.x.x.

Question 6Medium

Why can an outside host not normally start a connection to a PC behind a home router that uses PAT?

  1. Private addresses cannot use TCP
  2. The router has no public address
  3. PAT encrypts all inbound packets with a key that only the inside hosts know
  4. There is no translation entry until the inside host initiates traffic

Answer: D. There is no translation entry until the inside host initiates traffic

Explanation

Without an existing mapping or a configured port forward, the router does not know which inside host should receive the packet.

Step-by-step solution

  1. PAT creates translation entries only when inside hosts initiate traffic.
  2. Without an entry, the router cannot direct inbound packets to the correct PC.
  3. The router has no way to know which internal device to send data to.
  4. This is why the connection cannot be started from outside.
  5. Final answer: There is no translation entry until the inside host initiates traffic.

Why the other options are wrong

  • A. Private addresses can use TCP just as public ones can; TCP is not the problem here.
  • B. The router does have a public address on its outside interface, so that is not the reason.
  • C. PAT does not encrypt traffic at all; it only rewrites addresses and ports in packet headers.

Tip: Remember PAT only works when the internal device starts the connection.

Question 7Medium

Clients in one subnet must get addresses from a DHCP server in another subnet. What is needed on the router?

  1. A NAT rule
  2. A DHCP relay agent (e.g. ip helper-address)
  3. A static ARP entry
  4. A second default route pointing towards the DHCP server

Answer: B. A DHCP relay agent (e.g. ip helper-address)

Explanation

Routers do not forward broadcasts; a relay agent forwards DHCP messages to the server as unicast and marks which subnet they came from.

Step-by-step solution

  1. DHCP uses broadcast, routers don't forward it.
  2. Relay agent sends messages as unicast to server.
  3. Relay agent tells server which subnet the request came from.
  4. This lets server assign correct IP address.
  5. So a DHCP relay agent is needed on the router.

Why the other options are wrong

  • A. A NAT rule translates addresses; it does not relay DHCP requests between subnets.
  • C. A static ARP entry maps one address locally and does not forward DHCP requests.
  • D. A second default route does not relay DHCP broadcasts; a relay agent is needed.

Tip: Use DHCP relay for cross-subnet DHCP requests.

Question 8Medium

An internal web server at 192.168.1.20 must be reachable on the router's public IP at port 443. What is configured?

  1. Port forwarding (a static NAT rule for port 443)
  2. An ARP entry for the public IP
  3. A DHCP reservation for the router itself on the outside interface
  4. A default route

Answer: A. Port forwarding (a static NAT rule for port 443)

Explanation

The router translates inbound connections to publicIP:443 into 192.168.1.20:443.

Step-by-step solution

  1. Port 443 on the public IP needs to direct traffic to the internal server.
  2. The router uses port forwarding to map public IP:443 to internal IP:443.
  3. This is a static NAT rule for port 443.
  4. Port forwarding (a static NAT rule for port 443) allows this mapping.
  5. Final answer: Port forwarding (a static NAT rule for port 443).

Why the other options are wrong

  • B. An ARP entry only maps an IP to a MAC on the local link; it does not forward port 443 traffic.
  • C. A DHCP reservation gives the router a fixed address; it does not map public port 443 to the server.
  • D. A default route sends outbound traffic to a next hop; it does not send inbound port 443 to the server.

Tip: Remember: Port forwarding is needed to expose internal servers on public IPs.

Question 9Hard

What is carrier-grade NAT (CGNAT)?

  1. NAT that translates IPv4 addresses into MAC addresses at the edge of the ISP
  2. NAT done inside the ISP network
  3. A NAT that only works on fibre links
  4. Static NAT for data centres

Answer: B. NAT done inside the ISP network

Explanation

With CGNAT a customer's router may itself receive an address from 100.64.0.0/10, and the ISP translates again.

Step-by-step solution

  1. Carrier-grade NAT is a large-scale translation method.
  2. It is deployed by Internet Service Providers.
  3. The translation happens inside the ISP network.
  4. This allows many users to share public IPv4 addresses.
  5. The correct answer is NAT done inside the ISP network.

Why the other options are wrong

  • A. CGNAT translates IP addresses to other IP addresses, never to MAC addresses, so this is wrong.
  • C. CGNAT works over any link type, such as copper or wireless, not only fibre.
  • D. Static NAT for data centres is a one-to-one mapping for servers, not a shared ISP translation.

Tip: Remember that CGNAT is performed by the ISP, not the user's router.

Question 10Hard

Which protocol property makes NAT awkward for some applications such as active-mode FTP or SIP?

  1. They use UDP only
  2. They need IPv6 addresses on both ends of every connection
  3. They embed addresses in the payload
  4. They have no port numbers

Answer: C. They embed addresses in the payload

Explanation

The embedded addresses are private and would be wrong outside, so NAT needs application-level gateways or traversal techniques.

Step-by-step solution

  1. NAT rewrites source IP and port in packet headers.
  2. Some protocols embed IP addresses inside the payload.
  3. NAT cannot modify these embedded addresses.
  4. The embedded addresses become wrong outside the private network.
  5. Thus NAT is awkward for such protocols.
  6. They embed addresses in the payload.

Why the other options are wrong

  • A. UDP alone does not cause the problem, since NAT translates UDP ports just as it does TCP.
  • B. Protocols do not need IPv6 for NAT to work; the issue is addresses embedded in the payload.
  • D. These protocols do have port numbers, and NAT relies on them; the trouble is the embedded addresses.

Tip: Check if a protocol carries IP addresses in its payload.

Practise all 25 questions free

The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.

Open this topic in the app →

Related topics

See all Computer Networks topics · All topics