In case it's useful, I'm posting here the libvirt/qemu network configuration I 
used to try the above patches out.

- Ken.


## Here's a libvirt network config with NAT configured for both IPv4 and IPv6.
## The ULA range is randomly chosen.
# cat /etc/libvirt/qemu/networks/dhcptest.xml
<network>
  <name>dhcptest</name>
  <forward mode='nat'>
    <nat>
      <port start='1024' end='65535'/>
    </nat>
  </forward>
  <bridge name='virbr1' stp='on' delay='0'/>
  <domain name='dhcptest.home.arpa'/>
  <ip address='192.168.100.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.100.128' end='192.168.100.254'/>
    </dhcp>
  </ip>
  <ip family='ipv6' address='fd3a:d614:cde6:b03e::1' prefix='64'>
    <dhcp>
      <range start='fd3a:d614:cde6:b03e::100' end='fd3a:d614:cde6:b03e::1ff'/>
    </dhcp>
  </ip>
</network>


## Here's the interfaces file for debian running inside qemu.
## Various combinations of {inet,inet6} {static,dhcp} can be tested.
# cat /etc/network/interfaces

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp
iface eth0 inet6 dhcp
#iface eth0 inet static
#    address 192.168.100.37/24
#    gateway 192.168.100.1
#    dns-nameservers 192.168.100.1
#iface eth0 inet6 static
#    address fd3a:d614:cde6:b03e::37/128
#    gateway fd3a:d614:cde6:b03e::1
#    dns-nameservers fd3a:d614:cde6:b03e::1


## Then, e.g.
# resolvectl
Global
       Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: stub

Link 2 (eth0)
Current Scopes: DNS
     Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
   DNS Servers: fd3a:d614:cde6:b03e::1 192.168.100.1
    DNS Domain: dhcptest.home.arpa

Link 3 (eth1)
Current Scopes: none
     Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported

Reply via email to