VRP_QPPB
http://support.huawei.com/enterprise/en/doc/EDOC1000036943?section=j008
5.4 Configuring Destination-Based QPPB
Destination-based QPPB differentiates the routes to different destinations and associates differentiated QoS policies with them.
Usage Scenario
QPPB is applicable to both IBGP and EBGP and can be configured for one or more ASs.
As shown in Figure 5-5, traffic is transmitted from Router B (AS 200) and Router C (AS 300) to Router D (AS 400) through Router A (AS 100). Routers B and C function as BGP route senders and Router A functions as a BGP route receiver. Based on the traffic control policies that are signed between providers A and D, Router A needs to limit the rate of the traffic sent to Router D.
Routers B and C advertise BGP routes carrying the community attribute to Router A. After receiving the BGP routes, Router A matches the routes with the community list, ACL list, or AS_Path list, and associates QoS policy IDs with QoS behaviors for the routes. Destination-based QPPB is enabled on the Router A interface that allows traffic to pass through. Therefore, QPPB local policies are applied to all traffic that passes through Router A.
Destination-based QPPB is applicable to both incoming and outgoing traffic on a device.
Figure 5-5 Networking diagram for destination-based QPPB configuration
Pre-configuration Tasks
Before configuring QPPB, complete the following tasks:
Configuring basic BGP functions
Configuring local network routes advertised by BGP
Configuring interfaces for setting up a BGP connection
Configuration Procedures
Figure 5-6 Flowchart for QPPB configuration
5.4.1 Configuring Routing Policies on a BGP Route Sender
This section describes how to configure routing policies on a BGP route sender.
Context
Perform the following steps on a BGP route sender:
Procedure
Run:
system-view
The system view is displayed.
(Optional) Configure an ACL rule.
Configuring a Basic ACL.
The system processes the packets as follows:
Run:
acl { [ number ] acl-number1 | name acl-name [ basic ] [ number acl-number2 ] } [ match-order { auto | config } ]
A basic ACL is created and the view of the basic ACL is displayed.
Run:
rule [ rule-id ] { deny | permit } [ fragment-type fragment-type-name | source { source-ip-address source-wildcard | any } | time-range time-name | vpn-instance vpn-instance-name ] *
A rule for the basic ACL is configured.
If packets match the ACL rule with the permit action, the system applies the action to the packets.
If packets match the ACL rule with the deny action, the system drops the packets.
If packets match no ACL rule, the system does not apply the action to the packets but forwards them.
If an ACL that does not really exist or an ACL in which no rule is defined applies to a list, the system does not apply any action to the packets but forwards them.
Run:
route-policy route-policy-name { permit |deny } node node-number
The node of a routing policy is created, and the view of the routing policy is displayed.
Run one of the following commands as required to configure a matching rule for the routing policy.
To match an ACL, run the if-match acl { acl-number | name acl-name } command.
NOTE:
Only rules of ACLs 2000 to 2999 can be configured as matching rules in the routing policy.
To match an AS_Path list, run the if-match as-path-filter as-path-filter &<1-16> command.
To match the community attribute list, run the if-match community-filter { basic-comm-filter-num [ whole-match ] | adv-comm-filter-num }* &<1-16> or if-match community-filter comm-filter-name [ whole-match ] command.
To match a route cost, run the if-match cost cost command.
To match an IP prefix list, run the if-match ip-prefix ip-prefix command.
Run one of the following commands as required to set route attributes.
To set an AS_Path attribute, run the apply as-path as-number &<1-10> [ additive ] command.
To set a community attribute, run the apply community { [ community-number | aa:nn ] &<1-32> | internet | no-advertise | no-export| no-export-subconfed } * [ additive ] command.
To set a route cost, run the apply cost { [ apply-type ] cost | inherit } command.
You can set one BGP attribute, such as the AS_Path, community attribute, or extended community attribute, for the matched BGP routes as required.
Run:
quit
The system view is displayed.
Run:
bgp as-number
The BGP view is displayed.
Run:
peer { ip-address | group-name } route-policy route-policy-name export
The routing policy is applied to the routes that are to be advertised to the peer.
NOTE:
Ensure that BGP peer relationships have been set up before the routing policy is applied.
Run:
peer ip-address advertise-community
The community attribute is advertised to the peer.
By default, the community attribute is not advertised to any peer. To allow the peer to configure QoS policies for the routes with the community attribute, advertise the community attribute to the peer.
5.4.2 Configuring Routing Policies on a BGP Route Receiver
This section describes how to configure routing policies on a BGP route receiver.
Context
Perform the following steps on a BGP route receiver:
Procedure
Run:
system-view
The system view is displayed.
Run:
route-policy route-policy-name { permit | deny } node node-number
The node of a routing policy is created, and the view of the routing policy is displayed.
Run one of the following commands as needed to configure a matching rule for the routing policy on a BGP route receiver.
To match an AS_Path list, run the if-match as-path-filter as-path-acl-number &<1-16> command.
To match a community attribute list, run the if-match community-filter { basic-comm-filter-num [ whole-match ] | ext-comm-filter-num } &<1-16> command.
To match a route cost, run the if-match cost value command.
NOTE:
The route attribute configured for a BGP route must be the same as that of the route advertised by the BGP route sender.
Perform the following steps as required:
When an LPUF-10, LPUF-50, LPUF-51, LPUI-41, LPUS-41, LPUI-100, LPUF-101, LPUF-100 is used:
Run the apply qos-local-id qos-local-id command to apply a QoS policy to the route that meets the matching rule in the routing policy.
When an LPUF-21, LPUF-40 is used:
Run the apply ip-precedence ip-precedence command to apply IP preference to the route that meets the matching rule in the routing policy.
When an LPUF-10 , LPUF-50, LPUF-51is used:
Run the apply behavior behavior-name command to apply traffic behavior to the route that meets the matching rule in the routing policy.
A routing policy consists of multiple nodes. Each node comprises multiple if-match and apply clauses. The if-match clauses define matching rules of a node. The apply clauses define QoS behaviors that are to be implemented for the routes that match the matching rule.
You can configure multiple if-match clauses on a node. The relationship between these rules is "AND". This means that a route passes the filtering only when it meets all the matching rules.
The relationship between routing policy nodes is "OR". That is, if a route matches a node of a routing policy, it matches the routing policy. If none of the routing policy nodes is matched, the route does not match the routing policy.
Run:
bgp as-number
BGP is enabled and the BGP view is displayed.
Run:
peer ip-address route-policy route-policy-name import
The routing policy configured on the route receiver is applied to the routes sent from the peer (route sender).
NOTE:
Ensure that BGP peer relationships have been set up before the routing policy is applied.
5.4.3 Configuring Traffic Behaviors on a Route Receiver
You can configure different traffic behaviors for different traffic classifiers on a BGP receiver to implement differentiated services.
Context
Perform the following steps on the BGP route receiver:
Procedure
Run:
system-view
The system view is displayed.
Run:
traffic behavior behavior-name
A traffic behavior is configured and the traffic behavior view is displayed.
Run one of the following commands as needed:
To configure CAR actions, run the car { cir cir-value [ pir pir-value] } [ cbs cbs-value pbs pbs-value ] [ green { discard | pass [ service-class class color color ] } | yellow { discard | pass [ service-class class color color ] } | red { discard | pass [ service-classclass color color ] } ]* [ summary ] command.
To re-mark the DSCP value of an IP packet, run the remark dscp dscp-value command.
To reconfigure the IP preference of an IP packet, run the remark ip-precedence ip-precedence command.
To allow all the packets that meet the matching rule to pass, run the permit command.
To prevent all the packets that meet the matching rule from passing, run the deny command.
NOTE:
The device supports only five traffic behaviors: permit, deny, CAR, remark dscp, and remark ip-precedence.
5.4.4 Configuring QPPB Local Policies on a BGP Route Receiver
QPPB allows QoS policies to be configured for routes that match the BGP community list, ACL, or BGP AS_Path list. After the QPPB local policy is applied to the inbound and outbound interfaces of traffic, relevant QoS policies are implemented on the traffic.
Context
Perform the following steps on a BGP route receiver:
Procedure
Run:
system-view
The system view is displayed.
Run:
qppb local-policy policy-name
A QPPB local policy is created and the QPPB local policy view is displayed.
Run:
qos-local-id qos-local-id behavior behavior-name
A QoS policy is created and a traffic behavior is bound to the QoS local policy ID.
This step is needed only when an LPUF-10, LPUF-50, LPUF-51, LPUI-41, LPUS-41, LPUI-100 , LPUF-101 or LPUF-100 is used.
NOTE:
The device supports a maximum of 31 QPPB local policies. The maximum value of qos-local-id is 31.
A maximum of 31 QPPB local policies with qos-local-id ranging from 1 to 31 can be applied to the LPUF-10, LPUI-41, or LPUF-100.
A maximum of 255 QPPB local policies with qos-local-id ranging from 1 to 255 can be applied to the LPUF-50, LPUF-51, or LPUF-101.
5.4.5 Applying a QPPB Local Policy to an Interface
After a QPPB local policy is applied to an interface, the associated traffic behavior is performed for the packets that meet the matching rule.
Context
You can apply a QPPB local policy to the incoming or outgoing traffic.
BGP routes in QPPB refer to only BGP routes on the public network. Private routes are involved in the QPPB application on the L3VPN.
Perform the following steps on a BGP route receiver:
Procedure
Run:
system-view
The system view is displayed.
Run:
interface interface-type interface-number
The interface view is displayed.
Run one of the following commands as needed to apply a QPPB local policy:
When an LPUI-41, LPUS-41, LPUI-100, LPUF-100 is used:
When an LPUI-41,LPUF-100, LPUF-50, LPUF-51, LPUF-101 is used:
To apply a QPPB local policy to the incoming traffic, run the qppb-policy policy-name destination inbound command.
To apply a QPPB local policy to the outgoing traffic, run the qppb-policy qos-local-id destination inbound and qppb-policy policy-name [ unshared ] outbound commands.
NOTE:
The keyword destination indicates that policies are applied to traffic along the route whose destination address meets the matching rule.
Unshared QPPB can be enabled only on the LPUF-50, ISUI-51, LPUF-51, or LPUF-101.
When an LPUF-21 or LPUF-40 is used:
When an LPUF-21 , LPUF-50, LPUF-51, LPUF-101 or LPUF-40 is used:
To apply a QPPB local policy to the ip precedence, run the qppb-policy ip-precedence destination command.
When an LPUF-10, LPUF-50, LPUF-51, LPUF-101 is used:
To apply a QPPB local policy to the traffic behavior, run the qppb-policy behavior destination command.
5.4.6 Checking the Configuration
After QPPB is configured, you can view QPPB information.
Context
You can run the display commands in any view to check QPPB running information. For details about QPPB running information, see the chapter "QoS Commands" in the HUAWEI NetEngine80E/40E Router Command Reference.
Procedure
Run the display qppb local-policy statistics interface interface-type interface-number [ qos-local-id qos-local-id ] { inbound | outbound } command to check the statistics about a specific QPPB local policy.
Run the display qppb local-policy configuration [ policy-name | interface interface-type interface-number { inbound | outbound } ] command to view QPPB local policy configurations.
Example
After QPPB is configured successfully:
Run the display qppb local-policy statistics command, you can view statistics about a specific QPPB local policy. For example:
<HUAWEI> display qppb local-policy statistics interface gigabitethernet 2/0/0 inbound
Interface: GigabitEthernet2/0/0 qppb loacl-policy outbound: policy1 qos-local-id 1 Item Packets Bytes ------------------------------------------------------------------- Matched 0 0
Last 30 seconds rate: pps bps Matched 0 0
Current CAR statistics: Item Packets Bytes ------------------------------------------------------------------- Green 0 0 Yellow 0 0 Red 0 0 Passed 0 0 Dropped 0 0
Last 30 seconds rate: pps bps Passed 0 0 Dropped 0 0
Current SQ statistics: [be] Item Packets Bytes ------------------------------------------------------------------- Passed: 0 0 Dropped: 0 0 Last 5 minutes rate: pps bps Passed 0 0 Dropped 0 0 [af1] Item Packets Bytes ------------------------------------------------------------------- Passed: 0 0 Dropped: 0 0 Last 5 minutes rate: pps bps Passed 0 0 Dropped 0 0 [af2] Item Packets Bytes ------------------------------------------------------------------- Passed: 0 0 Dropped: 0 0 Last 5 minutes rate: pps bps Passed 0 0 Dropped 0 0 [af3] Item Packets Bytes ------------------------------------------------------------------- Passed: 0 0 Dropped: 0 0 Last 5 minutes rate: pps bps Passed 0 0 Dropped 0 0 [af4] Item Packets Bytes ------------------------------------------------------------------- Passed: 0 0 Dropped: 0 0 Last 5 minutes rate: pps bps Passed 0 0 Dropped 0 0 [ef] Item Packets Bytes ------------------------------------------------------------------- Passed: 0 0 Dropped: 0 0 Last 5 minutes rate: pps bps Passed 0 0 Dropped 0 0 [cs6] Item Packets Bytes ------------------------------------------------------------------- Passed: 0 0 Dropped: 0 0 Last 5 minutes rate: pps bps Passed 0 0 Dropped 0 0 [cs7] Item Packets Bytes ------------------------------------------------------------------- Passed: 0 0 Dropped: 0 0 Last 5 minutes rate: pps bps Passed 0 0 Dropped 0 0 [total] Item Packets Bytes ------------------------------------------------------------------- Passed: 0 0 Dropped: 0 0 Last 5 minutes rate: pps bps Passed 0 0 Dropped 0 0
Run the display qppb local-policy configuration command, you can view QPPB local policy configurations. For example:
<HUAWEI> display qppb local-policy configuration qppb local-policy brief information total number : 2 qppb_local-policy-name is-used p1 yes test2 no