Courseiva
Advanced Networking ConfigurationmediumMultiple ChoiceObjective-mapped

LPIC-2 Advanced Networking Configuration Practice Question

A Linux router needs to forward DHCP broadcasts from clients on subnet 192.168.1.0/24 (eth0) to a DHCP server at 10.0.0.5. Which command starts a DHCP relay agent?

⚠ Common exam trap

Candidates often confuse the DHCP relay agent command with the DHCP server command (`dhcpd`) or assume a firewall rule (`iptables`) can perform relaying, but only `dhcrelay` correctly implements the RFC 1542 relay function by forwarding broadcasts to a specified remote server.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

dhcrelay -i eth0 10.0.0.5

The correct command is `dhcrelay -i eth0 10.0.0.5`. This starts the DHCP relay agent (ISC DHCP relay) on interface eth0, listening for DHCP broadcast packets (UDP port 67) from clients on subnet 192.168.1.0/24 and forwarding them as unicast to the DHCP server at 10.0.0.5. The relay agent also relays the server's unicast replies back to the client, enabling DHCP service across subnets without a local DHCP server.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • dhcrelay -i eth0 10.0.0.5

    Why this is correct

    Standard DHCP relay agent command.

  • dhcpd -cf /etc/dhcp/dhcpd.conf

    Why it's wrong here

    Starts a DHCP server, not relay.

  • iptables -A INPUT -i eth0 -p udp --dport 67 -j REDIRECT

    Why it's wrong here

    iptables cannot perform DHCP relay; it redirects to local process.

  • dnsmasq -i eth0

    Why it's wrong here

    dnsmasq can provide DHCP server functions, not relay.

Visual reference

Client DHCP Server 1 Discover (broadcast) 2 Offer (IP: 192.168.1.10) 3 Request (I accept) 4 Acknowledge (lease confirmed) DORA — the four-step DHCP lease process

About these practice questions

One of 507 original LPIC-2 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This LPIC-2 practice question is part of Courseiva's free LPI certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LPIC-2 exam.