tech-net archive

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

Re: ipv6 gateway on different subnet



Hi LLoyd

 ---- On Sun, 19 Jan 2025 19:09:06 +0000  Lloyd Parkes  wrote --- 
 > It appears that there are a number of things going on here. Firstly, as
 > kre has noted, your VPS isn't doing the normal IPv6 thing and NetBSD
 > makes normal IPv6 easy. Secondly the route commands available on BSD
 > and Linux have a lot of diversity and history. In order to understand
 > route command examples from the web you sometimes have to be really on
 > top of your game.
 > 
 > Anyway I got this to work in my home lab with the following
 > 
 >     1) route add -inet6 default 2602:fed2:7116::1 -connected -ifp wm2
 >     2) Turn off dhcpcd (this is critical).
 > 
 > You don't need to specify "-net" because "default" is always a network.
 > You don't need the /128 on the IPv6 address because an IPv6 gateway is
 > always /128. "-connected -ifp wm2" tells the kernel that the gateway is
 > connected to wm2 even though the IPv6 addresses make it look like it
 > isn't. You will use vioif0 of course.
 > 
 > In my case dhcpcd was deleting the route after a minute or so. This
 > could easily be your problem as well. If you need dhcpcd for IPv4 then
 > try adding "noipv6" to /etc/dhcpcd.conf.

dhcpcd deletes routes because it has it's own route to apply from RA or some other source which would conflict with the one you added.
Can you state the routes dhcpcd applies please? Maybe a raw tcpdump of the RA as well incase dhcpcd is doing someting wrong.

Then we can look into maybe adding a new dhcpcd option to help out here if needed.

Roy


Home | Main Index | Thread Index | Old Index