What command can be used to display the current routing table?

Prepare for the Linux Professional Institute Certification Level 1. Use flashcards and multiple choice questions, complete with hints and explanations. Enhance your understanding and get ready to ace the exam!

The command used to display the current routing table is "route -n." This command presents the routing table entries in a numerical format, showing IP addresses instead of resolving them into hostnames. This can enhance the speed of the output, particularly on systems where DNS resolution may introduce delays. The -n flag specifically instructs the route command to avoid any reverse DNS lookups and display raw IP addresses, making it particularly useful for troubleshooting.

Using this command, an administrator can easily view important details such as destination networks, gateways, and interface metrics. It is a straightforward way to assess how packets are being routed in the network and allows for quick verification of routing configurations.

The command "netstat -r" is also capable of displaying the routing table, but it provides additional information that may not be as focused on routing alone. The ifconfig -a command displays network interface configurations but does not show the routing table directly. The basic "route" command without the -n option may attempt to resolve IP addresses into hostnames, which could lead to delays if DNS resolution is slow or fails. Hence, "route -n" stands out as the most efficient and commonly used command for checking routing information.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy