New lxd managed bridge network created but new containers get ipv4 address on the lxdbr0 range

Hi,

I created a new managed network lxdbr-ISOLATED, and defined it’s address as 10.20.20.1/24. Created a new profile to make use of this network, and added a new ubuntu container using the new profile, but instead of getting a 10.20.20.x address, the container is getting a 10.10.10.x address, which is the range for my lxdbr0 network. What I am doing wrong here? The new managed network was created with ipv4.nat=false, ipv4.dhcp=true, ipv4.firewall=false, ipv6.nat=false, ipv6.dhcp=false, ipv6.firewall=false and ipv6.address=none.

Thanks for any help.

root@c1# lxc profile show ISOLATED
config: {}
description: Default LXD profile
devices:
eth0:
name: eth0
network: lxdbr0
type: nic
lxdbr-ISOLATED:
nictype: bridged
parent: lxdbr-ISOLATED
type: nic
root:
path: /
pool: default
type: disk
name: ISOLATED
used_by:

  • /1.0/instances/c1

root@c1:~# lxc network show lxdbr-ISOLATED
config:
ipv4.address: 10.20.20.1/24
ipv4.dhcp: “true”
ipv4.firewall: “false”
ipv4.nat: “false”
ipv6.address: none
ipv6.dhcp: “false”
ipv6.firewall: “false”
ipv6.nat: “false”
description: “”
name: lxdbr-ISOLATED
type: bridge
used_by:

  • /1.0/instances/c1
  • /1.0/profiles/ISOLATED
    managed: true
    status: Created
    locations:
  • none

Created the container with:
lxc init ubuntu:22.04 c1 -p ISOLATED

root@c1:~# lxc list
±---------±--------±-------------------±-----±----------±----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
±---------±--------±-------------------±-----±----------±----------+
| c1 | RUNNING | 10.10.10.84 (eth0) | | CONTAINER | 0 |

I can see that dnsmask is running on both interfaces:

root@c1:~# ps aux | grep dnsmasq
libvirt+ 3385 0.0 0.0 9456 732 ? S 2023 0:00 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
root 3386 0.0 0.0 9428 12 ? S 2023 0:00 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
lxd 1340847 0.0 0.0 10504 4920 ? Ss 00:57 0:00 dnsmasq --keep-in-foreground --strict-order --bind-interfaces --except-interface=lo --pid-file= --no-ping --interface=lxdbr-ISOLATED --dhcp-rapid-commit --no-negcache --quiet-dhcp --quiet-dhcp6 --quiet-ra --listen-address=10.20.20.1 --dhcp-no-override --dhcp-authoritative --dhcp-leasefile=/var/snap/lxd/common/lxd/networks/lxdbr-ISOLATED/dnsmasq.leases --dhcp-hostsfile=/var/snap/lxd/common/lxd/networks/lxdbr-ISOLATED/dnsmasq.hosts --dhcp-range 10.20.20.2,10.20.20.254,1h -s lxd --interface-name _gateway.lxd,lxdbr-ISOLATED -S /lxd/ --conf-file=/var/snap/lxd/common/lxd/networks/lxdbr-ISOLATED/dnsmasq.raw -u lxd -g lxd
lxd 1794482 0.0 0.0 10604 2776 ? Ss Feb09 0:00 dnsmasq --keep-in-foreground --strict-order --bind-interfaces --except-interface=lo --pid-file= --no-ping --interface=lxdbr0 --dhcp-rapid-commit --no-negcache --quiet-dhcp --quiet-dhcp6 --quiet-ra --listen-address=10.10.10.1 --dhcp-no-override --dhcp-authoritative --dhcp-leasefile=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.leases --dhcp-hostsfile=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.hosts --dhcp-range 10.10.10.2,10.10.10.254,1h -s lxd --interface-name _gateway.lxd,lxdbr0 -S /lxd/ --conf-file=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.raw -u lxd -g lxd

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.