From owner-freebsd-net@FreeBSD.ORG Fri Sep 24 09:06:40 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3C1A1065695 for ; Fri, 24 Sep 2010 09:06:40 +0000 (UTC) (envelope-from lasse@bitmand.com) Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4D1868FC08 for ; Fri, 24 Sep 2010 09:06:37 +0000 (UTC) Received: by ewy22 with SMTP id 22so808265ewy.13 for ; Fri, 24 Sep 2010 02:06:37 -0700 (PDT) Received: by 10.213.34.148 with SMTP id l20mr2955803ebd.1.1285319196989; Fri, 24 Sep 2010 02:06:36 -0700 (PDT) Received: from [172.10.20.2] (0x55811712.terminal.tdcmobil.dk [85.129.23.18]) by mx.google.com with ESMTPS id a48sm2739503eei.19.2010.09.24.02.06.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 24 Sep 2010 02:06:36 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=windows-1252 From: Lasse Brandt In-Reply-To: <20100923160300.S31898@maildrop.int.zabbadoz.net> Date: Fri, 24 Sep 2010 11:06:30 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <6BE964C4-0838-4DA6-9278-12C620CA1EE1@bitmand.com> <20100924.004332.121072178.hrs@allbsd.org> <20100923160300.S31898@maildrop.int.zabbadoz.net> To: bz=lists@zabbadoz.net X-Mailer: Apple Mail (2.1081) Cc: freebsd-net@FreeBSD.org, Hiroki Sato Subject: Re: Default gateway on different net X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2010 09:06:40 -0000 Hi, Thanks for the replies :) On 23/09/2010, at 18.15, bz=3Dlists@zabbadoz.net 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? >>=20 >> 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: >=20 > 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_enable=3D=94YES=94 ipv6_static_routes=3D=94defgw=94 ipv6_route_defgw=3D=942a01:xxxx:xxxx:3180:: -prefixlen 59 -iface re0=94 ipv6_defaultrouter=3D=942a01:xxxx:xxxx:3180::1=94 ipv6_default_interface=3D=94re0=94 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=3D=94re0=94= 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=3D1 - 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=