Configuring ip accounting – H3C Technologies H3C MSR 50 User Manual

Page 100

Advertising
background image

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:

Step Command

Remarks

212.

Enter system view.

system-view

N/A

By default, this function is
disabled.

213.

Enable IP accounting.

ip count enable

Optional.

214.

Configure the timeout time for flow
entries.

ip count timeout minutes

The default setting is 720 minutes

(12 hours).

Optional.

215.

Configure the maximum number of
flow entries in the interior table.

ip count interior-threshold
number

The default setting is 512.

Optional.

216.

Configure the maximum number of
flow entries in the exterior table.

ip count exterior-threshold
number

The default setting is 0.

Up to 32 rules can be
configured.

ip count rule ip-address { mask
| mask-length }

217.

Configure an IP accounting rule.

If no rule is configured, all packet
information is stored in the

exterior table.

interface interface-type
interface-number

218.

Enter interface view.

N/A

87

Advertising