0

I'm trying to work out how to gather counters on how many times routes are hit in the route table without using something resource intensive like NetFlow and having to match flow data against the route table.

Any ideas, are there native counters?

Alex Turner
  • 115
  • 6

1 Answers1

0

If your route table is static you can use iptables rules with an empty target, where you have a corresponding rule for each destination on your route table. The pkts / bytes column in 'iptables -L -v' output will tell you about the volume.

Sample output (by executing iptables -A INPUT --dest 192.168.1.0/24):

Chain INPUT (policy ACCEPT 1911 packets, 171K bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0            all  --  *      *       0.0.0.0/0            192.168.1.0/24
Jason Martin
  • 5,023
  • 17
  • 24