[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

libvirt guest bridge configuration



I'm trying to bridge a network interface between host and guest (both Debian Buster+Bullseye+Sid) so that NAT is not needed.

In the host /etc/network/interfaces I've declared a bridge like this:

auto eno1
iface eno1 inet static
  address 2.4.6.8
  netmask 255.255.255.224
  gateway 2.4.6.1
  up route add -net 2.4.6.0 netmask 255.255.255.224 gw 2.4.6.1 dev eno1


auto virbr-dummy
iface virbr-dummy inet manual
    pre-up /sbin/ip link add virbr-dummy type dummy
    up /sbin/ip link set virbr-dummy address 52:54:00:f0:37:ba


auto virbr10
iface virbr10 inet static
    bridge_ports virbr-dummy
    bridge_stp on
    bridge_fd 2
    address 2.4.6.73
    netmask 255.255.255.224
    gateway 2.4.6.65
    broadcast 2.4.6.95
    up route add -net 2.4.6.64 netmask 255.255.255.224 gw 2.4.6.65 dev eno1

Please note that 2.4.6.x are not my real IP addresses, but I've been really assigned 2 IP addresses and I want to use one for the host and the other for the guest.

Until here it seems to work in that I can ping both addresses. However I don't know how I should configure my guest VM interface. There is no nat, no DHCP and if I specify the same IP address for the virtualized interface as the host bridge it's connecting to, it doesn't even detect any link.

The guest was created with:

# virt-install --network bridge=virbr10,model=virtio ...

Please help.


Reply to: