Hello people here, I have joined the list only to ask this question, please
bear with me. :) I made myself sure to read JD's book but can't find any
deeper technical advice regarding this question there.

Short version: How do you simulate a network failure in UML?

Long version: I'm a CS teacher trying to setup a very simple Netkit lab to
show off Ethernet bonding in action. As you certainly know, Netkit is based
on UML.

I can't seem to figure out how to properly go about failure injection in an
active-backup (mode 1) bond interface. More generally, what's the proper
way to simulate a link drop in UML (so as to - for instance - cause a bond
failover)?

My virtual lab is built with three UML nodes, called A, B and S. S has four
Ethernet interfaces enslaved into a bridge (to simulate a switch). Node A
has two NICs, Node B has only one. B is there only to ping node A. A's eth0
and eth1 are linked by separate collision domains (default for Netkit) to
eth0 and eth1 of the virtual switch. B goes to another switch interface.
Both A's eth0 and eth1 are bonded into bond0, and eth0 is normally the
active one. Ping works.

If the link between A and S fails, I should see the backup link take over.
I assume I could take down the S's NIC, A's NIC, or the link proper.
However, no "ifconfig down" command does the job, nor do I know how to take
down the virtual link. As a teacher showing off HA, I'd prefer some sort of
external, asynchronic, mysterious event to come into scene by will of Fate,
but I'll be glad if I can just go and pull out the fine cable and see the
primary and secondary swap roles.

Now, bonding can do fault detect using ARP broadcasts or MII
signaling. When using MII my bonds do always believe all is OK, no matter
what. I have to keep using failure detection by ARP instead of MII because
of this.

To break the virtual link I resorted to kill -STOP the uml_switch process
who implements the link. That triggers the bond failover by absence of ARP
responses, but then the bond flaps its active between eth0 vs eth1
eternally as if MII keeps contradicting ARP's information. Other signals
behave alike, but STOP/CONT can (sometimes) bring the link back as if the
failure has been corrected, which holds a value for my lesson.

So, in this synthetic setup, what should I do to simulate a network
failure? Can I make MII detection to work? What mistake am I making?

Thank you very much in advance!

-- 
Eduardo Grosclaude
Universidad Nacional del Comahue
Neuquen, Argentina
------------------------------------------------------------------------------
_______________________________________________
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