LPIC-2 Advanced Networking Configuration Practice Question
A company has multiple internet connections and wants to route traffic from specific subnets to specific providers. They are using policy-based routing with ip rule and ip route. After adding the rules, the administrator finds that the traffic is not matching the intended routing table. Which command should be used to verify that the rules are being matched correctly?
⚠ Common exam trap
Many candidates assume 'ip rule show' is sufficient to verify rule matching, but it only displays the rules, not which rule is actually hit for a specific packet, leading to false confidence.
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 route get <destination> mark <mark>
'ip route get' with the 'mark' option simulates a packet lookup using the specified routing mark, allowing the administrator to see which routing table would be matched by the policy rules. This directly verifies whether the ip rule conditions (e.g., fwmark, source subnet) are correctly directing traffic to the intended table.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
ip route show cache
Why it's wrong here
The route cache is deprecated and does not show rule matching.
- ✓
ip route get <destination> mark <mark>
Why this is correct
This command simulates the routing lookup and shows the rule and table used.
- ✗
ip rule show
Why it's wrong here
This shows the rules but does not show which rule is matched for a specific packet.
- ✗
ip route show table all
Why it's wrong here
This shows all routes in all tables, but does not indicate which rule is used for a given packet.
Visual reference
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.