Network Device Operations Manual

18 min read
On this page

Narrow the fault through interface, address, route, neighbor, DNS and service layers. Record state before changing the configuration owner. Address and default-route changes on a remote host need working recovery access.

TaskStart here
No connectivityLayered inspection
Wrong egress or DNSRoutes and policy
Configure interface / Wi-FiRuntime and persistent config

# List interfaces and link flags compactly
ip -br link

Replace enp1s0 below with the actual interface. UP is administrative state; LOWER_UP indicates lower-layer availability.

# Inspect interface addresses and prefixes
ip -br address

Expand with ip address show dev enp1s0 for scope and lifetimes. Missing addresses and missing routes are different failures.

# Read interface error and drop counters
ip -s link show dev enp1s0

Compare increments under the same load; lifetime totals are not this request’s loss.

# Inspect physical-link speed, duplex, and carrier
ethtool enp1s0

Virtual interfaces may not support it. Query ethtool -S separately for driver-specific counters and correlate kernel link-reset logs.

ObservationMeaningNext check
UP / LOWER_UPAdmin enabled / lower-layer carrier are distinctNo carrier: cable, switch port, negotiation; virtual links differ
IP addressAn address does not prove the route is correctCheck prefix, source, lifetime and route get
RX/TX errors, dropsCumulative counts are not a current rateCompare deltas under load with driver-specific counters

Ask the kernel which path a destination uses

Ask the kernel which route it selects

# Query the route selected for an IPv4 destination
ip route get 1.1.1.1

Read dev, via, and src; use the real target. Query IPv6 separately with ip -6 route get; IPv4 success says nothing about IPv6.

# Inspect policy rules selecting routing tables
ip rule show

Read priorities and matches; VPNs, sources, and marks may affect lookup. Inspect table contents separately.

# Inspect installed routes across tables
ip route show table all

A default route does not prove that traffic uses its table; correlate route get.

# Inspect ARP/NDP state for next-hop neighbors
ip neigh show dev enp1s0

FAILED/INCOMPLETE indicate unresolved reachability. STALE normally needs observation, not flushing.

Check name resolution and listeners separately

# Resolve the destination through system NSS
getent ahosts example.com

With systemd-resolved, inspect per-link DNS and routing domains using resolvectl status. getent may include hosts entries and differs from dig.

# Inspect TCP/UDP listeners on the service host
ss -lntup

-l selects listeners, -n numeric addresses, -t/-u protocols, and -p accessible process information. Loopback listeners do not directly accept remote-address requests.

Inspect dev, via and src. Policy rules, source and marks can choose a routing table before longest-prefix matching; main/default alone is incomplete. STALE neighbors are normally awaiting reachability confirmation, not a reason to flush. DNS answers do not prove listening ports; failed ping can mean filtered ICMP.

Checks from local host to remote service Address / source Policy → route table Next hop / neighbor Firewall → service

Choose a test that distinguishes failure layers

# Test ICMP replies from the verified next hop
ping -c 3 192.0.2.1

Replace the example with the actual gateway. Filtering can suppress replies; test the application protocol too.

# Inspect the probed path and discovered path MTU
tracepath 1.1.1.1

Probes can follow different policy from application traffic; an unresponsive hop does not necessarily drop application packets.

# Observe progress through DNS, TCP, TLS, and HTTP
curl -v --connect-timeout 5 https://example.com/

Connect timeout limits connection setup; add --max-time for the whole request. Inspect the last successful phase rather than treating TLS errors as routing failures.

# Capture only the target host’s HTTPS TCP traffic
sudo tcpdump -ni enp1s0 'host 192.0.2.10 and tcp port 443'

-n avoids reverse lookup and -i fixes the interface. Reproduce once, inspect SYN/replies/retransmissions, and stop with Ctrl-C. Use -w for a dedicated capture file if needed.

Replace gateway and target placeholders. Observe outgoing SYNs, responses, retransmissions and interface direction; not every timeout is DNS. /proc/net/dev holds interface statistics; soft interrupts are in /proc/softirqs.

To add one temporary address on a test interface, use ip address add 192.0.2.10/24 dev enp1s0; remove that exact address with ip address del, not an interface-wide flush. Replace the documentation subnet and check conflicts. Persistent configuration belongs to the manager below.

