Date: Tue, 22 Jul 2008 14:26:47 +0900 From: Hashimoto <hsmtkk@gmail.com> To: freebsd-questions@freebsd.org Subject: Re: config as an exit of "IPv6 over IPv4 tunnel" Message-ID: <6bae2c430807212226h2e303f3h88d6aeb7d68116c7@mail.gmail.com> In-Reply-To: <48846345.4060601@infracaninophile.co.uk> References: <6bae2c430807210220r467fb25dj29b0185e1595b282@mail.gmail.com> <48846345.4060601@infracaninophile.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks, Matthew ! I will try it, and report again. 2008/7/21 Matthew Seaman <m.seaman@infracaninophile.co.uk>: > Hashimoto wrote: >> >> Can I configure FreeBSD as an exit of "IPv6 over IPv4 tunnel"? >> >> Let me explain it in detail. >> Both hostA and hostB have global IPv4 address. >> And hostA has global IPv6 address. >> I have installed FreeBSD 7.0 on both hostA and hostB. >> Then, I want to config "IPv6 over IPv4 tunnel" from hostB to hostA. >> Is it possible? >> > > Yes, absolutely. I have a similar configuration for my IPv6 connectivity. > There are some alternatives (stf(4), faith(4)), but this is based I what > I have. > > This is mostly in terms of what you'ld add to /etc/rc.conf on HostB -- > HostA will be similar, but addresses will be reversed in the obvious > places. > > i) Create a gif(4) interface and configure the endpoints: > > gif_interfaces="gif0" > gifconfig_gif0="hostB-ipv4-number hostA-ipv4-number" > > ii) Enable IPv6 on HostB -- I'm assuming you've assigned a /64 net block to > HostB (perhaps a tad excessive, but pretty much the > default for an allocation of a chunk of IPv6 address space.) Adjust > the prefixlen to suit. > > ipv6_enable="YES" > ipv6_defaultrouter="-interface gif0" > ipv6_default_interface="gif0" > ipv6_ifconfig_gif0="1234:5678:9abc:def0::1 prefixlen 64" > > iii) Settings on HostA are slightly different -- HostA has to be a > router, and it only wants to route the HostB block via the gif(4) > tunnel: > > ipv6_enable="YES" > ipv6_defaultrouter="hostA-ipv6-gateway-address" > ipv6_gateway_enable="YES" > > ipv6_static_routes="hostB" > ipv6_route_hostB="1234:5678:9abc:def0:: -prefixlen 64 -interface gif0" > > iv) That should be everything you need to get point to point connectivity > working. Note: it's pretty easy now to make HostB an IPv6 router and > assign IPv6 addresses to anything on the same local subnet as HostB. > In fact, you can use rtadvd(8) on HostB to make that automatic: > > ipv6_network_interfaces="auto" > ipv6_prefix_em0="1234:5678:9acb:def0" > rtadvd_enable="YES" > rtadvd_interfaces="em0" > > Then just run rtsol(8) on all the other machines that will use HostB as > their IPv6 gateway. > > Cheers, > > Matthew > > -- > Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard > Flat 3 > PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate > Kent, CT11 9PW > > -- Hashimoto Kouki hsmtkk@gmail.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6bae2c430807212226h2e303f3h88d6aeb7d68116c7>