I deleted lxdbr0 ... how so I get it back?


(Мэтью Смит) #1

Greetings. At some point I deleted the lxdbr0 device that is created during the lxd init setup. How do I get it back? The reason I had deleted it was that I was using the macvlan device exclusively so that I could keep my containers on the same subnet as the rest of the LAN. Now I think I can accomplish what I want to do more efficiently via the lxdbro0 device.

Thank you


#2

Run

$ lxc network list

and you will see what network devices are there.

To create lxdbr0, just run

lxc network create lxdbr0

That’s it.


#3

how about restarting lxd init and skipping the storage part ?


(Мэтью Смит) #4

Error: Failed to run: dnsmasq --strict-order --bind-interfaces --pid-file=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.pid --except-interface=lo --interface=lxdbr0 --quiet-dhcp --quiet-dhcp6 --quiet-ra --listen-address=10.179.195.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.179.195.2,10.179.195.254,1h --listen-address=fd42:bd98:a5b4:4255::1 --enable-ra --dhcp-range ::,constructor:lxdbr0,ra-stateless,ra-names -s lxd -S /lxd/ --conf-file=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.raw -u lxd: dnsmasq: failed to create listening socket for 169.254.95.23: Address already in use

I did some research on this error and I believe my instance of pi-hole is causing this issue. It is not an option to remove or shut it down.


#5

Something is really wrong here. The IP range 169.254.* is for private IP addresses, and it is used when a device did not manage to get a DHCP lease. It is weird that LXD (dnsmasq) is complaining about such an IP address while lxdbr0 has the IP range 10.179.195.*.


(Мэтью Смит) #6

Words you never want to hear haha

Hmmm. I don’t think I have a particularly unusual setup so I’ll list anything I think may be relevant.

I run a docker container in an lxc container.

The host computer has a static IP (reserved via Netplan) on the 192.168.86.xxx subnet.

I run openvpn on the host with a 10.8.0.xxx subnet.

Five lxd containers with LAN access via macvlan.

As mentioned earlier, Pi-Hole runs on the host. How it monopolizes web-serving functionality is the reason I got into lxd (and I am grateful for it).

Any other info that may help?


(Мэтью Смит) #7

I shutdown pihole-ftl (dns) and was able to create the lxdbr0 but then could not reatart the DNS service. Is there a reason the bridge needs port 53?