Skip to content

Incus DNS resolution with systemd-networkd

Objective

Use systemd-networkd capability of configuring per interface the associated resolver(s) and domain(s).

Configuration

Given the following parameters:

  • domain used by Incus is incus;
  • bridge interface used by Incus is incusbr0;
  • network range used by Incus is 10.157.204.0/24;
shell
$ sudo tee /etc/systemd/networkd/incus-dns.network << EOF
[Match]
Name=incusbr0

[Route]
Destination=10.157.204.0/24
Scope=link
GatewayOnLink=yes

[Address]
Address=10.157.204.1

[Network]
DNS=10.157.204.1
Domains=~incus
EOF

Reload systemd-networkd configuration with:

shell
$ sudo networkctl reload