On 22/07/2026 22:15, Mikolaj Kucharski wrote:

Hi.

I was using for long the workaround of prefix 56 on an interface to make
IPv6 work in OVH. I tried today to make on-link setup work, but I fail to
figure out how, for IPv6.

I'm on -current.

# sysctl -n kern.version
OpenBSD 8.0-beta (GENERIC.MP) #51: Tue Jul 21 20:50:59 MDT 2026
     [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP


Here is my hostnname.if(5):

---8<---
inet xxx.xxx.xxx.aaa/32
!route -n add -inet -host xxx.xxx.xxx.254 -link -iface \$if
!route -n add -inet default xxx.xxx.xxx.254

inet6 zzzz:zzzz:zzz:zzdc::1 128
!route -n add -inet6 -host zzzz:zzzz:zzz:zzff:ff:ff:ff:ff -link -iface \$if
!route -n add -inet6 default zzzz:zzzz:zzz:zzff:ff:ff:ff:ff

up
--->8---

Above setup for IPv4 works, but for IPv6 doesn't. Execution looks successful:

# ifconfig ix0 -inet6
# sh /etc/netstart ix0
add host xxx.xxx.xxx.254: gateway ix0
add net default: gateway xxx.xxx.xxx.254
add host zzzz:zzzz:zzz:zzff:ff:ff:ff:ff: gateway ix0
add net default: gateway zzzz:zzzz:zzz:zzff:ff:ff:ff:ff

but it doesn't work:

# ping6 -n -c3 zzzz:zzzz:zzz:zzff:ff:ff:ff:ff
PING zzzz:zzzz:zzz:zzff:ff:ff:ff:ff (zzzz:zzzz:zzz:zzff:ff:ff:ff:ff): 56 data 
bytes
ping6: sendmsg: Invalid argument
ping: wrote zzzz:zzzz:zzz:zzff:ff:ff:ff:ff 64 chars, ret=-1
ping6: sendmsg: Invalid argument
ping: wrote zzzz:zzzz:zzz:zzff:ff:ff:ff:ff 64 chars, ret=-1
ping6: sendmsg: Invalid argument
ping: wrote zzzz:zzzz:zzz:zzff:ff:ff:ff:ff 64 chars, ret=-1

--- zzzz:zzzz:zzz:zzff:ff:ff:ff:ff ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss


# ndp -na | grep ff:ff
zzzz:zzzz:zzz:zzff:ff:ff:ff:ff          (incomplete)          ix0 permanent R


What I am missing?

Please CC me with any replies as I'm not subscribed to misc.

From man route's example:

Add a static inet6(4) route to a host which is on the vio0 interface that is outside your prefix, and use that host as a default gateway, as used by some hosting providers:

           # route add -inet6 2001:db8:efef::1 -cloning -link -iface vio0
           # route add -inet6 default 2001:db8:efef::1

(thanks to sibiria on #openbsd for finding the right manpage).

Cheers,

Noth

Reply via email to