TTR Networks

Beginner · Linux Network Connectivity · section 2 of 11

Interfaces and addresses

✓ Lab-tested 17 October 2026 on Debian 12

Modern Linux uses the ip command from iproute2 for everything network-related. ifconfig, route and arp come from the long-deprecated net-tools package and are often not even installed.

  • ip link shows interfaces: name, state and MAC address. It's layer 2.
  • ip addr shows addresses: IPv4/IPv6 addresses and prefix lengths. It's layer 3.
  • Add -br (brief) for a one-line-per-interface summary, and -c for colour.

What to look for:

  • State UP with LOWER_UP in the flags means the interface is enabled and has a carrier (cable/link). UP without LOWER_UP means it's enabled but nothing is plugged in. DOWN means an admin turned it off (ip link set eth0 up).
  • The prefix length matters as much as the address. 192.0.2.10/24 and 192.0.2.10/32 behave completely differently: the prefix decides which other addresses are "on the same LAN".
  • lo is the loopback interface, always present.

Changes made with ip are immediate and not persistent: they vanish on reboot. Permanent configuration lives in your distribution's network manager (netplan on Ubuntu, NetworkManager on Fedora/RHEL, systemd-networkd, or /etc/network/interfaces on Debian); see the last section.

The client's interfaces (real output)
root@client:~# ip -br link
lo               UNKNOWN        00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP> 
eth0@if123       UP             1a:dc:74:6a:45:dc <BROADCAST,MULTICAST,UP,LOWER_UP> 
root@client:~# ip -br addr
lo               UNKNOWN        127.0.0.1/8 
eth0@if123       UP             192.0.2.10/24 
root@client:~# ip addr show dev eth0
2: eth0@if123: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 1a:dc:74:6a:45:dc brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 192.0.2.10/24 scope global eth0
       valid_lft forever preferred_lft forever
  • Lines 1–3: Layer 2: interface names, state and MAC addresses. @if123 means this is one end of a virtual ethernet (veth) pair whose peer is interface 123 in another namespace, as in containers.
  • Lines 4–6: Layer 3: one line per interface with its addresses. The fastest health check there is.
  • Line 8: Flags: UP (enabled) and LOWER_UP (carrier present). The MTU is 1500 bytes, standard Ethernet.
  • Line 9: The MAC address the router will learn via ARP.
  • Line 10: The address and the prefix: /24 makes 192.0.2.0–255 "on-link". scope global means it's usable for traffic leaving the host.
  • Line 11: Lifetimes are forever for static addresses. DHCP-assigned addresses count down to the lease expiry.

Check your understanding

ip -br link shows eth0 UP … <NO-CARRIER,BROADCAST,MULTICAST,UP>. What's wrong?

  • The interface is administratively down
  • There's no physical link: cable, switch port or Wi-Fi association
  • It has no IP address
  • The MTU is wrong