NPR Tutorial >> Filters, Queues and Bandwidth | TOC |
We've seen that the NPR keeps track of a large number of counts that allow you to monitor bandwidth and packet rates coming into and out of ports. The RLI makes these counters visible to the user through RLI menu items. For example, we have already used port menu items such as Monitoring => TXPKT to monitor the number of packets transmitted from a port. But the NPR can actually have up to 256K counters that can be updated as packets progress through the router.
This page describes the concept behind monitoring with stats counters and shows you how to monitor using counters that are accessed through stats indices. The sections in this page are:
There is a 1 MB region of SRAM that is used to store 4-byte counters for monitoring. These counters fall into two groups:
Some of these counters do not have a special menu item.
But you can still access these anonymous counters through the
Monitoring => ReadRegisterByte and
Monitoring => ReadRegisterPacket menu items in the
NPR icon menu.
For example, the number of packets dropped by the Queue Manager
is stored in register counter 31.
The remaining counters are stats counters that are accessed through stats indices. The NPR can potentially have up to 64K (65,536) indices. For example, in the route table (right), the stats column contains the stats indices 19-24 which can be used to access the counters. Each index value refers to a group of four 4-byte counters:
We will give a simple demonstration of how to use stats counters.
Suppose that we have the dumbbell network shown to the right.
We will send ping packets from n1p3 to n2p2 through the 1.4-2.1
link between NPR 1 (on the left) and NPR 2 (on the right).
The route tables at each port contain default route entries.
The route table directs packets from n1p3 to a datagram queue at
port 1.4.
We have also installed a filter (right) at port 1.3 that has a higher
priority (50) than the route table (60).
The filter will send any packets from n1p3 to queue 64 at port 1.4.
This filter has been assigned stats index 31.
We demonstrate how to use stats counters by monitoring the two packet counters indexed by stats indices 24 and 31 and turning the filter on and off. These two indices correspond to the 192.168.2.0/24 route entry and the filter respectively.
The following is a recipe for monitoring the two counters:
An Add Parameter dialogue box appears.
The chart will begin to display the absolute counter value as 0.
Repeat the above steps but use stats index 31 instead of 24. We changed the label to filter-31.
To get a display like the one shown to the right, we sent a continuous stream of ping packets by doing the following:
The route-24 line begins to march up by 1 every second because the route table entry is selected to forward the packet out of port 1.4.
The route-24 line will stop advancing up, and the filter-31 line will begin to march up by 1 every second because the filter is now being selected to forward the packet out of port 1.4 because it has a higher priority than the route table entry.
Revised: Tue, Aug 26, 2008
NPR Tutorial >> Filters, Queues and Bandwidth | TOC |