Default gateway on different net

Lasse Brandt lasse at
Fri Sep 24 09:06:40 UTC 2010


Thanks for the replies :)

On 23/09/2010, at 18.15, bz=lists at wrote:
> On Fri, 24 Sep 2010, Hiroki Sato wrote:
>> la> 1) Is the hosting provider actually forcing me to do something "bad"
>> la> og plain wrong?
>> In that situation normally you get an IP address in the /59 network
>> to communicate with the gateway router from ISP.  An IP address in
>> your /64 network cannot directly communicate with an address in /59.

But I don't get that. I actually asked the hosting provider about this, and they told me specific not to use an ip on the /59 subnet. (I can tell you that it worked, I tried :))

>> If you do not have the /59 address, I think using link-local address
>> is the easiest way.  As long as the gateway works correctly, you can
>> get its link-local address by using the following command:
> The drawback with that is if the hosting provider changes the interface
> of your gateway, moves you to a different router, ... your default route
> stops working.

Let me just snippet the current (and working) configuration - this is what I got from the hosting provider:

IPs: 2a01:xxxx:xxxx:3183:: /64
Gateway: 2a01:xxxx:xxxx:3180::1 /59

And this is my rc.conf:

ipv6_route_defgw=”2a01:xxxx:xxxx:3180:: -prefixlen 59 -iface re0”

There is 2 "issues" at the moment. The first is that the static route and defaultrouter alone will not work - the packets will still not end up at the interface re0. The additional ipv6_default_interface=”re0” will actually do this:

ndp -I re0

And thats the key (in my case) - after specifying the default interface, it works.
But, I still don't think this is very elegant - first of, I need to accept route advertisements in sysctl.conf with: net.inet6.ip6.accept_rtadv=1 - not even sure why, but that check is made in /etc/network.subr.

Secondly, and I am still unsure if this a feature or bug in FreeBSD, but as I mentioned in an earlier post, the defaultrouter is beeing set before the static routes - and that won't work either ( check /etc/network.subr line 1057 - i simply moved default to the end ).

Best regards,
Lasse Brandt

More information about the freebsd-net mailing list