6

My ISP offers IPv6 by default. However, my ISPs IPv6 setup appears to be a bit strange because the default IPv6 gateway is located outside of my servers subnet. Under linux it is possible to setup a static route to that gateway using ip -6 route add <gateway ip> dev <interface>. However, this doesn't work on openbsd, does anybody know the equivalent of that command on openbsd or does anyone know know another approach to fix this problem?

RNieaa
  • 61
  • 2
  • Typically it would be a link-local address, in particular in the context of SLAAC. Is that what you mean by "outside my server's subnet"? – Håkan Lindqvist Jul 14 '14 at 16:15

3 Answers3

1

Add the following to /etc/rc.conf:

ipv6_defaultrouter="<v6-gateway-ip>"

then reset networking by either rebooting or running

/etc/rc.d/network_ipv6 restart

Or you can do it by hand:

 route -n add -inet6 default <v6-gateway-ip>
Jed Daniels
  • 7,172
  • 2
  • 33
  • 41
  • The "do it by hand" method returns "route: writing to routing socket: Network is unreachable" and I didn't test the other method because /etc/rc.d/network_ipv6 doesn't exist on my system. – RNieaa Dec 20 '13 at 21:25
1

I know three approaches to solve this:

  • Find another IPv6 address of the gateway. It might have multiple assigned to the interface. Which one you use as gateway does not make any difference, as long as neighbor discovery can resolve it to the correct MAC address.
  • Add a static route specifying that the prefix containing that MAC address is directly connected to the given Ethernet interface. This should work even if you don't have an address in that prefix yourself. You should use a /128 for that static route, unless you have a very specific reason to do otherwise.
  • Make up an IPv6 address for the gateway and insert it manually in the neighbor cache. This approach will only work if you know the MAC address of the gateway and it remains fixed. This should work on any OS where you can manually create neighbor cache entries, but I have only tested it on Linux.
kasperd
  • 29,894
  • 16
  • 72
  • 122
0

This looks like a possible network mis-config. The default router for each network segment in IPv6 is carried in the Router Announcement. Look to see what they're giving you in the RA, it should be a link-layer (fe80:...) IPv6 address.

You can over-ride that, as noted above, but you shouldn't have to.

tep
  • 304
  • 1
  • 5