Router doesn't "see" the container

I’m trying to set up a container so that the router can “see” it.

$ incus network show incusbr1
config:
  bridge.driver: openvswitch
  ipv4.address: 192.168.100.1/24
  ipv4.nat: "true"
  ipv6.address: fd42:de90:5601:e609::1/64
  ipv6.nat: "true"
description: supposed to be a vSwitch
name: incusbr1
type: bridge
used_by:
- /1.0/instances/test
- /1.0/profiles/bridgeprofile
managed: true
status: Created
locations:
- none
project: default

I can access the internet from inside the container, and address it from the Host system. My firewall is set to let all traffic from inusbr1 pass.

Looking around online, it seemed like I needed an Open vSwitch bridge, and I now have that, but I don’t have the desired effect of being able to accessing it from elsewhere on the network.

I do it in a different way. I create a bridge on my host then attach its network card to the bridge. Once that is working, I edit my Incus profiles to use the bridge.

When I launch an instance that uses this profile my router assigns IP addresses from my local network to the instances and provides routing across the whole network.

Generally, I use the nmtui tool from NetworkManger to setup this sort of network.

I have posted a few times on this topic. It seems like we could create a tutorial or add it the FAQ.

1 Like

I’d be happy to help, but I’m very new to this so am unlikely to be of much use.

Today I’ll try creating a bridge separately, as you suggest, though I’ll be doing it through Nix files. The biggest thing I learned after using Arch for 10 years without reinstalling is that I forget what’s what, so I’m trying to stick with the NixOS Way so long as it isn’t too impractical.

I’d very much appreciate you sharing those other posts you mentioned.

I found two that might help.

1 Like

Thanks. I seem to have set up a bridge with NetworkManager, and I think I connected it to Incus correctly, but no IP addresses are being assigned to containers using the bridge. I made sure the firewall is allowing traffic through.

From ip addr:

3: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br0 state UP group default qlen 1000
    link/ether 6c:bf:b5:02:ef:5c brd ff:ff:ff:ff:ff:ff
18: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 22:8c:a8:b2:d5:7d brd ff:ff:ff:ff:ff:ff
    inet 169.254.189.11/16 brd 169.254.255.255 scope global noprefixroute br0
       valid_lft forever preferred_lft forever
    inet6 fe80::6ebf:b5ff:fe02:ef5c/64 scope link 
       valid_lft forever preferred_lft forever
$ incus profile show bridged
config: {}
description: ""
devices:
  eth0:
    name: eth0
    nictype: bridged
    parent: br0
    type: nic
name: bridged
used_by:
- /1.0/instances/test
- /1.0/instances/test2
project: default

edit: In face it matters, my router’s subnet is 192.168.50.xxx, not 169.whatever. I’d change that, but last time I did something like that, I lost all network connectivity.

It looks like you go it figured out. Your subnet is not correct.

I would set both IPv4 and IPv6 to Automatic.

Of course, there is always a risk, but your link local address is definitely not going to work.

Like this?

I’m still getting

15: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 8a:a2:08:48:b6:c6 brd ff:ff:ff:ff:ff:ff
    inet 169.254.74.210/16 brd 169.254.255.255 scope global noprefixroute br0
       valid_lft forever preferred_lft forever

I’m the test container using that bridge isn’t receiving any IP addresses (v4 or v6). I tried disabling my firewall, thinking that could be it, but that didn’t help.

So it needs to be 192.168.50.1/24?

I would set it to automatically connect. That is a setting on the bottom.

You will all need to set the network card of your host as a slave for the bridge. My system calls them slaves. It looks like yours might call them ports. You seemed to have that setup before.

The correct subnet should be set automatically. I can’t tell you what it is since I don’t have access to your router.

I hope this works.

Any luck? I am still thinking I will create some documentation on this topic and maybe try to create some reproducible examples.

It would be great to hear how things are going on your side.

:slight_smile:

Sorry, I tried, but got frustrated and moved on to another networking related Incus thing. Which also didn’t work. And then another. :confounded:

I’ll make another thread on one of the other issues this weekend, but I need to step away from this for now.

No problem. Networking is the hardest part of all this and also the hardest to learn. I am still learning it myself.

We can help each other. :blush:

1 Like