[systemd-devel] EmitDNS and DNS attribute

yves baumes ybaumes at gmail.com
Fri Dec 31 10:46:33 UTC 2021


Here is my configuration file:
```
[Match]
Name=eth2
Type=ether

[Network]
DHCPServer=yes

[Address]
Address=0.0.0.0/24

[DHCPServer]
DefaultLeaseTimeSec=24h
UplinkInterface=:none
EmitDNS=yes
DNS=10.23.20.82
```

My DNS server is a dnsmasq instance and I would like it to bind to the
eth2 interface. But it's not possible: since the attribute is
`Address=0.0.0.0/24` I cannot know its IP address. So I bind dnsmasq
to another interface (that is 10.23.20.82) which is a tun interface.

Which is not really pleasant. I would like to be able to express my
configuration that way: `DNS=0.0.0.0` which would make the DHCP server
emit the correct IP address to the DHCP client, that is the IP address
of  eth2 interface. (Then I guess I must start the dnsmasq service
after the network-online.target, or the networkd service, or something
else, I don't know). Is this a possible evolution of networkd? Does it
make sense?

I would like to know your point of view on this topic. Am I completely
wrong? Does it make sense? Or is there another way to achieve what I
am trying to do?

Regards
Yves


More information about the systemd-devel mailing list