# Setting a Statistics Baseline for Policies

#### Purpose

You can set a baseline for policy statistics by using the baseline interface command and the atm policy, frame-relay policy, gre-tunnel policy, ip policy, ipv6 policy, l2tp policy, mpls policy, and vlan policy commands. If you do not enable baselining, show command output fields for baseline counters display the contents of the regular statistics counters.

If you enable statistics, you can enable or disable baselining of the statistics. The router implements the baseline by reading and storing the statistics at the time the baseline is set and then subtracting this baseline when baseline-relative statistics are retrieved. Unlike other baseline statistics, policy baseline statistics are not stored in nonvolatile storage (NVS).

If you issue the baseline interface command for an interface without first enabling policy statistics baselining on that interface, a warning message indicates that policy baseline statistics are not enabled.

Enable a baseline for the statistics for the attachment of a policy list with statistics enabled to the ingress of an interface.

#### Action

Enable baseline counters.

host1(config)#interface atm 12/0.1 host1(config-subif)#ip policy input routeForXYZCorp statistics enabled baseline enabled

Run the show ip interface command with the delta keyword to show baseline counters:

    host1#show ip interface atm 12/0.1 delta
    atm12/0.1 is up, line protocol is up
      Network Protocols: IP
      Internet address is 200.200.1.1/255.255.255.0
      Broadcast address is 255.255.255.255
      Operational MTU = 9180  Administrative MTU = 0
      Operational speed = 155520000  Administrative speed = 0
      Discontinuity Time = 1251181
      Router advertisement = disabled
      Administrative debounce-time = disabled
      Operational debounce-time    = disabled
      Access routing = disabled
      Multipath mode = hashed

      In Received Packets 5, Bytes 540
      In Policed Packets 0, Bytes 0
      In Error Packets 0
      In Invalid Source Address Packets 0
      In Discarded Packets 0
      Out Forwarded Packets 5, Bytes 540
      Out Scheduler Drops Packets 0, Bytes 0
      Out Policed Packets 5, Bytes 540
      Out Discarded Packets 0

      IP Policy input routeForXYZCorp
        classifier-group *
           filter
           5 Packets  540 Bytes dropped

#### Related Documentation

- atm policy
- frame-relay policy
- gre-tunnel policy
- ip policy
- ipv6 policy
- l2tp policy
- mpls policy
- vlan policy