Linux
Network Diagnostics
11 flashcards · answers and review in the app — launching soon
You want a quick look at the IP addresses under which a Linux box is reachable, but plain hostname only prints the name. Which invocation filters out the relevant addresses, and what is easy to type wrong?
In ip link output the first interface is always lo. What is it, and why does it appear on a machine with no network hardware at all?
Modern Linux names an Ethernet port something like enp0s31f6 instead of the old eth0. What does the ugly name buy you that eth0 didn't?
In ip link output each interface has a 12-hex-digit value after link/ether. What is it and what does it identify?
ip addr on a working interface shows one global IPv6 plus an address starting with fe80. Why can't you reach the box from the internet on the fe80 one?
You run ping with just a target and it never stops. What is its default cadence, and how do you cap it at two probes?
On a dual-stack host you ping a name to test IPv4, but ping keeps hitting the IPv6 address. How do you force it to the protocol you actually want to test?
Pinging google.com fails. One failure prints unknown host, another prints Network is unreachable. Why do these point at completely different things to fix?
ip route prints several lines. Which one tells you the gateway your traffic to the internet actually uses?
traceroute to a reachable host returns nothing but rows of three stars. What is being blocked, and what switches can get around it?
Both ping and traceroute exist, so what does mtr give you that running either one alone doesn't?