Network Configuration across Distributions
Quick answer
Linux networking configuration is managed by different layers. Choose the active manager before editing anything; the kernel runtime state and persistent configuration are not the same.
Prepare the practice environment
Run python3 lab-fixtures/networking/setup.py from the extracted package root as an ordinary user. Enter the printed private path and check pwd. Use a fresh fixture, Bash with LC_ALL=C and set -o pipefail. Python 3 is required for the fixed local socket helper. Use only loopback or synthetic data; never apply sample configuration. Manual examples require an authorized disposable VM.
How it works
ip shows and can modify runtime state. Netplan reads YAML and renders settings for NetworkManager or systemd-networkd on supported installations; it is not itself the long-running network daemon. NetworkManager manages connection profiles, while networkd uses .network files. Distribution defaults vary by edition and installation. DHCP can supply addresses, routes and DNS configuration. hostnamectl manages host naming on systemd systems, not DNS registration. Read the actual manager status and preserve console access before a change; network changes over SSH can disconnect you.
Read a saved profile as desired configuration and a read-only runtime query as current state. The two can differ if a profile is inactive, DHCP supplied a new lease, or a manual change was temporary. Before any authorized VM modification, identify the manager for that interface, record current settings and plan restoration through a console. Do not apply a sample profile merely to see whether it works.
Try the examples
Fictional interface; do not copy this into /etc/netplan. This is inspection, not YAML validation.
Expected stdout:
network: version: 2 renderer: networkd ethernets: lab0: dhcp4: trueThis directly describes a networkd configuration for a fictional interface.
Expected stdout:
[Match]Name=lab0[Network]DHCP=ipv4Partial illustrative NetworkManager profile, not a complete importable connection.
Expected stdout:
[connection]id=labinterface-name=lab0[ipv4]method=autoCommon mistakes
Do not run netplan apply or restart networking remotely without a rollback plan, a console and authorization.
Practice
Compare the three sample files; identify the fictional interface and how each represents automatic IPv4 configuration.
Related references
Study: nmcli, netplan, networkctl, hostnamectl. These are reference names, not deployed links.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Network configuration across distributions — Knowledge Check
Apply network concepts to loopback, synthetic fixtures and VM-only scenarios.
What is Netplan?
What does DHCP commonly provide?
What should precede remote network changes?
Does hostnamectl register DNS records?