Incus using the same ip range with host which has only one physical device

There are multiple ways todo this, some of them:

  • macvlan (simple, but vm and host can not talk to each other)
  • bridge with proxy pass through (but only for individual ports, each needs to be known)
  • incus managed / host managed bridge

Assuming you are on Incus (not IncusOS) probably easiest way todo this is to create a host managed bridge, then simply attach your containers/vms to it.

I.e. on Debian (based) distributions you can do similar to this:

auto lo
iface lo inet loopback

auto br0
  iface br0 inet static
  address 192.168.1.250/24
  gateway 192.168.1.1
  bridge_ports enp1s0
  bridge_stp off

iface enp1s0 inet manual

IMPORTANT: If you create a bridge on linux, do not assign an IP to the interface, only to the bridge.

then attach this interface (or create a profile):

incus config device add notpfsense eth0 nic nictype=bridged parent=br0

On IncusOS its easier - the device you see (i.e. eno1) actually is a bridge already.

Here some more details and discussion:

Good tutorial in the Documentation: