[6bone] IPv6 traffic accounting

Pim van Pelt pim@ipng.nl
Mon, 28 Apr 2003 16:44:34 +0200


On Mon, Apr 28, 2003 at 03:52:23PM +0200, Andree Toonk wrote:
| Hello everyone,
| 
| I would like to measure how much IPv6 traffic is passing a (Cisco) router.
| does anyone know if this is possible with a recent IOS?
| Would it be possible to do this with SNMP?
I do not know if works and if so, how to do it on IOS. I'm very
interrested in it nonetheless!

| The same question for juniper, can I do IPv6 traffic accounting on a juniper?
Well on a Juniper you can count all traffic that is blocked (or passed)
through a filter. In the 'then' clause of your statement, you can count
traffic by stating 'set then count mycounter'. You can then view
packet/octetcount simply by issuing a 'show firewall filter myfilter'. 
For example, in my case a filter 'f-re6' protects my routing engine. It
has:

term icmp6 {
  from {
    next-header [ icmp icmpv6 ];
  }
  then {
    count icmp-acceptcount;
    accept;
  }
}
term else {
  then {
    count re6-dropcount;
    log;
    reject tcp-reset;
  }
}

pim@jun1.kelvin# run show firewall filter f-re6 
Filter: f-re6                                                  
Counters:
Name                                                Bytes Packets
icmp-acceptcount                                     3840      56
re6-dropcount                                         640       8

On JunOS, you cannot see what traffic _types_ pass through an interface.
Typing something like "show interfaces ge-0/1/0.23 extensive" does give
you stats (packets and octets as well as 5 minute averages), but this is
a layer2 mechanism so it cannot offer you information on IPv4/IPv6. The
only way I can think of is via filters (which may of course simply be of
the form "from any to any then accept count mycounter", which is readable
via SNMP. MIBs for JunOS filters are available. Note that SNMP and CLI
polling of the filter counters is not realtime. The IP2 periodically (I
do not know when, but every couple of seconds or so) sends the
information to the RE, I think. 

-- 
---------- - -    - - -+- - -    - - ----------
Pim van Pelt                 Email: pim@ipng.nl
http://www.ipng.nl/             IPv6 Deployment
-----------------------------------------------