LPIC-2 Advanced Networking Configuration Practice Question
An administrator configures a DHCP relay agent using 'dhcrelay' in a network with multiple VLANs. The relay agent is on a Linux server with interfaces eth0 (VLAN 10) and eth1 (VLAN 20). The DHCP server is on VLAN 10. Which command correctly sets up the relay to forward requests from VLAN 20 to the DHCP server at 192.168.1.5?
⚠ Common exam trap
Watch out — candidates often assume the relay must listen on the server-side interface (eth0) or on all interfaces, not realizing that the `-i` flag specifies the client-facing interface where broadcasts originate.
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 eth1 192.168.1.5
The `-i eth1` flag specifies the interface on which the relay agent should listen for DHCP client broadcasts (VLAN 20). The relay then unicasts those requests to the DHCP server at 192.168.1.5, which resides on VLAN 10. This ensures that only broadcasts from the client-side VLAN are forwarded, not those from the server-side network.
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 192.168.1.5
Why it's wrong here
This listens on eth0 (server side), so client requests from VLAN 20 will not be received.
- ✓
dhcrelay -i eth1 192.168.1.5
Why this is correct
Listens on eth1 (VLAN 20) and relays to the DHCP server at 192.168.1.5.
- ✗
dhcrelay -i eth0 -i eth1 192.168.1.5
Why it's wrong here
This listens on both interfaces, but the server is on eth0, so relaying from eth0 is unnecessary.
- ✗
dhcrelay 192.168.1.5
Why it's wrong here
Without -i, dhcrelay listens on all interfaces, which may cause unintended behavior but technically could work; however, it is not best practice.
Visual reference
Go deeper
Related to this question
About these practice questions
This LPIC-2 question is part of Courseiva's 507-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
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.