Instiq
Chapter 3 · Network configuration·v1.0.0·Updated 7/7/2026·~12 min

What's changed: Initial version (topic 2.03, subtopics 2.03.1–2.03.3)

3.1Basic Network Configuration

Key points

Learn interface configuration centered on ip: assigning IP addresses, bringing links up/down, checking the routing table; how legacy ifconfig/route/arp map to it; managing NetworkManager with nmcli; and wireless tools iw/iwconfig/iwlist.

Before a server can do its job, its network interface needs the right IP address and the routing table needs to know where to send traffic. LinuC-2 expects you to handle both the modern ip command suite and the legacy commands (ifconfig, route, arp) still seen in the field.

3.1.1Configuring and inspecting with ip

  • ip addr (ip a) lists interfaces and their IP addresses. Add with ip addr add 192.0.2.10/24 dev eth0, remove with ip addr del.
  • ip link manages an interface's existence and state: ip link set eth0 up|down activates or disables the link; ip link set eth0 mtu 1400 changes MTU.
  • ip route inspects and edits the routing table: ip route show lists it, ip route add default via 192.0.2.1 adds a default gateway, ip route del removes an entry.
  • ip neigh (ip n) inspects the ARP table (the IP-to-MAC address cache)—the successor to the legacy arp command (equivalent to arp -a).

3.1.2Legacy commands, nmcli, and wireless tools

  • ifconfig is the legacy command combining what ip addr and ip link do (e.g., ifconfig eth0 192.0.2.10 netmask 255.255.255.0 up). Deprecated on most distributions, part of the net-tools package.
  • route is the legacy counterpart of ip route (route add default gw 192.0.2.1; route -n shows numeric output). arp is the legacy counterpart of ip neigh (arp -a lists, arp -d deletes).
  • nmcli drives NetworkManager from the CLI: nmcli device status (interface state), nmcli connection show (list connection profiles), nmcli connection up/down <name> to activate or deactivate.
  • Wireless: iw (current, netlink-based; iw dev wlan0 scan scans for APs), iwconfig/iwlist (legacy wireless-tools; iwconfig shows settings, iwlist wlan0 scan scans).
Exam point

The most-tested point is the mapping: ip addr↔ifconfig, ip route↔route, ip neigh↔arp. Also watch the division of labor between ip link and ip addr (link = state, addr = address). nmcli only affects NetworkManager-managed connections; iw is netlink-based while iwconfig/iwlist use the older ioctl interface—another generational contrast.

Diagnose in the order state → address → route → neighbor. First check ip link show eth0 for UP status and carrier detection (cable or radio). Then ip addr show eth0 to confirm the expected IP is assigned, fixing with ip addr add/del if not. For routing problems, ip route show reveals whether a default gateway or a specific subnet route is missing. If connectivity still fails, ip neigh shows whether the peer's MAC address resolved (an INCOMPLETE state means ARP resolution failed). On systems where NetworkManager is active (most desktops, some server distros), changes made directly via ip can be reverted on reboot or NetworkManager re-application, so permanent changes belong in a NetworkManager profile via nmcli connection modify. For wireless troubleshooting, check iw dev for the interface mode (managed/monitor), then iw dev wlan0 link for the current connection (SSID, signal strength), rescanning nearby APs with iw dev wlan0 scan as needed.

Current (ip subcommand)Legacy commandPurpose
ip addrifconfigShow/add/remove IP addresses
ip linkifconfig (up/down)Bring interface up/down, check state
ip routerouteShow/modify routing table
ip neigharpInspect the ARP (IP-MAC) table
Warning

Trap: "ip link set eth0 up also assigns an IP address" is wrong—ip link handles only link state (up/down, MTU, etc.); assigning an address requires ip addr add. Also, do not assume nmcli changes are more temporary than ip changes—it is the reverse: ip changes are transient (lost on reboot), while nmcli connection profiles persist.

Mapping of ip addr/link/route/neigh to ifconfig/route/arp, plus nmcli and iw-family tools.
ip addr=ifconfig, ip route=route, ip neigh=arp

3.1.3Section summary

  • ip addr = ifconfig, ip link = state (up/down), ip route = route, ip neigh = arp; use nmcli for persistent settings
  • Wireless: iw (current, netlink) vs iwconfig/iwlist (legacy, ioctl). Diagnose in order: state → address → route → neighbor

Sign in to track progress — Log in.

Quick check

(just a quick review)

Q1. You need to add IP address 192.0.2.10/24 to eth0 using the current ip command suite. Which is correct?

Q2. A server cannot reach the outside world via the default gateway. What should you first check with ip route show?

Q3. On a server where NetworkManager is active, you want an IP address change to survive a reboot. What is the best approach?

Check your understandingPractice questions for Chapter 3: Network configuration