Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Jun 2005 10:24:18 -0700
From:      Julian Elischer <julian@elischer.org>
To:        Ragnar Lonn <raglon@packetfront.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: IPC between vimage instances?
Message-ID:  <42ADC142.9020102@elischer.org>
In-Reply-To: <42AD7212.3090104@packetfront.com>
References:  <200505192159.j4JLxNhb060631@atalus.net>	<428DF2FF.3010408@oxygen.az> <42A961CA.5030706@packetfront.com> <42A9D7E7.1020504@elischer.org> <42AD7212.3090104@packetfront.com>

next in thread | previous in thread | raw e-mail | index | archive | help


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
>
>
>
>
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42ADC142.9020102>