Skip to content

Lesson 1 of 9 · 24m

Reading Interface State Like an Operator

Interpret link state, flags, counters, queues, and driver details so a vague 'network is down' becomes a testable hypothesis.

The worst networking sentence in operations is 'the interface looks up.' Up according to whom: administratively, at the link layer, with a carrier, with an address, with a route, or with packets actually leaving the box? Linux exposes all of those states separately, and half of good troubleshooting is refusing to collapse them into one green light.

Start with the truth table

ip link is the interface equivalent of a patient's pulse and blood pressure:

ip -details link show dev eth0
ip -statistics link show dev eth0

A typical line carries several independent facts:

3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000

UP means administratively enabled. LOWER_UP means the driver reports carrier. state UP is the kernel's operational view. You can have UP without LOWER_UP when a cable is absent, a virtual peer is missing, or the NIC negotiation failed. The transmit queue length (qlen) and qdisc matter once packets are queued faster than the device can drain them.

Counters tell directionality

Do not stare at counters as if they are scores. Compare them over time:

ip -s link show dev eth0
sleep 5
ip -s link show dev eth0

RX packets increasing while TX remains flat means the host receives traffic but does not answer. TX errors, drops, overruns, and carrier errors each point in different directions. A byte counter can also reveal MTU or segmentation behavior: lots of small packets during a supposed bulk transfer is not a cabling problem; it is often TCP behavior, offload behavior, or application chatter.

The driver is part of the interface

ethtool still earns its place even in a cloud-first world:

ethtool eth0
ethtool -i eth0
ethtool -S eth0 2>/dev/null | head -40

Look for speed, duplex, autonegotiation, and driver-specific error counters. On virtual machines the 'cable' is a hypervisor construct, but the model is the same: carrier means the backing device claims connectivity, not that the network path beyond it is healthy.

The day-one mental model

Think in layers but debug in evidence. Link state answers can this interface talk on its local medium? It does not answer does the host know where to send packets? That is routing. It does not answer is a peer reachable? That is neighbor discovery. It certainly does not answer is the service broken? Keep those questions separate.

Field notes

  • NO-CARRIER is not caused by a missing IP address; addressing sits above link state.
  • Renaming interfaces with a .link file or ip link set name can break cloud-init, netplan, and firewall rules in one stroke.
  • mtu 1500 is the interface MTU, not the guaranteed path MTU.
  • Virtual interfaces can show UNKNOWN operstate and still forward perfectly well; interpret driver state in context.
  • Interface counters persist across address changes, so do not let old errors distract you from a fresh failure.

Was this lesson helpful?

Sign in to rate