ip addr: Inspect Interfaces and Addresses in CI
ip addr lists every network interface and the addresses assigned to it, the starting point for any container networking debug.
Before debugging why a connection fails, confirm the runner has the interfaces and addresses you expect. ip addr shows them, including whether a link is up and what subnet the container landed in.
What it does
ip addr (part of iproute2) prints each interface with its state (UP/DOWN), MTU, MAC, and assigned IPv4/IPv6 addresses. It is the modern replacement for ifconfig and shows exactly what addressing a container or runner received.
Common usage
ip addr
# one interface only
ip addr show eth0
# just the addresses, scriptable
ip -brief addrOptions
| Command / flag | What it does |
|---|---|
| ip addr show | List all interfaces and addresses (show is optional) |
| ip addr show <iface> | Limit to one interface |
| ip -brief addr | Compact one-line-per-interface output |
| ip -4 addr / ip -6 addr | Show only IPv4 or IPv6 |
| ip link | Interface state and MTU without addresses |
In CI
The MTU shown here matters for connection stalls: an overlay or VPN interface below 1500 explains MTU black holes. The address tells you which subnet the container is on, which you compare against the service you are trying to reach to confirm they share a network.
Common errors in CI
"ip: command not found" on alpine or slim images means installing iproute2. An interface in state DOWN, or eth0 with no inet line, means the container has no usable address yet. If only lo (loopback) appears, the container is not attached to any network, which makes every outbound connection fail.