mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
This adds a new `Hostname=` option to the [DHCPServerStaticLease] section in .network files, allowing an administrator to assign a specific hostname to a client receiving a static lease. We automatically select the correct DHCP option to use based on the format of the provided string: - Single DNS labels are sent as Option 12. - Names with multiple DNS labels are sent as Option 81 in wire format. Fixes: #39634
32 lines
467 B
Plaintext
32 lines
467 B
Plaintext
[Match]
|
|
Name=veth-peer
|
|
|
|
[Network]
|
|
Address=10.1.1.1/24
|
|
DHCPServer=true
|
|
IPMasquerade=true
|
|
IPForward=true
|
|
|
|
[DHCPServer]
|
|
PoolOffset=0
|
|
PoolSize=20
|
|
EmitDNS=yes
|
|
DNS=9.9.9.9
|
|
|
|
[DHCPServerStaticLease]
|
|
MACAddress=12:34:56:78:9a:bc
|
|
Address=10.1.1.2
|
|
Hostname=testhost
|
|
|
|
[DHCPServerStaticLease]
|
|
MACAddress=12:34:56:78:9a:bc
|
|
Address=10.1.1.3
|
|
Hostname=device.example.com
|
|
|
|
[DHCPServerStaticLease]
|
|
Address=10.1.1.4
|
|
|
|
[DHCPServerStaticLease]
|
|
MACAddress=12:34:56:78:9a:bf
|
|
Address=10.1.1.5
|