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

85
Ste
p
Command
Remarks
8. Configure the type of packet
accounting.
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
Enable IP accounting for
firewall-denied incoming
packets on the current
interface:
ip count firewall-denied
inbound-packets
Enable IP accounting for
firewall-denied outgoing
packets on the current
interface:
ip count firewall-denied
outbound-packets
Select at least one type of packet
accounting. Otherwise, IP
account does not count any
packet on the interface.
Displaying and maintaining IP accounting
Task Command
Remarks
Display IP accounting rules.
display ip count rule [ | { begin | exclude |
include } regular-expression ]
Available in any view.
Display IP accounting statistics.
display ip count { inbound-packets |
outbound-packets } { exterior |
firewall-denied | interior } [ | { begin |
exclude | include } regular-expression ]
Available in any view.
Clear IP accounting statistics.
reset ip count { all | exterior | firewall |
interior }
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 Figure 30, 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.