Date: Sun, 10 Jun 2001 23:29:07 +0900 (JST) From: Hajimu UMEMOTO <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 Message-ID: <20010610.232907.74740159.ume@mahoroba.org> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, >>>>> On Fri, 8 Jun 2001 19:19:04 -0700 >>>>> Brooks Davis <brooks@one-eyed-alien.net> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010610.232907.74740159.ume>