I’m currently excitedly transitioning from Proxmox to Incus for my homelab, and I’ve encountered a challenge with network configuration for which I’d deeply appreciate your expertise. I just spend the better part of my Sunday trying to get my cluster up and running on 7 hosts. I successfully launched a container with the following command:
incus launch images:debian/12 pihole --config limits.cpu=1 --config limits.memory=512MiB --target=rpi3bp
The container is running well. However, I’m struggling to configure the network with a static IP. My aim is simple: to bridge the host network to the container, ensuring it’s part of the same subnet (192.168.1.1/24).
The closest I’ve come to a working setup involved these steps:
incus network create ibr0 --target=t130
incus network create ibr0 --target=l640
incus network create ibr0 --target=rpi3bp
incus network create ibr0 --target=k72f
incus network create ibr0 --target=ux390ua
incus network create ibr0 --target=1018p
incus network create ibr0
followed by:
incus network set ibr0 ipv4.address=192.168.1.254/24
incus network attach ibr0 pihole eth0
I managed to receive an IP from my DHCP server:
root@rpi3bp:~# incus list
±--------±--------±---------------------±-----±----------±----------±---------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | LOCATION |
±--------±--------±---------------------±-----±----------±----------±---------+
| pihole | RUNNING | 192.168.1.165 (eth0) | | CONTAINER | 0 | rpi3bp |
±--------±--------±---------------------±-----±----------±----------±---------+
Setting up the static IP:
incus stop pihole
incus network detach ibr0 pihole
incus network attach ibr0 pihole eth0
incus config device set pihole eth0 ipv4.address=192.168.1.4
incus start pihole
The container can’t reach my local network or the Internet:
root@pihole:~# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
From 192.168.1.4 icmp_seq=1 Destination Host Unreachable
From 192.168.1.4 icmp_seq=2 Destination Host Unreachable
From 192.168.1.4 icmp_seq=3 Destination Host Unreachable
root@pihole4:~# ip route
default via 192.168.1.254 dev eth0 proto dhcp src 192.168.1.4 metric 1024
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.4 metric 1024
192.168.1.254 dev eth0 proto dhcp scope link src 192.168.1.4 metric 1024
I also tried following a guide on bridge networking in LXD (How to Configure Bridge Networking in LXD | Sean Blanchfield), which worked partially (I was able to get traffic in and out of the container) but didn’t allow setting a static IP because the network bridge was unmanaged.
If anyone can offer guidance on this seemingly straightforward yet challenging setup, I would be immensely grateful. Thank you in advance for your assistance!