Saturday, September 14, 2013

Mininet XTerm, TCP dump and iperf

Verify Hub Behavior with tcpdump

To verify that hosts can ping each other, and that all hosts see the exact same traffic - the behavior of a hub. To do this, we'll create xterms for each host, and view the traffic in each. In the Mininet console, start up three xterms:

mininet> xterm h2 h3 h4

In the xterms for h3 and h4, run tcpdump, a utility to print the packets seen by a host:

$ sudo tcpdump -XX -n -i h3-eth0

and respectively:

$ sudo tcpdump -XX -n -i h4-eth0

In the xterm for h2, send a ping:

$ ping -c1 10.0.0.3

The ping packets are now going up to the controller, which then floods them out all interfaces except the sending one. You should see identical ARP and ICMP packets corresponding to the ping in both xterms running tcpdump.

Now, see what happens when a non-existent host doesn't reply. From h2 xterm:

$ ping -c1 10.0.0.5

You should see three unanswered ARP requests in the tcpdump xterms. If your code is off later, three unanswered ARP requests is a signal that you might be accidentally dropping packets.

You can close the xterms now.

Benchmark Hub Controller with iperf

Here, you'll benchmark the provided hub.

First, verify reachability. Mininet should be running, along with the POX in a second window. In the Mininet console, run:

mininet> pingall

This is just a sanity check for connectivity. Now, in the Mininet console, run:

mininet> iperf

No comments:

Post a Comment