From owner-freebsd-net@FreeBSD.ORG Sat Jul 5 19:42:45 2008 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 82E411065677 for ; Sat, 5 Jul 2008 19:42:45 +0000 (UTC) (envelope-from yuri.pankov@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by mx1.freebsd.org (Postfix) with ESMTP id 013CF8FC0C for ; Sat, 5 Jul 2008 19:42:44 +0000 (UTC) (envelope-from yuri.pankov@gmail.com) Received: by nf-out-0910.google.com with SMTP id h3so560473nfh.33 for ; Sat, 05 Jul 2008 12:42:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:received :x-authentication-warning:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=Jta9sAzwUOrsaUg4MNawvL11/bM+tzfcvLUtx392lL4=; b=nz0dDKLCdU7JQxn5KLT5THJoBSgr2JdT58HfX1iIEK1hCH4pKV0+e75BwA1vUA8kyR MiLdo+Yl5mP2JgwtJtdkCSXr81dqzHkSc9hlniNR2LCPOCwuSnJnAbBIAnpHiswCUzuO TkElcGKOTph/CBCHB6+bCCeGL5eE1mBQByQLc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=x-authentication-warning:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; b=LzsVFt4k18zDwfaO+JD5jyg3WZsKeZT5wh2cS4raAZ7y4WcYVwYrN6Q384o2P4gdrw cv0rOGjLWd0NhPOdWdP/B7OsHu2k2naDwZ1xavskhEszbgQmg3H44xtlAK9ZTpggm+7x 6Mt6GU01W0xAYh6GjYaj97r0Uxmbbzg2p/brc= Received: by 10.210.20.17 with SMTP id 17mr1494516ebt.21.1215285497923; Sat, 05 Jul 2008 12:18:17 -0700 (PDT) Received: from darklight.homeunix.org ( [85.172.52.13]) by mx.google.com with ESMTPS id p10sm3009781gvf.7.2008.07.05.12.18.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 05 Jul 2008 12:18:16 -0700 (PDT) Received: from darklight.homeunix.org (darklight.homeunix.org [127.0.0.1]) by darklight.homeunix.org (8.14.2/8.14.2) with ESMTP id m65JIClK058450; Sat, 5 Jul 2008 23:18:12 +0400 (MSD) (envelope-from yuri.pankov@gmail.com) Received: (from yuri@localhost) by darklight.homeunix.org (8.14.2/8.14.2/Submit) id m65JIBok058449; Sat, 5 Jul 2008 23:18:11 +0400 (MSD) (envelope-from yuri.pankov@gmail.com) X-Authentication-Warning: darklight.homeunix.org: yuri set sender to yuri.pankov@gmail.com using -f Date: Sat, 5 Jul 2008 23:18:11 +0400 From: Yuri Pankov To: Boris Kochergin Message-ID: <20080705191811.GA58433@darklight.homeunix.org> References: <486FC54B.3060706@acm.poly.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <486FC54B.3060706@acm.poly.edu> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-net@freebsd.org Subject: Re: One-liner for setting IPv6 address and IPv4 endpoints on gif interface? 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: Sat, 05 Jul 2008 19:42:45 -0000 On Sat, Jul 05, 2008 at 03:02:35PM -0400, Boris Kochergin wrote: > Hi, list. I set up an IPv6-over-IPv4 tunnel from Hurricane Electric > using a gif(4) interface using the commands: > > ifconfig gif0 tunnel [source IPv4] [destination IPv4] > ifconfig gif0 inet6 [source IPv6] [destination IPv6] prefixlen 128 > route -n add -inet6 default [destination IPv6] > > I'm wondering whether there's a one-liner for executing the first two > commands, or some non-one-liner way of making it happen through > /etc/rc.conf. Thanks. > > -Boris Not sure about one-liner, but that's what I'm using in rc.conf (Hurricane Electric's tunnelbroker.net tunnel): gif_interfaces="gif0" gifconfig_gif0="src_ipv4 dst_ipv4" ipv6_enable="YES" ipv6_ifconfig_gif0="src_ipv6 dst_ipv6 prefixlen 128" ipv6_defaultrouter="dst_ipv6" HTH, Yuri