From owner-freebsd-questions@FreeBSD.ORG Tue Jul 22 05:26:47 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F21F31065673 for ; Tue, 22 Jul 2008 05:26:47 +0000 (UTC) (envelope-from hsmtkk@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.235]) by mx1.freebsd.org (Postfix) with ESMTP id CE19E8FC17 for ; Tue, 22 Jul 2008 05:26:47 +0000 (UTC) (envelope-from hsmtkk@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so2033065rvf.43 for ; Mon, 21 Jul 2008 22:26:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=Ee9lIS9iSXTVFfwsqbJw2CUCqKl8hAajWMuugTC2NXA=; b=YR3RevTBuQe1vPhQrza0OyI5FqK3AGHGJ5Nj8aib6WyLsF3Tgj2Tk9pT6+xBoX3Clk d8iTNro1xHYNEOLnWlSb+caF0sCRJ8lbiWvaANlNMlfAuPpba03Ni3/bjE8SZ7aBtjmU hQxRUOAi/Ki3jQw8bO5jtT3m6d5bX5H61dyGQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=bbmWF6M+NIDhnHR21HZ5CREaCPYL6k3neEFg3oS5ht31jlegDmXrKuU813sK6nMjVQ CJI6re8XU7YvuWzlMYeq4epYEtACy1kyMmwvelSRec5eqcptOf3/zERKliDAP+babpG4 K61jWYrH6C3tV2IeHBxWxz2RHCyymEybkR3hQ= Received: by 10.115.76.1 with SMTP id d1mr3420251wal.196.1216704407334; Mon, 21 Jul 2008 22:26:47 -0700 (PDT) Received: by 10.110.86.15 with HTTP; Mon, 21 Jul 2008 22:26:47 -0700 (PDT) Message-ID: <6bae2c430807212226h2e303f3h88d6aeb7d68116c7@mail.gmail.com> Date: Tue, 22 Jul 2008 14:26:47 +0900 From: Hashimoto To: freebsd-questions@freebsd.org In-Reply-To: <48846345.4060601@infracaninophile.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <6bae2c430807210220r467fb25dj29b0185e1595b282@mail.gmail.com> <48846345.4060601@infracaninophile.co.uk> Subject: Re: config as an exit of "IPv6 over IPv4 tunnel" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jul 2008 05:26:48 -0000 Thanks, Matthew ! I will try it, and report again. 2008/7/21 Matthew Seaman : > 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