Blaisorblade wrote:
> On Tuesday 20 February 2007 17:37, Jeff Dike wrote:
>> On Tue, Feb 20, 2007 at 04:57:40PM +0100, Jeroen van der Ham wrote:
>>> Is it possible to add an option to uml_switch so that it is completely
>>> silent?
>> It would be a matter of putting all the printf's under the control of
>> such a switch - not a big deal.
>>
>>> I'm using UML as an educational tool to let students explore computer
>>> networks. However, if we create a network that contains a loop then
>>> uml_switch will start spamming all kinds of messages.
> It's not spam. Ignoring them was bad...

I completely agree. But I *know* I'm doing a bad thing, but I still want
to do it, what's more: I want to do it using a script. This means that
currently I have to jump through all kinds of hoops, just to keep
uml_switch's output buffer empty, so that it keeps on running.

>>> Even if the uml_switch is started in daemon mode, and redirecting
>>> everything to /dev/null, then this still seems to be a big load for the
>>> terminal where it was started.
> 
> What you mean by "there seems to be a big load for the terminal"? Describe 
> symptoms. I fear that you are seeing just CPU load.

After looking into this some more, it's not a big load on the terminal.
There is no CPU load either, because other terminals work fine.
The symptoms that I have is that the terminal I started the uml_switches
on (in daemon mode) will intermittently miss keystrokes. So you type
"screen" but you get "seen".

> And since uml_switch does 
> not implement (unless I'm overlooking something) the bridge* spanning tree 
> protocol, I guess you are actually seeing packets looping through uml_switch. 
> So this is useful to show why STP is needed.

Yes, STP would certainly be useful here. However, the whole point of the
exercise is to show the students what happens when you *don't* have STP :)


> 
> And I can guess messages are continous "Addr: X New port Y", "Addr: X New 
> port 
> Z", with the ports ever changing, right? Imagine a packet starting from a 
> computer, being flooded through the network by an uml_switch and reentering 
> this uml_switch after looping - uml_switch will not recognize the 
> duplication.

Yes, but it's also spamming with messages that it cannot write to fd 4.

> However, if you look on the archives, you'll see that there are at least 3 
> reimplementations of uml_switch by different authors (the one in UML is the 
> simplest one I think). They may have better behaviour when having a loop in 
> the network.

I will look into that. But as I said, the whole point is to allow loops
in the network and see what happens. It's a bit of a weird use-case, but
for education on networking this is highly useful.

Jeroen.



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to