This has been a bit confusing for some time, but after you run your ipmininet network with Python, you want to capture some packets with wireshark/tshark or tcpdump, here is the way you can do it:
Let’s assume we have a host named h1, now at the prompt of mininet:
mininet> h1 screen -S tcpdump
This will take you to a screen terminal where you can run tshark or tcpdump inside it, then Press Ctrl+A then D to detach from out.
After that do whatever command you want, e.g. h1 wants to ping h2
mininet> h1 ping h2
After you are done and you want to collect the results, just run:
mininet> h1 screen -r
you will find the results captured by tcpdump there, which you can copy or screenshot or whatever you want. Finally type exit to destroy the screen session.
Enjoy!
Note: I was using the vagrant installation method of ipmininet.
Thanks Jeril for the tip 😉