Date: Mon, 21 Jul 2008 11:21:57 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Hashimoto <hsmtkk@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: config as an exit of "IPv6 over IPv4 tunnel" Message-ID: <48846345.4060601@infracaninophile.co.uk> In-Reply-To: <6bae2c430807210220r467fb25dj29b0185e1595b282@mail.gmail.com> References: <6bae2c430807210220r467fb25dj29b0185e1595b282@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig5C890658DB76CD6DF7694714 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Hashimoto wrote: > Can I configure FreeBSD as an exit of "IPv6 over IPv4 tunnel"? >=20 > 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? >=20 Yes, absolutely. I have a similar configuration for my IPv6 connectivity= =2E 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=3D"gif0" gifconfig_gif0=3D"hostB-ipv4-number hostA-ipv4-number" ii) Enable IPv6 on HostB -- I'm assuming you've assigned a /64=20 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=3D"YES" ipv6_defaultrouter=3D"-interface gif0" ipv6_default_interface=3D"gif0" ipv6_ifconfig_gif0=3D"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=3D"YES" ipv6_defaultrouter=3D"hostA-ipv6-gateway-address" ipv6_gateway_enable=3D"YES" ipv6_static_routes=3D"hostB" ipv6_route_hostB=3D"1234:5678:9abc:def0:: -prefixlen 64 -interface gif0" iv) That should be everything you need to get point to point connectivity= =20 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=3D"auto" ipv6_prefix_em0=3D"1234:5678:9acb:def0" rtadvd_enable=3D"YES" rtadvd_interfaces=3D"em0" Then just run rtsol(8) on all the other machines that will use HostB as their IPv6 gateway. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig5C890658DB76CD6DF7694714 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAkiEY1IACgkQ8Mjk52CukIx45wCfXD7ICwkYjcELvE/pbsHwUVyH cOMAnRmg5HuQ5T++aEqRNd446ydWotdg =/A3P -----END PGP SIGNATURE----- --------------enig5C890658DB76CD6DF7694714--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48846345.4060601>