[SOLVED] Static IPv6 - Lost route after a while

BJ78945

Well-Known Member
Apr 15, 2015
75
17
48
Hi,

I have a strange problem. I use a server at ovh with ovh proxmox 4 template. IPv6 is working. I defined static entries as described in the wiki. But after a while i cannot access the vm via ipv6. When i make a ping from the vm to any ipv6 address, i get the message network is unreachable. So i try to debug my problem. I see after a rebbot i get default routes via ra and with this it works. When this routes expire, ipv6 didn't work anymore. I cannot see the static default route but if I manual add this, I get the error that this entry allready exists.

VM:
(Proxmox GUI Network settings see attachment)
Code:
iface eth0 inet6 static
        address XXX
        netmask 64
        post-up ip route add XXXff:ff:ff:ff:ff dev eth0
        post-up ip route add default via XXXff:ff:ff:ff:ff dev eth0
        pre-down ip route del default via XXXff:ff:ff:ff:ff dev eth0
        pre-down ip route del XXXff:ff:ff:ff:ff dev eth0
Code:
ip -6 route
XXX::/64 dev eth0  proto kernel  metric 256
XXXff:ff:ff:ff:ff dev eth0  metric 1024
XXX::/56 dev eth0  proto kernel  metric 256  expires 2591042sec
fe80::/64 dev eth0  proto kernel  metric 256
fe80::/64 dev eth1  proto kernel  metric 256
default via fe80::XX:af00 dev eth0  proto ra  metric 1024  expires 842sec hoplimit 64
default via fe80::XX:df80 dev eth0  proto ra  metric 1024  expires 842sec hoplimit 64

Host:
Code:
iface eth0 inet6 static
        address XXX
        netmask 64
        post-up ip route add XXXff:ff:ff:ff:ff dev eth0
        post-up ip route add default via XXXff:ff:ff:ff:ff dev eth0
        pre-down ip route del default via XXXff:ff:ff:ff:ff dev eth0
        pre-down ip route del XXXff:ff:ff:ff:ff dev eth0
Code:
ip -6 route
XXX::/64 dev vmbr0  proto kernel  metric 256  pref medium
XXXff:ff:ff:ff:ff dev vmbr0  metric 1024  pref medium
fe80::/64 dev vmbr0  proto kernel  metric 256  pref medium
fe80::/64 dev tap151020097i0  proto kernel  metric 256  pref medium
fe80::/64 dev fwbr151020105i0  proto kernel  metric 256  pref medium
...
default via XXXff:ff:ff:ff:ff dev vmbr0  metric 1024  pref medium

EDIT:
If the ra default route expires, i can add the regulare route with "ip route add default via XXXff:ff:ff:ff:ff dev eth0" and then ipv6 works. I think the problem is the following: If a vm starts, everything get configred as described in interfaces config but the vm get also ra routes (perhaps from the host??). When the routes expires, alls default routes get deleted, so i can add the real default route again. But this is no solution beacause it dosn't survice a reboot. My vm uses debian from the proxmox images.
 

Attachments

  • Unbenannt.png
    Unbenannt.png
    51.5 KB · Views: 7
Last edited:
So there's something in the network sending router advertisement packets without renewing the routes after they expire? You'll want to fix your router and/or ignore router-advertisements on the container's interface.
(net.ipv6.conf.eth0.accept_ra=0)
 
Hi,

I tried net.ipv6.conf.eth0.accept_ra=0 but this didn't help. But the problem is gone. Perhaps there was a mistake in the network.

Thank you.
 
I have a Soyoustart (OVH brand) server with Proxmox 4 installed. I had the same problem, default route got lost short after boot. I saw link-local gateways in the route command.

Setting net.ipv6.conf.eth0.accept_ra=0 inside the container seems to have fixed the issue with the OVH ra message. I really hope the error is gone now, it drove me crazy.

Is it possible to set these values for new containers per default?

Regards
voja
 
Hi voja,

my problem appears again. How about you? Is your fix still working?
 
Hi,

my containers still all have IPv6 connectivity.
I added the file /etc/sysctl.d/ipv6.conf to all my Debian/Ubuntu containers with the content:

net.ipv6.conf.eth0.accept_ra=0

Then I rebooted all containers and checked the value to be set correct.

This solved my problem since ~23 hours. Without the entry the connectivity was lost within 15-30 minutes or did not work at all after rebooting the container. No problems since.

Regards
voja
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!