Configure port traffic statistics, which is convenient for us to check the usage of port traffic, troubleshoot problems, and optimize management. The following is the port traffic
Statistics configuration method.
Proceed as follows:
a. First define acl to match the source and destination IP addresses of ping (x and y are the addresses you tested here):
The number of ACL can be defined at will, it must be more than 3000,
For the specific difference between basic ACL and advanced ACL, please Baidu by yourself, so I won’t say more here.
#
acl number 3333
rule 5 permit icmp source x.x.x.x 0 destination y.y.y.y 0
rule 10 permit icmp source y.y.y.y 0 destination x.x.x.x 0
b. Redefine traffic classification and traffic behavior
There is no special requirement for the number of flow control. I write the same number as ACL here, purely for convenience.
#
traffic classifier 3333
if-match acl 3333
#
traffic behavior 3333
statistic enable
#
traffic policy 3333
classifier 3333 behavior 3333
c. Then apply the traffic policy on the port, inbound direction and outbound direction, and make statistics.
Both directions must be configured
#
interface GigabitEthernet 5/0/34
traffic-policy 3333 inbound
traffic-policy 3333 outbound
d. Perform ping operations to view traffic statistics .
#
display traffic policy statistics interface GigabitEthernet5/0/34 inbound verbose rule
display traffic policy statistics interface GigabitEthernet5/0/34 outbound verbose rule