The IP address of a CEN user is 10.0.0.2/24 and is connected to the Internet through a Switch. Switch is the carrier device. Enterprise Network users only rent 1 Mbps upstream bandwidth and 2 Mbps downstream bandwidth.
Figure 1 General CAR configuration networking
Configuration ideas
Traffic Monitoring is implemented through QoS command lines. In this case, the user uses a fixed IP address, so the user traffic can be matched by matching the user IP address, and the traffic is monitored.
Procedure
# Configure the ACL rule to match the traffic with the source IP address 10.0.0.2
<H3C> system-view
[H3C] acl number 3001
[H3C-acl-adv-3001] rule permit ip source 10.0.0.2 0
[H3C-acl-adv-3001] quit
# Configure an ACL rule to match traffic destined for 10.0.0.2
[H3C] acl number 3002
[H3C-acl-adv-3002] rule permit ip destination 10.0.0.2 0
[H3C-acl-adv-3002] quit
# Configure the stream classification and match the ACL Rule 3001, that is, match the traffic with the source IP address 10.0.0.2.
[H3C] traffic classifier source_hostA
[H3C-classifier-source_hostA] if-match acl 3001
[H3C-classifier-source_hostA] quit
# Configure the stream classification and match the ACL Rule 3002, that is, match the traffic with the destination IP address 10.0.0.2.
[H3C] traffic classifier destination_hostA
[H3C-classifier-destination_hostA] if-match acl 3002
[H3C-classifier-destination_hostA] quit
# The configuration is popular. It is used to monitor upstream traffic at a rate of 1000 kbps.
[H3C] traffic behavior uplink
[H3C-behavior-uplink] car cir 1000
[H3C-behavior-uplink] quit
# Popular configuration: used to monitor downstream traffic with a rate of 2000 kbps
[H3C] traffic behavior downlink
[H3C-behavior-downlink] car cir 2000
[H3C-behavior-downlink] quit
# Configure the QoS policy for inbound port, that is, the user's upstream direction.
[H3C] qos policy uplink
[H3C-qospolicy-uplink] classifier source_hostA behavior uplink
[H3C-qospolicy-uplink] quit
# Configure the QoS policy for the outbound port, that is, the user's downstream direction.
[H3C] qos policy downlink
[H3C-qospolicy-downlink] classifier destination_hostA behavior downlink
[H3C-qospolicy-downlink] quit
# Configure QoS policies to match inbound and outbound traffic.
[H3C] interface GigabitEthernet 3/0/1
[H3C-GigabitEthernet3/0/1] qos apply policy uplink inbound
[H3C-GigabitEthernet3/0/1] qos apply policy downlink outbound
This article is from "Computer Tips"