From owner-freebsd-hackers Wed Jan 29 19:54:38 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id TAA16765 for hackers-outgoing; Wed, 29 Jan 1997 19:54:38 -0800 (PST) Received: from smyrno.sol.net (smyrno.sol.net [206.55.64.117]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id TAA16759 for ; Wed, 29 Jan 1997 19:54:35 -0800 (PST) Received: from solaria.sol.net (solaria.sol.net [206.55.65.75]) by smyrno.sol.net (8.8.3/8.8.3) with SMTP id VAA21433; Wed, 29 Jan 1997 21:54:27 -0600 (CST) Received: from localhost by solaria.sol.net (8.5/8.5) id VAA00595; Wed, 29 Jan 1997 21:33:48 -0600 From: Joe Greco Message-Id: <199701300333.VAA00595@solaria.sol.net> Subject: Re: Network interfaces: removal of. To: louie@TransSys.COM (Louis A. Mamakos) Date: Wed, 29 Jan 97 21:33:45 CST Cc: julian@whistle.com, hackers@freebsd.org In-Reply-To: <199701280402.XAA03991@whizzo.transsys.com> from "Louis A. Mamakos" at Jan 27, 97 11:02:20 pm X-Mailer: ELM [version 2.4dev PL65] MIME-Version: 1.0 Content-Type: text Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > does anyone have any ideas on this? > > One idea: add a new message for the routing socket which can notify > routing daemons that you want to delete an interface (or, like it or not, > it's gone now). Hopefully they can then arrange to have active references > to the interface be removed. > > I recall another system which had a the ability to "delete" a network > interface. What it really did was cheat: it essentially overwrote the > interface name, and shoved the data structure off into a corner. It was > still around, though, so that if there was some errant reference to it, > nothing "bad" would happen. > > Clearly, this is just a hack. However, it seems to work "well enough", > so from a pragmatic perspective, you can't dismiss it completely. > > While I'm sure that the modules that reference interfaces are finite, > there's nothing to allocate references to them. This would require a > level of discipline unknown to the BSD net code. Hell, you might just > as well wish for locks on the data structures to make the code SMP safe :-) It's (definitely!) not BSD, but Solaris has some support for this. Their interfaces are done on the fly.. # ifconfig le1 ifconfig: SIOCGIFFLAGS: le1: no such interface # ifconfig le1 plumb # ifconfig le1 10.1.1.1 # ifconfig le1 le1: flags=842 mtu 1500 inet 10.1.1.1 netmask ff000000 broadcast 10.255.255.255 ether 8:0:20:1a:f5:1e # ifconfig le1 up # route add net 192.168.0.0 10.1.2.3 1 add net 192.168.0.0: gateway 10.1.2.3 # ifconfig le1 le1: flags=843 mtu 1500 inet 10.1.1.1 netmask ff000000 broadcast 10.255.255.255 ether 8:0:20:1a:f5:1e # netstat -rn|grep 192.168 192.168.0.0 10.1.2.3 UG 0 0 # ifconfig le1 down # netstat -rn|grep 192.168 192.168.0.0 10.1.2.3 UG 0 0 # ifconfig le1 unplumb # ifconfig le1 ifconfig: SIOCGIFFLAGS: le1: no such interface # netstat -rn|grep 192.168 192.168.0.0 10.1.2.3 UG 0 0 # Not ideal... but something. ... Joe ------------------------------------------------------------------------------- Joe Greco - Systems Administrator jgreco@ns.sol.net Solaria Public Access UNIX - Milwaukee, WI 414/342-4847