From owner-freebsd-hackers Sun Jun 10 7:29:49 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from peace.mahoroba.org (peace.calm.imasy.or.jp [202.227.26.34]) by hub.freebsd.org (Postfix) with ESMTP id 3FC1D37B405 for ; Sun, 10 Jun 2001 07:29:43 -0700 (PDT) (envelope-from ume@mahoroba.org) Received: from localhost (IDENT:bBL5ROO7g3BVXEyDfhfiyC9omGE/qsZ5fdfNEK1FcjgkV6v0O2u+XgP+tn3HzNf/@localhost [::1]) (authenticated as ume with CRAM-MD5) by peace.mahoroba.org (8.11.4/8.11.4/peace) with ESMTP/inet6 id f5AETAZ66076; Sun, 10 Jun 2001 23:29:10 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Sun, 10 Jun 2001 23:29:07 +0900 (JST) Message-Id: <20010610.232907.74740159.ume@mahoroba.org> To: brooks@one-eyed-alien.net Cc: hackers@FreeBSD.ORG, brian@Awfulhak.org, phk@critter.freebsd.dk Subject: Re: cloning network interfaces From: Hajimu UMEMOTO In-Reply-To: <20010608191904.A18847@Odin.AC.HMC.Edu> References: <200106071119.f57BJr766008@hak.lan.Awfulhak.org> <20010607164812.A32379@Odin.AC.HMC.Edu> <20010608191904.A18847@Odin.AC.HMC.Edu> X-Mailer: xcite1.38> Mew version 1.95b119 on Emacs 20.7 / Mule 4.0 =?iso-2022-jp?B?KBskQjJWMWMbKEIp?= X-PGP-Public-Key: http://www.imasy.org/~ume/publickey.asc X-PGP-Fingerprint: 6B 0C 53 FC 5D D0 37 91 05 D0 B3 EF 36 9B 6A BC X-URL: http://www.imasy.org/~ume/ X-Operating-System: FreeBSD 5.0-CURRENT Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, >>>>> On Fri, 8 Jun 2001 19:19:04 -0700 >>>>> Brooks Davis said: brooks> Following Brian's suggestion, I've modified gif to create a /dev/if_gif brooks> device with is controlled by the IOCIFMANAGE ioctl which allows creation brooks> and deletion of specific devices and creation of wildcard devices. I've brooks> hacked ifconfig to support this in a general manner. If you know which brooks> one you want to use you can do something like I think it is not BSD network way. Recent NetBSD has network interface cloning. It uses SIOCIFCREATE and SIOCIFDESTROY. It may good to port it to FreeBSD. brooks> ifconfig gif783 10.0.0.1 10.0.0.2 brooks> # gifconfig has to come second because I didn't add creation support to brooks> # it because I want to kill it off in favor of ifconfig "tsrc" and brooks> # "tdst" parameters like Solaris uses. brooks> gifconfig gif783 blah brooks> or if you don't care which one you use you can do brooks> newgif=`ifconfig gif#` brooks> gifconfig ${newgif} blah brooks> ifconfig ${newgif} 10.0.0.1 10.0.0.2 brooks> You can also delete interfaces: brooks> ifconfig -D gif783 NetBSD's ifconfig has `create' and `destroy' keyword for it. You can create gif interface by ifconfig gif0 create or ifconfig gif0 create tunnel 10.0.0.1 10.0.2.2 To destroy gif interface: ifconfig gif0 destroy BTW, gifconfig will be obsoleted soon as KAME and other BSDs did. -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@bisd.hitachi.co.jp ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message