Can'g get dns.domain key to work

All:

I am attempting to run multiple bridge networks - a br-test and a br-prod. Of course I would like for the br-test network to have a different domain name. Based on the documentation I thought I could achieve this on a per network basis by adding a dns.domain to the entry like:

lxc network show br-test
config:
  dns.domain: test.awt
  ipv4.address: 10.0.0.1/24
  ipv4.nat: "true"
  ipv6.address: fd42:7bb7:ae3e:dd76::1/64
  ipv6.nat: "true"
description: ""
name: br-test
type: bridge
used_by:
- /1.0/containers/ansible-image
- /1.0/containers/c2
- /1.0/containers/dev-foreman
- /1.0/containers/test-consulagent
- /1.0/containers/test-consulserver01
- /1.0/containers/test-consulserver02
- /1.0/containers/test-consulserver03
managed: true

But it doesn’t seem to be working. Trying - for example - to ping container c2.test.awt returns a service or name unknown.

This is using lxd 2.21. I’ve restarted the network and the lxd daemon with no luck.

I know - or think I know - that I could change the default domain in the lxd configuration, but I would prefer to be able to control it on a network basis.

Thx in advance

  • steve

You are using a bridge, therefore it should be up to your own two DHCP servers to serve the appropriate domains.
You might be able to get LXD to pass a parameter to the container that will then send as a hint with their DHCP request for which domain to get.

Is this true when the bridge is LXD managed? Since a managed bridge doles out ip addresses, I would think that it should also set domain name.

Or am I being clueless again :slight_smile:

-steve