CompTIA A+ Core 2 (220-1202)Operating SystemsEasy
A technician is troubleshooting a Linux server that is experiencing intermittent network connectivity issues. They need to quickly identify the IP address, subnet mask, and default gateway configured on the server's network interfaces. Which command-line utility should they use?
- Anetstat
- Bping
- Croute
- Dip addr show
Show answer & explanationAnswer & explanation
Correct answer: D. ip addr show
The 'ip addr show' command (or 'ip a') is the modern and preferred Linux utility for displaying detailed information about network interfaces, including IP addresses, subnet masks, and broadcast addresses. While 'ifconfig' was traditionally used, 'ip' is its more powerful successor.
Why the other options are wrong
- A. netstat displays network connections, routing tables, and interface statistics, but 'ip addr show' is more direct for interface IP details.
- B. ping is used to test connectivity to a remote host, not to display local network configuration.
- C. route is used to view or manipulate the IP routing table, not primarily for interface IP addresses.
ip addr show (Linux)
A modern Linux command-line utility used to display information about network interfaces, including IP addresses, subnet masks, and status.
- Part of the 'iproute2' suite.
- Replaces the older 'ifconfig' command.
- Provides detailed network interface statistics.
Memory trick: IP ADDR SHOWs you all the address details.