R2511-HP MSR Router Series Network Management and Monitoring Configuration Guide(V5)

84
Configuring IP accounting
IP accounting collects IP packet statistics on the device. It uses IP accounting rules to classify packets and
uses flow entries to store packet statistics in different tables.
Each IP accounting rule specifies a subnet to match packets sourced from and destined to the subnet.
Each flow entry records the source and destination IP addresses, protocol number, packet sum, and byte
sum for a flow. If a flow entry is not updated within the timeout time, IP accounting deletes it.
IP accounting stores different types of IP packet statistics in the following tables:
Firewall-denied table—Stores statistics for incoming and outgoing IP packets that are denied by the
firewall configured on an interface.
Interior table—Stores statistics for IP packets that pass an interface or the firewall on the interface
and match an IP accounting rule.
Exterior table—Stores statistics for IP packets that pass an interface or the firewall on the interface
but does not match any IP accounting rule.
Configuring IP accounting
Before performing this task, assign an IP address and mask to the interface on which you want to enable
IP accounting. If necessary, configure a firewall on the interface.
To configure IP accounting:
Ste
p
Command
Remarks
1. Enter system view.
system-view N/A
2. Enable IP accounting.
ip count enable
By default, this function is
disabled.
3. Configure the timeout time for flow
entries.
ip count timeout minutes
Optional.
The default setting is 720 minutes
(12 hours).
4. Configure the maximum number of
flow entries in the interior table.
ip count interior-threshold
number
Optional.
The default setting is 512.
5. Configure the maximum number of
flow entries in the exterior table.
ip count exterior-threshold
number
Optional.
The default setting is 0.
6. Configure an IP accounting rule.
ip count rule ip-address { mask
| mask-length }
Up to 32 rules can be
configured.
If no rule is configured, all packet
information is stored in the
exterior table.
7. Enter interface view.
interface interface-type
interface-number
N/A