The ONL NPR Tutorial

NPR Tutorial >> Examples TOC

New Window?

Using An Auxilliary Filter

Introduction

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:

Note that we sample probabilistically (25%), not deterministically, and therefore, if 100 packets match the auxilliary filter, there may not be exactly 25 packets selected. But as more and more packets are matched, the sample size should approach the 25% mark.


Steps (Index):

  1. Set up the network configuration.
  2. Create the auxilliary filter.
  3. Install a plugin to monitor our sampled packets.
  4. Set up monitoring of the plugin.
  5. Send packets through the filter.
  6. Change the sampling rate.

Steps (In Detail):

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.

[[ Dumbell configuration ]]

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.

When you are done, your Add Filter window should look like the one below:
[[ Aux Filter ]]

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.

[[ Packet Counts Monitoring ]]

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.

[[ Packet Counts Monitoring ]]
Next we will test the passing of UDP and TCP traffic to the plugin using iperf.

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.


Test Your Understanding

Multiple Flows Through the Filter

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?

Using Other Plugins

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