41
[RouterA-GigabitEthernet1/0/1] qos car inbound acl 2002 cir 8 cbs 1875 ebs 0 green
pass red discard
[RouterA-GigabitEthernet1/0/1] quit
2.
Configure Router B:
# Configure a CAR policy on GigabitEthernet 1/0/1 to limit the incoming traffic rate to 500 kbps
and drop the excess packets.
<RouterB> system-view
[RouterB] interface gigabitethernet 1/0/1
[RouterB-GigabitEthernet1/0/1] qos car inbound any cir 500 cbs 32000 ebs 0 green pass
red discard
[RouterB-GigabitEthernet1/0/1] quit
# Configure a CAR policy on GigabitEthernet 1/0/2 to limit the sending rate to 1 Mbps and drop
the excess packets.
[RouterB] interface gigabitethernet 1/0/2
[RouterB-GigabitEthernet1/0/2] qos car outbound any cir 1000 cbs 65000 ebs 0 green
pass red discard
IP rate limiting configuration example
Network requirements
As shown in
, limit the rate of packets entering GigabitEthernet 1/0/2 of the Router as
follows: perform per-IP-address rate limiting for traffic sourced from Host A through Host Z, which are
on the network segment 2.1.1.1 through 2.1.1.100, with the per-IP-address rate limit being 500 bps,
and make traffic from all IP addresses on the network segment share the remaining bandwidth.
Figure 14 Network diagram
Configuration procedure
# Configure per-IP-address rate limiting on GigabitEthernet 1/0/2 to limit the rate of each PC on the
network segment 2.1.1.1 through 2.1.1.100, and make traffic from all IP addresses in the network
segment share the remaining bandwidth.
<Router> system-view
[Router] qos carl 1 source-ip-address range 2.1.1.1 to 2.1.1.100 per-address
shared-bandwidth
[Router] interface gigabitethernet 1/0/2
[Router-GigabitEthernet1/0/2] qos car inbound carl 1 cir 500 cbs 1875 ebs 0 green pass
red discard
[Router-GigabitEthernet1/0/2] quit