NPR Tutorial >> Examples | TOC |
We demonstrate how an auxilliary filter in combination with the nstat plugin can be used for gathering statistics on flow types in a probabilistic manner. Recall that an auxilliary filter can make a copy of a matching packet allowing the original packet to proceed in the normal manner while the copy can be processed by a plugin or directed towards a monitoring host. In this example, we use an auxilliary filter to:
Step 1: Set up the network configuration.
Create the standard dumbell configuration shown below which we already created in the earlier example NPR Tutorial => Examples => The Remote Laboratory Interface.
Step 2: Create the auxilliary filter.
In this step, we install an auxilliary filter that will be used to select a sampling of packets for our plugin to process.
Step 3: Install a plugin to monitor our sampled packets.
Next, we will install the nstats plugin at NPR 1 to count packets forwarded to it by the auxilliary filter we just installed.
Step 4: Set up monitoring of the plugin.
In this step, we add a monitoring display to track the packets detected by the nstats plugin.
Step 5: Send packets through the filter.
In this step, we will send ping and iperf traffic through the network and confirm that the filter forwards copies of about 25% of the packets to our nstats plugin. Begin by opening two shell windows.
remote> ssh onl.arl.wustl.edu onlusr> source ~onl/.topology onlusr> ssh $n1p3 $n1p3>
$n1p3> ping -c 40 n2p2
You should observe that all of these ping packets get through (ie drop rate is 0%), but you should also observe your Monitoring Counts monitoring display showing an increase in the Counter 0.0 (ICMP) line. Since this line is an absolute value, you should see it increasing from time to time (ie each time the aux filter makes a copy of a packet and sends it to the plugin). After the ping command is done running, you should see the line level out at a value that is approximately 25% of 40. In the case of the run of this example shown below, the graph leveled out at 11 packets.
remote> ssh onl.arl.wustl.edu onlusr> source ~onl/.topology onlusr> ssh $n2p2 $n2p2>
$n2p2> iperf -s -u
We are setting up the iperf receiver to receive iperf traffic at the receiving host.
$n1p3> iperf -c n2p2 -u -b 1m -t 5.88
([ 3] 0.0- 5.9 sec 719 KBytes 1.00 Mbits/sec 0.001 ms 0/ 500 (0%))
Step 6: Change the sampling rate.
In this step, we change the sampling percentage of our auxilliary filter and see how this affects our output.
You should observe that about half of the packets sent in each case are sent to and counted by the plugins.
What happens if we send multiple flows of packets through the auxilliary filter? Try using an auxilliary filter with a sampling rate of 25%. Send 40 ping packets from n1p3 to n2p2, and at approximately the same time, send 40 ping packets from n1p2 to n2p3. How many packets do you see counted by the ICMP counter of the nstats plugin? Is this what you expect?
What happens if we use other plugins instead of nstats? Try repeating all the steps of the original experiment, but with the following changes:
Besides the fact that all packets are counted together by the count plugin, what do you notice that is different from when the nstats plugin was used (looking particularly at the results printed in your shell windows)? If you consider the fact that the nstats plugin drops the packets it receives whereas the count plugin forwards them on to their destination, does this difference make sense? Why would we prefer to use the nstats plugin instead of the count plugin in an experiment like this?
Revised: Thu, Sep 18, 2008
NPR Tutorial >> Examples | TOC |