p4lang/behavioral-model

How to run larger experiments with Mininet-BMV2 and V1model?

whyLongWay opened this issue · 4 comments

In P4 tutorials, we use "make run" to start mininet and P4 switch, and then use "xterm h1 h2 ....hx" to start hosts and then type "send.py" or "receive.py" in EACH xterm, obviously it is not convenient to do a larger experiment.

So, if I need a larger topology (with nearly 10-20 p4 switches), I can write "topology.json", but I also need 20-40 hosts, each host will send 5-10MBs. How can I start these hosts and run python codes on them in a fast and convenient way (rather than type commands like "xterm h1 h2..." and type commands in each xterm window by hand)?

Is there any examples or websites for related questions?

And then, how can we record time performance or other performance in Mininet with BMV2?

Thank you.

I suspect that the answers to your question might be possible to find by asking a person who is more of an expert in using mininet than you are likely to quickly find by posting issues here, on the behavioral-model repository, which is focused on a single BMv2 software switch.

There are sources of information and email lists given on the mininet home page that might be more likely to find mininet experts at, especially the mininet-discuss email list mentioned in the "Support" section: http://mininet.org/

@jafingerhut Thanks for your guide.

Mininet is fairly flexible and extensible. I would explore the examples here:
https://github.com/mininet/mininet/tree/master/examples

I have also written some scripted automation code for Mininet once, maybe this can be helpful for you:
https://github.com/fruffy/bluebridge/blob/master/ip6/run_emulation.py
You can configure when you actually open a terminal like this:
https://github.com/fruffy/bluebridge/blob/master/ip6/run_emulation.py#L198

Also take a look at the mnexec command, I would largely use that:
https://manpages.ubuntu.com/manpages/trusty/man1/mnexec.1.html

@fruffy Thanks for your guide, I will try to learn it.