101-350 · Question #128
A Linux computer has no access to the internet. Which command displays information about the network gateway for the system?
The correct answer is D. route. See the full explanation below for the reasoning.
Question
Options
- Atraceroute
- Bifconfig
- Cgateway
- Droute
- Eipconfig
How the community answered
(41 responses)- A5% (2)
- B2% (1)
- C10% (4)
- D80% (33)
- E2% (1)
Community Discussion
7D is correct. The route command reads the kernel IP routing table and prints it, including the default gateway entry which shows up as the 0.0.0.0 destination line with the gateway address in the Gateway column. That information lives entirely in kernel memory, so no internet connectivity is needed at all. The other options either do not exist on Linux (ipconfig, gateway), show interface-level configuration without routing table details (ifconfig), or require a reachable destination host to do anything useful (traceroute). For the exam, also know that "ip route show" is the modern iproute2 equivalent and will likely appear in later objectives, but route is still the tested answer here.
Solid breakdown, and worth adding that on the actual exam scenario they may try to catch you with route versus route -n, because without the -n flag the command attempts reverse DNS lookups that can stall or fail on a disconnected host, which matters when the question specifies offline troubleshooting.
D is the right call here. The route command shows the kernel IP routing table, which includes the default gateway entry, that 0.0.0.0 or default row that points to your gateway IP. The "no internet access" part of the question is a red herring meant to throw you off, because route works entirely on local kernel data and needs no connectivity at all. The real distractor is B, ifconfig, which shows interface config but not routing info, and E is a Windows thing so you can ignore it on a Linux box.
route is the right call here. It reads the kernel routing table and shows you the default gateway entry (the 0.0.0.0 destination row with the Gateway column filled in) without needing any internet access whatsoever, and on older LPI 101-350 objectives it sits squarely in the networking fundamentals weight alongside netstat, which shares the same underlying table.
route is the classic answer here, and it is correct. ifconfig will show you the interface and address, but it does not display the routing table or the gateway entry, so D is the one to pick. ip route on modern distros replaced route, but the exam still expects the old net-tools answer.
Worth adding that netstat -r from the same net-tools package also dumps the kernel routing table, so if a question ever offers both route and netstat as distractors, route is still the safer pick because the LPIC objectives name it explicitly.
D is right, but I keep second-guessing myself on B because my senior showed me ifconfig first and it does show the IP, just not the gateway routing table. Route is the one that actually prints the kernel routing table so you can see which gateway the traffic leaves through.