Marc Peters <m...@mpeters.org> wrote:

> Hi list,
> 
> i have a difficult time reaching my default IPv6 default gateway in a
> different subnet. Asking Google brought up some threads from early 2011.
> Most of the solutions where switching the prefixlen to reach the gateway
> but this didn't work out for me. The mentioned route commands didn't
> work out for me, too. The support said, as they don't provide OpenBSD on
> their machines, they don't support it. They told me, to set up one IP
> from my network and add a host route to the gateway.
> 
> My network is 2001:4ba0:ffff:00ab::0 /64
> 
> The gateway is 2001:4ba0:ffff:1:beef::1

Your provider has a stupid network. There are way more than enough to
allocate an entire /64 just to route your real /64 to as e.g. HE's
tunnelbroker.net does.

> The provided example for FreeBSD (not verfied):
> 
> 
> route add -inet6 [ipv6-gateway] -iface [interface]
> ndp -s [ipv6-gateway] [mac-gateway]
> route add -inet6 default [ipv6-gateway]

This hints at the correct thing to do. Your gateway's public IP address
isn't on your network, but you share a link-local address.

Run
        ifconfig em0 inet6 2001:4ba0:ffff:00ab:: prefixlen 64
        route add -inet6 default [link-local address of gateway]

The link local address of the gateway looks like
fe80::dead:beef:cafe:babe%em0. You may be able to get it from ndp -a
or tcpdump, but you can ask the provider if all else fails. From the
example above, you have the MAC address. I believe there are also
several converters online, or it's in RFC 4291. This is easier than
messing around with -iface because IPv6's NDP won't recognize that.

Since with IPv6 you get an entire network, it would be beneficial if
your provider didn't have to use one for their router. The usual
solution is to allocate a /64 for their router and your endpoint, and
then route your network to your endpoint. You have the same thing,
except the point-to-point link is using link-local instead of global
addresses.

- Martin

Reply via email to