LPIC-2 Advanced Networking Configuration Practice Question
A system administrator notices that the default gateway is missing after a reboot. The network configuration uses ifup/ifdown scripts. Which file should be modified to ensure the default gateway is persistent?
⚠ Common exam trap
The trap here is that candidates familiar with Red Hat systems may incorrectly choose /etc/sysconfig/network, forgetting that the question explicitly specifies ifup/ifdown scripts, which are characteristic of Debian-based distributions.
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
✓
/etc/network/interfaces
On Debian-based systems using ifup/ifdown scripts, persistent network configuration—including the default gateway—is defined in /etc/network/interfaces. The gateway is set with the 'gateway' directive under the appropriate interface stanza, ensuring it is applied automatically on boot. This file is the central configuration source for the ifupdown suite.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
/etc/resolv.conf
Why it's wrong here
This file configures DNS, not default gateway.
- ✗
/etc/network/routes
Why it's wrong here
This file is not standard; static routes can be defined in /etc/network/interfaces.
- ✗
/etc/sysconfig/network
Why it's wrong here
This is used in Red Hat-based systems, not Debian.
- ✓
/etc/network/interfaces
Why this is correct
The 'gateway' directive in this file sets the default gateway persistently.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LPIC-2 question from scratch — 507 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.