Unable to use Routed (brouter) method with netmask 255.255.255.255 in both host and vm

jose.r.r at metztli.com jose.r.r at metztli.com
Sat Feb 4 01:50:11 UTC 2023


Hello-

Assuming I have the host /etc/network/interfaces in Debian Bullseye as 
follows:

-----------------------------------------------------
auto enpXYs0
iface eth0 inet static
    address mn.opq.rst.xy # Main IP
    netmask 255.255.255.255
    pointopoint (Gateway IP)
    gateway (Gateway IP)

auto virbr0
iface virbr0 inet static
    address mn.opq.rst.xy #Main IP
    netmask 255.255.255.255
    bridge_ports none
    bridge_stp off
    bridge_fd 0
    pre-up brctl addbr virbr0
    # Additional IP for VM below: only mn.opq octets match main IP
    up ip route add mn.opq.uw.z/32 dev virbr0
    down ip route del mn.opq.uw.z/32 dev virbr0
----------------------------------------------------

Using the above configuration, ip addr
shows the main host IP address as 'peer' with its gateway IP.

Please, see:
< 
https://docs.hetzner.com/robot/dedicated-server/network/net-config-debian-ubuntu/#routed-brouter 
 >

What kind of /etc/libvirt/qemu/network/mytestnetwork.xml file should I 
create for a virtual machine installation connected via libvirtd? Please 
note that nftables are in use and possibly I should edit its 
configuration file to add the IP mn.opq.uw.z of the virtual machine and 
thus enable the VM to utilize the main host IP as a gateway.

Currently I have

mytestnetwork.xml which contains:
<network>
<name>mytestnetwork</name>
<uuid>char-string</uuid>
<forward mode='bridge'/>
<bridge name='virbr0'/>
</network>

The VirtManager GUI advances the installation of the Debian OS in the VM 
but even if I have provided the main host IP as its gateway IP it cannot 
fetch the debian packages from its repository, i.e., there is no 
connection to the outside world.

Any insight is appreciated.


-- 
Best Professional Regards.

--
Jose R R
http://metztli.it
---------------------------------------------------------------------------------------------
Download Metztli Reiser4: Debian Buster w/ Linux 5.16.20 AMD64
---------------------------------------------------------------------------------------------
feats ZSTD compression https://sf.net/projects/metztli-reiser4/
-------------------------------------------------------------------------------------------
Official current Reiser4 resources: https://reiser4.wiki.kernel.org/



More information about the libvir-list mailing list