A Linux network interface connects a network namespace to a physical device, loopback path, bridge, tunnel, virtual device, or other link. Interface state, addresses, routes, DNS, and persistent configuration are related but distinct.
Network Config · Lesson 1
Network Interfaces
Learn how to inspect Linux interface state, addresses, statistics, and persistent configuration ownership.
Discovering Interfaces
Use the modern iproute2 tools:
$ ip -brief link show
$ ip -brief address show
Interface names can be predictable hardware-derived names such as enp1s0, traditional names such as eth0, or administrator-defined names. Never assume eth0 exists or identifies a particular adapter.
Why should a script discover rather than assume eth0?
Administrative and Operational State
UP means the interface is administratively enabled. LOWER_UP commonly indicates that the lower layer reports operational readiness, such as Ethernet carrier. Either flag alone does not prove an IP address, route, DNS, firewall, or application path works.
$ ip -details link show dev enp1s0
$ ip -s link show dev enp1s0
The statistics view can reveal errors, drops, and counters, but counters need a time interval and baseline to become meaningful.
What does administrative UP fail to prove?
Changing Runtime State
Runtime commands include:
$ sudo ip link set dev enp1s0 up
$ sudo ip address add 192.0.2.10/24 dev enp1s0
These changes affect current kernel state and can conflict with a network manager that later reapplies its profile. Bringing down a remote-management interface can immediately end access. Before changing it, verify the exact device, preserve console access, record current state, and prepare a timed or tested rollback.
Does ip address add by itself guarantee persistence after reboot?
Identifying Configuration Ownership
Persistent paths differ across distributions and installations. Possibilities include NetworkManager profiles, systemd-networkd units, netplan input, /etc/network/interfaces, cloud-init, or orchestration. Determine which service manages the device before editing files:
$ systemctl --type=service --state=running | grep -E 'NetworkManager|networkd|networking'
$ networkctl status
$ nmcli device status
Use only commands present for the identified manager. Two managers controlling the same link can race and overwrite each other's state.
What should precede a persistent interface change?
Verifying a Change
Verify link state, assigned addresses and lifetimes, selected routes, resolver state, neighbor reachability, and the actual application. For a persistent change, test a controlled service restart or reboot only when a recovery path exists.
What provides better evidence than seeing the new address in ip address?
Lesson complete
You finished Network Interfaces
You can now inspect and change an interface without confusing runtime state with persistent policy.
Discover real interface names and addresses.
Separate administrative state from operational connectivity.
Treat direct
ipchanges as current kernel state.Identify the active configuration owner before persistence changes.
Verify routing, resolution, and application behavior afterward.
Keep your learning progress
Create a free account to save this lesson and continue learning on any device.
Create a free account