XK0-006 Troubleshooting Practice Question
A Linux administrator is troubleshooting a server that has lost network connectivity. They need to verify the current IP configuration and check the default gateway. Which TWO commands can be used to display the IP address and routing table? (Choose two.)
⚠ Common exam trap
The trap here is selecting deprecated commands like ifconfig or netstat instead of the current iproute2 utilities, or choosing commands that only cover half of the requirement.
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
✓
ip addr show
The ip addr show command reveals interface IP addresses, and ip route show displays the routing table including the default gateway. Together they provide the necessary information to diagnose network connectivity loss. These are the modern, recommended tools for network configuration inspection on Linux.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
route -n
Why it's wrong here
route -n displays the routing table numerically, but like netstat, it is deprecated. It shows the default gateway but not IP addresses. It only covers one aspect of the requirement. The modern equivalent ip route show is the correct choice.
- ✓
ip addr show
Why this is correct
ip addr show displays all network interfaces and their assigned IP addresses, including subnet masks. It is the modern replacement for ifconfig and provides detailed information about interface state. In this scenario, it directly shows whether the interface has an IP, which is essential for diagnosing connectivity loss. It does not show the routing table, but it is one of the required commands.
- ✓
ip route show
Why this is correct
ip route show displays the kernel routing table, including the default gateway. This is critical for verifying that the server has a route to reach external networks. Combined with ip addr show, it provides a complete picture of the network configuration. It is the second required command to check the default gateway.
- ✗
ifconfig -a
Why it's wrong here
ifconfig -a shows all interfaces and their IP addresses, but it is also deprecated. It does not display the routing table. While it could satisfy the IP address part, the question requires both IP and routing information. Using ip addr show is preferred over ifconfig for modern systems.
- ✗
netstat -rn
Why it's wrong here
netstat -rn displays the routing table in numeric form, but netstat is deprecated in favor of ip route. While it can show the default gateway, it is not the recommended tool on modern Linux systems. The question asks for commands to display IP configuration and routing table; netstat -rn only covers routing, and it is outdated.
Go deeper
Related to this question
About these practice questions
This XK0-006 question is part of Courseiva's 781-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 and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official CompTIA exam blueprint
This XK0-006 practice question is part of Courseiva's free CompTIA 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 XK0-006 exam.