778
C
58: IP A
HAPTER
CCOUNTING
ip count outbound-packets
Syntax
View
Parameter
Description
Example
ip count rule
Syntax
View
Parameter
Description
C
C
ONFIGURATION
OMMANDS
ip count outbound-packets
undo ip count outbound-packets
Interface view
None
Use the
ip count outbound-packets
on the current interface.
Use the
undo ip count outbound-packets
By default, outgoing IP packets on the interface are not counted.
You can execute this command in interface view to count outgoing IP packets,
which will be stored in the exterior table or interior table, depending on whether
they match the accounting rules.
# Count outgoing IP packets on Ethernet1/0.
<Sysname> system-view
[Sysname] interface ethernet 1/0
[Sysname-Ethernet1/0] ip count outbound-packets
ip count rule ip-address { mask | mask-length }
undo ip count rule {ip-address { mask | mask-length } ]
System view
ip-address: IP address.
mask: Subnet mask.
mask-length: Length of a subnet mask, in the range of 0 to 32.
Use the
ip count rule
Use the
undo ip count rule
All IP accounting rules will be deleted if no parameter is specified.
Each IP accounting rule consists of an IP address and its mask, namely, a network
address, which is the result of ANDing the IP address with its mask. IP packets are
sorted as follows:
command to count outgoing IP packets
command to create an IP accounting rule.
command to remove the specified accounting rule.
command to restore the default.