Displaying and maintaining ip accounting, Ip accounting configuration example, Network requirements – H3C Technologies H3C MSR 50 User Manual
Page 101

Step Command
Remarks
•
Enable IP accounting for
valid incoming IP packets
on the current interface:
ip count inbound-packets
•
Enable IP accounting for
valid outgoing IP packets
on the current interface:
ip count outbound-packets
Select at least one type of packet
accounting. Otherwise, IP
account does not count any
packet on the interface.
•
Enable IP accounting for
firewall-denied incoming
packets on the current
interface:
ip count firewall-denied
inbound-packets
219.
Configure the type of packet
accounting.
•
Enable IP accounting for
firewall-denied outgoing
packets on the current
interface:
ip count firewall-denied
outbound-packets
Displaying and maintaining IP accounting
Task Command
Remarks
display ip count rule [ | { begin | exclude |
include } regular-expression ]
Display IP accounting rules.
Available in any view.
display ip count { inbound-packets |
outbound-packets } { exterior |
firewall-denied | interior } [ | { begin |
exclude | include } regular-expression ]
Available in any view.
Display IP accounting statistics.
reset ip count { all | exterior | firewall |
interior }
Clear IP accounting statistics.
Available in user view.
After you create a new IP accounting rule, it is possible that some originally rule-incompliant packets from
a subnet comply with the new rule. Information about these packets is then saved in the interior table. The
exterior table, however, might still contain information about the IP packets from the same subnet.
Therefore, in some cases, the interior and exterior tables contain statistics about the IP packets from the
same subnet. The statistics in the exterior table will be removed when the timeout time expires.
IP accounting configuration example
Network requirements
As shown in
, enable IP accounting on Ethernet 1/1 of the router to count IP packets between
Host A to Host B. Set the timeout time for flow entries to 24 hours.
88