From owner-freebsd-net@FreeBSD.ORG Mon Jun 13 17:24:19 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 04FB716A41C for ; Mon, 13 Jun 2005 17:24:19 +0000 (GMT) (envelope-from julian@elischer.org) Received: from bigwoop.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id B95DF43D49 for ; Mon, 13 Jun 2005 17:24:18 +0000 (GMT) (envelope-from julian@elischer.org) Received: from [208.206.78.97] (julian.vicor-nb.com [208.206.78.97]) by bigwoop.vicor-nb.com (Postfix) with ESMTP id 357CF7A403; Mon, 13 Jun 2005 10:24:18 -0700 (PDT) Message-ID: <42ADC142.9020102@elischer.org> Date: Mon, 13 Jun 2005 10:24:18 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.7) Gecko/20050423 X-Accept-Language: en, hu MIME-Version: 1.0 To: Ragnar Lonn References: <200505192159.j4JLxNhb060631@atalus.net> <428DF2FF.3010408@oxygen.az> <42A961CA.5030706@packetfront.com> <42A9D7E7.1020504@elischer.org> <42AD7212.3090104@packetfront.com> In-Reply-To: <42AD7212.3090104@packetfront.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: IPC between vimage instances? 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: Mon, 13 Jun 2005 17:24:19 -0000 Ragnar Lonn wrote: > > >> As you mention, the usual answer is to get the syslog on each system to >> forward everything to one logging system. >> >> you could add a second interface to each vimage just for logging to >> keep it separate from the testing.. > > > > Hmm, I have avoided this because I didn't want to do a lot of interface > housekeeping. Actually, this leads to another question of mine :-) > > Network interfaces can't be removed under FreeBSD, something that > causes me a lot of trouble as I create many interfaces and move them > to many > vimages. Then I remove vimages in order to create new ones > (reconfigure the > client simulation setup) and the network interfaces get dumped into > the default > vimage, from where I have to collect them. I cant just create new > interfaces > when the setup is to be reconfigured because I can't delete the old > interfaces. interface removal in 4.x was nt quite "finished" there are several viewpoints from which th einterface is not quite removed. (as you have found) I can not remember the details as It all changed in 5.x (though vimage doesn't work in 5.x ) > > Or can I? > > Example: > > ngctl mkpeer . eiface hook ether > > ...results in ngeth0@deafult being created. Then I do: > > ngctl shutdown ngeth0: > > ..and the interface is gone. Seems that doing a shutdown actually > causes the > interface to get removed, right? But then I do something like this: > > # create ngeth0@default > ngctl mkpeer . eiface hook ether > # create ngeth1@default > ngctl mkpeer . eiface hook ether > # move ngeth1 > vimage -i myvimage ngeth1 > > ....the interface is moved to ngeth0@myvimage. Then I do: > > ngctl shutdown ngeth0: > vimage myvimage > vimage -i - ngeth0 > > ...and the interface is moved back to the deafult vimage, BUT it is > named ngeth1@default. Even though ngeth0@default has been shutdown > and is nowhere to be seen. This makes me suspect that interfaces aren't > properly removed when I issue a shutdown even though they might seem to > be gone, and I have therefore decided to reuse interfaces, rather than > remove them. it's possible that the unit number is stored in the ng_ether driver and is therefore not split for the vimages. so if the code gets a new unit number for the new instance before removing the old instance, the unit number will be 1 and not 0.. just a quess. > > Is this assumption correct? Or is it just a naming issue that won't > result > in some resource exhaustion eventually if I continue creating, moving > and removing interfaces? > > Being able to remove interfaces would be really great. Then I could > create extra logging interfaces in each vimage and not worry about > the cleanup nightmare afterwards. Right now, I have a lot of script > code just to find and reuse old ngeth interfaces sitting around in the > default vimage and if I'm to have two types of those interfaces > (one for logging, that has one underlying netgraph tree structure, and > one for test traffic, using another netgraph tree structure) it would > likely be at least twice as much trouble. That's why I was looking for > some other way of communicating between different vimages. "use the source Luke" I know it seems like a lot but the netgraph code and the networking interface code are relatively simple.. > > Regards, > > /Ragnar > > > > > >