IPv6 Static route only works for a minute or so

I have a Linux workstation that I'm running virtual machines on using virt-manager.

I've set up a routed virtual network in virt-manager and have a Debian-12 guest vm using that.

I've added static routes on my Openwrt router for ipv4 and ipv6.

This works perfectly over IPv4, I can ssh into the vm from my laptop etc, and will hopefully be able to forward ports from the WAN to the vm (which is the point of this vm, I want to test Ansible roles I develop for use against my VPS).

But IPv6 is proving troublesome. I can access the vm from the host over v6 without issues, but from elsewhere on the network the connection works for a about a minute then dies. Neither my laptop or the router itself can ping the vm once the connection goes down.

If I switch the IPv6 static route Gateway address from using the Global IPv6 address 2a02:xxx:xxxx:xxx to the local fe80::xxxx:xxxx:xxxx:xxxx the connection works again, but again dies after a minute or so. Switch back to global and it starts again - you get the picture. FWIW I left ping running once and it died after about 65 packets sent (circa 5500 bytes).

At this point I'm just not sure where the problem lies. Running traceroute to the Debian VM from openwrt when the connection is working I get:

traceroute to 2a02:xxx:xxxx:1:xxxx:ff:xxxx:xxx (2a02:xxx:xxxx:1:xxxx:ff:xxxx:xxx), 30 hops max, 72 byte packets
 1  lev.lan (2a02:xxx:xxxx::xxx)  0.397 ms  0.447 ms  0.427 ms
 2  2a02:xxx:xxxx:1:xxxx:ff:xxxx:xxx (2a02:xxx:xxxx:1:xxxx:ff:xxxx:xxx)  0.324 ms  0.243 ms  0.225 ms

So it reaches the vm.

And once it's stopped working

traceroute to 2a02:xxx:xxxx:1:xxxx:ff:xxxx:xxx (2a02:xxx:xxxx:1:xxxx:ff:xxxx:xxx), 30 hops max, 72 byte packets
 1  2a02:xxx:xxxx:1::1 (2a02:xxx:xxxx:1::1)  3112.107 ms !H  3086.369 ms !H  3119.422 ms !H

The very very slow response comes from the IP of the virtual network bridge of the routed network I set up with virt-manager.

So it seems to reach the workstation and the routed bridge but not the last step to the VM.

This makes me think the problem lies in the workstation with the virtual network bridge, except restarting that bridge, recreating it, etc does nothing, whereas flipping the ipv6 static route Gateway IP in Openwrt does get it working, if briefly.

So where do I concentrate my attempts at debugging this problem? My OpenWRT router or my workstation?

I've tried a different approach to configuring the virtual network in virt-manager.

Previously I was assigning a static IP to the vm using the dhcp section:

      <host name="motest01" ip="2a02:xxx:xxxx:1:xxxx:ff:xxxx:xxx"/>

Which worked well in terms of keeping the IP static.

I've now removed that, the IPv6 setup for the vm should now happen via SLAAC, and that seems to result in a stable connection.

It really does appear the problem lies with libvirt and in my workstation, not my OpenWRT router.

Consider this 'solved'.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.