A minimal server uses systemd-networkd. Which file and content give interface enp1s0 the static address 10.0.0.10/24 with gateway 10.0.0.1?
LPIC-1 Exam 102-500, objective 109. Networking fundamentals medium
Machine-checked — no person has signed for it. This question was read against the source cited below by an automated pass, which found no contradiction. That is a weaker claim than it sounds: the same kind of process wrote the question, so it can confirm its own mistake.
Treat it as a good draft rather than as settled fact, and read the source below before you rely on it. It is not used in mock exams here — only questions a person has signed for are.
How these questions are written — where each question comes from, what the verification ledger records, and what happens when one is found wrong.
The options
Correct /etc/systemd/network/10-wired.network containing [Match] Name=enp1s0 and [Network] Address=10.0.0.10/24, Gateway=10.0.0.1
Correct. A .network file selects an interface in its [Match] section and configures the addressing in [Network]. Static addressing is expressed with Address= and Gateway=.
Not correct /etc/systemd/network/10-wired.netdev containing [Match] Name=enp1s0 and [Network] Address=10.0.0.10/24
Wrong. A .netdev file creates a virtual device such as a bridge, VLAN or bond. It does not carry addressing for an existing physical interface.
Not correct /etc/systemd/network/10-wired.link containing [Match] Name=enp1s0 and [Link] Address=10.0.0.10/24
Wrong. A .link file is applied by udev and sets device-level properties such as the naming policy, MAC address and MTU, not IP configuration.
Not correct /etc/systemd/networkd.conf containing [Network] Interface=enp1s0, Address=10.0.0.10/24
Wrong. networkd.conf holds daemon-wide defaults. Per-interface configuration always lives in separate files under /etc/systemd/network/.
Why
systemd-networkd reads three kinds of files from /etc/systemd/network/: .link for udev-level device properties, .netdev to create virtual devices, and .network to configure addressing on a matched interface. Files are processed in lexicographic order of filename, which is why a numeric prefix is conventional, and the first .network file whose [Match] section matches an interface is the one applied. For DHCP the [Network] section takes DHCP=yes in place of Address= and Gateway=.
Where this comes from
- Cited
- manual page systemd.network(5)
Practise this
Reading one question is not practice. The trainer will draw a short set from objective 109 and space the ones you get wrong.
More questions on this objective
- A subnet is defined as 192.168.10.0/26. How many addresses in it can actually be assigned to hosts? machine-checked
- A host is configured with the address 172.20.35.77/20. What is the network address of its subnet? machine-checked
- In IPv6, which address is the loopback address, equivalent in role to 127.0.0.1 in IPv4? machine-checked
- Which is the correct fully compressed form of the IPv6 address 2001:0db8:0000:0000:0000:ff00:0042:8329? machine-checked
- Which pairing of a service with its default port number is correct? machine-checked
- DNS normally uses UDP port 53. In which situation does a DNS client or server fall back to TCP on port 53? machine-checked