Example for Configuring Bandwidth Management
Networking Requirements
As shown in Figure 10-2, RouterA is used to connect departments on the enterprise network, and the enterprise network connects to the WAN through GE3/0/0 of RouterA. Bandwidth management needs to be configured correctly to meet the following requirements:
- The downlink rate of packets between R&D departments and the Internet cannot exceed 256 kbit/s during the working time (8:00 a.m. to 17:30 p.m. from Monday to Friday).
- Packets from the president office are sent preferentially, and the minimum bandwidth of packets from the president office is 2048 kbit/s when congestion occurs.
Configuration Roadmap
- Create VLANs and VLANIF interfaces on RouterA and configure interfaces to enable enterprise users to access the WAN through RouterA.
- Configure a time range.
- Set different bandwidths for departments on GE3/0/0 of RouterA.
Procedure
- Create VLANs and VLANIF interfaces, and configure interfaces.
# Create VLAN 10 and VLAN 20 on RouterA.
<Huawei> system-view [Huawei] sysname RouterA [RouterA] vlan batch 10 20
# Configure Eth2/0/0 and Eth2/0/1 on RouterA as access interfaces, and add 2/0/0 and Eth2/0/1 to VLAN 10 and VLAN 20 respectively.
[RouterA] interface ethernet 2/0/0 [RouterA-Ethernet2/0/0] port link-type access [RouterA-Ethernet2/0/0] port default vlan 10 [RouterA-Ethernet2/0/0] quit [RouterA] interface ethernet 2/0/1 [RouterA-Ethernet2/0/1] port link-type access [RouterA-Ethernet2/0/1] port default vlan 20 [RouterA-Ethernet2/0/1] quit
# Create VLANIF 10 and VLANIF 20, configure IP addresses of 10.10.1.1/24 and 10.10.2.1/24 for VLANIF 10 and VLANIF 20 respectively.
[RouterA] interface vlanif 10 [RouterA-Vlanif10] ip address 10.10.1.1 24 [RouterA-Vlanif10] quit [RouterA] interface vlanif 20 [RouterA-Vlanif20] ip address 10.10.2.1 24 [RouterA-Vlanif20] quit
# Configure the IP address of 1.1.1.1/24 for GE3/0/0 on RouterA.
[RouterA] interface gigabitethernet 3/0/0 [RouterA-GigabitEthernet3/0/0] ip address 1.1.1.1 24 [RouterA-GigabitEthernet3/0/0] quit
# Configure RouterB to ensure reachable routes between RouterB and RouterA. The configuration is not provided here.
- Configure a time range.
# Configure the time range from 8:00 to 17:30.
[RouterA] time-range worktime 8:00 to 17:30 working-day
- Set different bandwidths for departments on GE3/0/0 of RouterA.
# On GE3/0/0 of RouterA, set the downlink rate limit for packets of R&D departments to 256 kbit/s during the working time.
[RouterA] web [RouterA-web] user-set vd [RouterA-web-user-set-vd] user-ip from 10.10.1.2 to 10.10.1.254 [RouterA-web-user-set-vd] quit [RouterA-web] bandlimit interface gigabitethernet 3/0/0 type user-set vd inbound cir 256 time-range worktime [RouterA-web] quit
# On GE3/0/0 of RouterA, set the minimum bandwidth of packets from the president office to 2048 kbit/s.
[RouterA] web [RouterA-web] bandguarantee interface gigabitethernet 3/0/0 type ip 10.10.2.4 cir 2048 [RouterA-web] quit
- Verify the configuration.
# Check the bandwidth management configuration on RouterA.
<RouterA> display current-configuration # acl name Acl10.10.2.40007 3999 rule 5 permit ip source 10.10.2.4 0 # traffic classifier Class-10.10.2.4-0007 operator or if-match acl Acl10.10.2.40007 # traffic behavior Behavior-10.10.2.4-0007 queue af bandwidth 2048 statistic enable # traffic policy GigabitEthernet3/0/0 classifier Class-10.10.2.4-007 behavior Behavior-10.10.2.4-0007 precedence 5 # interface GigabitEthernet3/0/0 qos car inbound destination-ip-address range 10.10.1.2 to 10.10.1.254 cir 256 c bs 48128 pbs 80128 green pass yellow pass red discard traffic-policy GigabitEthernet3/0/0 outbound # return
Configuration Files
- Configuration file of RouterA
# sysname RouterA # time-range worktime 08:00 to 17:30 working-day # vlan batch 10 20 # acl name Acl10.10.2.40007 3999 rule 5 permit ip source 10.10.2.4 0 # web user-set vd user-ip from 10.10.1.2 to 10.10.1.254 bandlimit interface GigabitEthernet3/0/0 type user-set vd inbound cir 256 time- range worktime bandguarantee interface GigabitEthernet3/0/0 type ip 10.10.2.4 cir 2048 # traffic classifier Class-10.10.2.4-0007 operator or if-match acl Acl10.10.2.40007 # traffic behavior Behavior-10.10.2.4-0007 queue af bandwidth 2048 statistic enable # traffic policy GigabitEthernet3/0/0 classifier Class-10.10.2.4-0007 behavior Behavior-10.10.2.4-0007 precedence 5 # interface Vlanif10 ip address 10.10.1.1 255.255.255.0 # interface Vlanif20 ip address 10.10.2.1 255.255.255.0 # interface Ethernet0/0/1 port link-type access port default vlan 10 # interface Ethernet0/0/2 port link-type access port default vlan 20 # interface GigabitEthernet3/0/0 ip address 1.1.1.1 255.255.255.0 qos car inbound destination-ip-address range 10.10.1.2 to 10.10.1.254 cir 256 c bs 48128 pbs 80128 green pass yellow pass red discard traffic-policy GigabitEthernet3/0/0 outbound # return