Saturday, June 6, 2015

Huawei - Router: Traffic Shapping

How to Configure Traffic Shaping for Huawei AR Routers?

Applicability

This example applies to all versions and Huawei AR routers.

 

Networking Requirements

As shown in the below figure, the LAN of an enterprise connects to Eth2/0/0 of RouterA through Switch. RouterA connects to the WAN through GE3/0/0. The voice, video, and data services are deployed on the LAN.

Packets of different services are identified by 802.1p priorities on the LAN. RouterA sends service packets to queues based on 802.1p priorities. When packets reach the WAN through GE3/0/0, jitter may occur. To prevent jitter and ensure bandwidth for services, perform the following configuration:

  • Set the CIR on each interface to 8000 kbit/s.
  • Set the CIR for voice service packets to 256 kbit/s and the CBS to 6400 bytes.
  • Set the CIR for video service packets to 4000 kbit/s and the CBS to 100000 bytes.
  • Set the CIR for data service packets to 2000 kbit/s and the CBS to 50000 bytes.


clip_image001

Traffic shaping networking diagram

Procedure

Configure RouterA.

sysname RouterA
#
vlan batch 10

# Create a queue profile qp1.
qos queue-profile qp1

# Set the CIR for queue 2 to 2000 kbit/s and the CBS to 50000 bytes.                
queue 2 gts cir 2000 cbs 50000

# Set the CIR for queue 5 to 4000 kbit/s and the CBS to 100000 bytes.
queue 5 gts cir 4000 cbs 100000

# Set the CIR for queue 6 to 256 kbit/s and the CBS to 6400 bytes.
queue 6 gts cir 256 cbs 6400

# Set the scheduling mode to queues 0 to 5 to weighted fair
# queuing (WFQ), and set the scheduling mode for queue 6 and
# queue 7 to priority queuing (PQ).

schedule wfq 0 to 5 pq 6 to 7
  


interface Vlanif10
ip address 192.168.1.1 255.255.255.0


interface Ethernet2/0/0
# Set the link type of the interface to trunk.
port link-type trunk
 
# Add the trunk interface to VLAN 10.
port trunk allow-pass vlan 10
 
# Trust 802.1p priorities of packets on the interface.
trust 8021p


interface GigabitEthernet3/0/0
ip address 192.168.4.1 255.255.255.0 

# Apply the queue profile qp1 to the interface.
qos queue-profile qp1 

# Set CIR for the interface to 8000 kbit/s and the CBS to 200000 bytes.
qos gts cir 8000 cbs 200000  

Verify the configuration

Run the display qos queue statistics interface gigabitethernet 3/0/0 command on RouterA to check packet statistics in queues on GE3/0/0. You can see that the output rate of each queue is within the configured limit. When a queue is full, excess packets are discarded.

 

Configuration Notes

Configure the interface of the switch connected to RouterA as a trunk interface and add the interface to service VLANs.

Configure RouterB to ensure that it can communicate with RouterA.

The traffic shaping CIR value configured on an interface must be larger than or equal to the sum of CIR values of all queues on the interface. Otherwise, packets in high-priority queues may fail to be scheduled.

The more information about technical support you can consult with our engineer – Bill, and his e-mail address is as below:

bill@huanetwork.com

Taken From: http://www.huanetwork.com/blog/how-to-configure-traffic-shaping-for-huawei-ar-routers/