1 min read #devops
On this page

Network Interface Operations Manual

Linux network interface management uses the ip command (replacing the legacy ifconfig/route). All temporary modifications are lost upon reboot; persistence is handled via NetworkManager or systemd-networkd.

Viewing

# Interface overview (UP/DOWN, MAC, MTU, status)
ip link show
ip -s link show wlan0                      # Includes RX/TX bytes/packets/errors/drops

# IP addresses
ip addr show wlan0
ip -br addr                                # Concise (one line per interface)

# Statistics (packet counts at the software interrupt level)
cat /proc/net/dev | column -t

# Routing table
ip route show                              # main table
ip route show table all                    # All tables (local/main/default/custom)
ip route get 8.8.8.8                       # Find the actual route to a target (check interface and gateway)

# Network card hardware
ethtool enp14s0                            # Speed/duplex/driver/firmware
ethtool -S enp14s0 | grep -E 'err|drop|fifo'  # NIC-level drop statistics
ethtool -i enp14s0                         # Driver + firmware info

# WiFi
iw dev wlan0 link                          # Current connection: SSID/signal/frequency/rate
iw dev wlan0 station dump                  # Statistics: retransmissions/failed frames/signal
iw dev wlan0 scan | grep -E "SSID|signal|freq"  # Scan for access points

# ARP cache
ip neigh show                              # Entry states: REACHABLE/STALE/DELAY/FAILED

Operations

# Interface up/down
ip link set wlan0 up / down

# IP addresses
ip addr add 192.168.1.100/24 dev enp14s0
ip addr del 192.168.1.100/24 dev enp14s0

# Routing
ip route add default via 192.168.31.1 dev wlan0
ip route add 10.0.0.0/8 via 192.168.1.1 dev enp14s0
ip route replace default via 192.168.31.7     # replace = add if not exists, update if exists
ip route del 10.0.0.0/8

# NetworkManager (nmcli)
nmcli device status
nmcli device wifi list
nmcli device wifi connect "SSID" password "xxx"
nmcli connection show "connection-name"                 # View detailed settings for a connection
nmcli connection modify "connection-name" ipv4.method manual \
  ipv4.addresses 192.168.1.100/24 ipv4.gateway 192.168.1.1
nmcli connection up "connection-name"                   # Apply changes
systemctl restart NetworkManager              # Use with caution — all connections will briefly interrupt

# Bridge
ip link add br0 type bridge
ip link set enp14s0 master br0
ip link set br0 up
ip link set enp14s0 nomaster                 # Remove from bridge

# VLAN
ip link add link enp14s0 name enp14s0.10 type vlan id 10

Troubleshooting

# Interface down → Check physical layer
ip link show wlan0 | grep state
dmesg | tail -50 | grep -iE 'error|fail|link'

# Frequent WiFi disconnections
iw dev wlan0 link | grep -E 'signal|freq'
# → Weak signal → Move closer to AP
# → 5GHz DFS channel (52/56/60/64) → Use 149+
# → Driver issue → modprobe -r mt7925e; modprobe mt7925e

# Routing unreachable
ip route get <target>                        # Check which interface/gateway is used
ping -c 3 <gateway>                          # Is the gateway reachable?

# Poor performance/drops
ip -s link show wlan0 | grep -E 'errors|dropped'
ethtool -S enp14s0 | grep -v ': 0$'          # Non-zero counts

# ARP resolution stuck → Clear cache
ip neigh flush dev wlan0