Use one configuration owner per interface

Identify the interface manager first

# Inspect NetworkManager state and connection names
nmcli device status

For systemd-networkd, use networkctl status enp1s0 and inspect Network File. Do not configure one interface through both managers.

# Match active interfaces to profile names and UUIDs
nmcli connection show --active

Obtain YOUR_PROFILE here; quote names containing spaces and use UUIDs for ambiguity.

# Inspect saved settings and active parameters
nmcli connection show 'YOUR_PROFILE'

Record methods, addresses, gateways, DNS, and routes. Make a restricted backup of the profile file; locate it with nmcli -f NAME,UUID,FILENAME connection show.

Add a temporary address on a test interface

# Add one verified conflict-free test address
sudo ip address add 192.0.2.10/24 dev enp1s0

This changes temporary kernel state. Verify the address and test the subnet; a manager or DHCP may overwrite it.

# Remove only the address added for this test
sudo ip address del 192.0.2.10/24 dev enp1s0

This is the later cleanup step, not an immediate sequel to add. Do not flush the entire interface.

Persist a NetworkManager DNS change

# Save the verified DNS server in this profile
sudo nmcli connection modify 'YOUR_PROFILE' ipv4.ignore-auto-dns yes ipv4.dns '192.0.2.53'

Replace the example with a reachable policy-appropriate resolver. This replaces ipv4.dns and ignores automatic IPv4 DNS; assess IPv6 DNS separately.

# Reapply supported active-profile changes to the interface
sudo nmcli device reapply enp1s0

Failure may require profile reactivation, not a reboot. Use connection up with recovery access if needed. Check effective DNS and resolution; restore original values to roll back.

Scan Wi-Fi before connecting

# Inspect visible SSIDs, signal, and security
nmcli device wifi list

Identify the interface and configuration for hidden SSIDs, enterprise authentication, or multiple radios.

# Prompt for credentials and connect to the selected network
nmcli --ask device wifi connect 'YOUR_SSID'

--ask avoids credential arguments. After connection, verify addresses, routing, and requests.

VLAN: match the parent and switch configuration

This independent temporary VLAN example requires an unmanaged test interface, not the current SSH path. The parent needs link and the switch must allow VLAN 100. Substitute planned addressing.

# Create VLAN 100 on the parent interface
sudo ip link add link enp1s0 name enp1s0.100 type vlan id 100

Verify parent and ID with ip -d link show before assigning an address.

# Assign the VLAN subnet address to the child interface
sudo ip address add 192.0.2.10/24 dev enp1s0.100
# Enable the child and test VLAN neighbors and services
sudo ip link set dev enp1s0.100 up

Remove this test child afterward with ip link delete enp1s0.100. For persistence, use the selected manager’s VLAN profile.

Bridge: keep layer-three addressing on the bridge

Demonstrate only on an unused enp2s0 with no application address and a new br-test. Moving live addresses/default routes needs console access and a separate migration plan.

# Create a temporary layer-two bridge
sudo ip link add name br-test type bridge
# Attach the spare port without putting application IPs on it
sudo ip link set dev enp2s0 master br-test

Verify the master with bridge link show before enabling the port and bridge.

# Enable the bridge port
sudo ip link set dev enp2s0 up
# Enable the bridge after its port
sudo ip link set dev br-test up

An unnumbered bridge demonstrates layer two only. Put planned host addresses on br-test for layer three. Cleanup detaches the port with nomaster, deletes br-test, and restores the port’s original state.

These identify the owner, not a recommendation to run both managers on one interface. --ask avoids a password in shell history. Profile and interface names differ. Review/back up the profile before modify/reapply or activation; reconnecting can break SSH. Runtime ip changes may be overwritten by DHCP and do not persist across reboot.

ChangeCheck first
Runtime link up/downip link set dev enp1s0 up; run down separately, not up / down
Linux bridgeHost IP normally belongs on the bridge, ports forward L2; moving it disrupts the old path
VLANMatch parent, VLAN ID, switch trunk and subnet
Unstable Wi-FiInspect signal, band, congestion and regulatory domain; channel legality is regional

Repeat the original destination test and verify persistence after reconnecting. See nftables, DNS and Tailscale for the next layer.

iproute2 manuals · NetworkManager nmcli