No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

NE40E V800R010C10SPC500 Configuration Guide - QoS 01

This is NE40E V800R010C10SPC500 Configuration Guide - QoS
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Example for Configuring QPPB (BGP)

Example for Configuring QPPB (BGP)

This section provides an example for configuring QPPB.

Networking Requirements

On the network shown in Figure 7-7, router B advertises BGP routes with community attributes to router A, router A matches the community attributes against the community list, associates traffic behaviors with QoS local IDs for the matched routes, and apply a QPPB local policy to the traffic transmitted along the routes.

Traffic is sent from router B to router C by passing router A. router B functions as a BGP route sender, and router A functions as a BGP route receiver.

It is required that source-based QPPB be applied to the incoming traffic.

NOTE:

Interfaces 1 through 2 in this example are GE 1/0/0, GE 2/0/0, respectively.

Figure 7-7 Networking diagram for configuring QPPB

Precautions

None.

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure basic BGP functions.

  2. Configure routing policies, set community attributes for the routes to be advertised, and advertise routes on router B.

  3. Apply routing policies, match route attributes, and set QoS local ID on router A.

  4. Configure QPPB and apply it to the incoming traffic on router A.

Data Preparation

To complete the configuration, you need the following data:

  • IP address of each interface

  • Routing policy name, matching rule, and route attribute

  • QPPB policy name

Procedure

  1. Configure basic BGP functions on routerA and routerB.

    # Configure loopback interfaces on router A and router B.

    <routerA> system-view
    [~routerA] interface loopback 0
    [*routerA-LoopBack0] ip address 1.1.1.1 255.255.255.255
    [*DeviceA-LoopBack0] commit
    [~DeviceA-LoopBack0] return
    <routerB> system-view
    [~routerB] interface loopback 0
    [*routerB-LoopBack0] ip address 2.2.2.2 255.255.255.255

    # Configure interfaces connecting router A and router B and interfaces connecting router A and router C.

    <routerA> system-view
    [~routerA] interface GigabitEthernet 2/0/0
    [~routerA-GigabitEthernet2/0/0] undo shutdown
    [*routerA-GigabitEthernet2/0/0] ip address 10.10.1.1 255.255.255.0
    [*DeviceA-GigabitEthernet2/0/0] commit
    [~DeviceA-GigabitEthernet2/0/0] quit
    [~routerA] interface gigabitethernet 1/0/0
    [~routerA-GigabitEthernet1/0/0] undo shutdown
    [*routerA-GigabitEthernet1/0/0] ip address 10.20.1.2 255.255.255.0
    [*DeviceA-GigabitEthernet1/0/0] commit
    [~DeviceA-GigabitEthernet1/0/0] return
    <routerB> system-view
    [~routerB] interface GigabitEthernet 1/0/0
    [~routerB-GigabitEthernet2/0/0] undo shutdown
    [*routerB-GigabitEthernet2/0/0] ip address 10.10.1.2 255.255.255.0
    [*DeviceB-GigabitEthernet1/0/0] commit
    [~DeviceB-GigabitEthernet1/0/0] return
    <routerC> system-view
    [~routerC] interface gigabitethernet1/0/0
    [~routerC-GigabitEthernet1/0/0] undo shutdown
    [*routerC-GigabitEthernet1/0/0] ip address 10.20.1.1 255.255.255.0
    [*DeviceC-GigabitEthernet1/0/0] commit
    [~DeviceC-GigabitEthernet1/0/0] return

    # Enable OSPF and advertise route information containing the interface addresses.

    <routerA> system-view
    [~routerA] ospf
    [*routerA-ospf-1] area 0
    [*routerA-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
    [*routerA-ospf-1-area-0.0.0.0] network 10.10.1.0 0.0.0.255
    [*routerA-ospf-1-area-0.0.0.0] network 10.20.1.0 0.0.0.255
    [*DeviceA-ospf-1-area-0.0.0.0] commit
    [~routerA-ospf-1-area-0.0.0.0] quit
    [~routerA-ospf-1] return
    <routerB> system-view
    [~routerB] ospf
    [*routerB-ospf] area 0
    [*routerB-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
    [*routerB-ospf-1-area-0.0.0.0] network 10.10.1.0 0.0.0.255
    [*DeviceB-ospf-1-area-0.0.0.0] commit
    [~DeviceB-ospf-1-area-0.0.0.0] quit
    [~DeviceB-ospf-1] return
    <routerC> system-view
    [~routerC] ospf
    [*routerC-ospf] area 0
    [*routerC-ospf-1-area-0.0.0.0] network 10.20.1.0 0.0.0.255
    [*DeviceC-ospf-1-area-0.0.0.0] commit
    [~DeviceC-ospf-1-area-0.0.0.0] return

    # Configure BGP and set up EBGP peer relationships between router A and router B.

    <routerA> system-view
    [~routerA] bgp 100
    [*routerA-bgp] peer 2.2.2.2 as-number 200
    [*routerA-bgp] peer 2.2.2.2 ebgp-max-hop 2
    [*routerA-bgp] peer 2.2.2.2 connect-interface loopback 0
    [*routerA-bgp] import-route direct
    [*DeviceA-bgp] commit
    [~DeviceA-bgp] return
    <routerB> system-view
    [~routerB] bgp 200
    [*routerB-bgp] peer 1.1.1.1 as-number 100
    [*routerB-bgp] peer 1.1.1.1 ebgp-max-hop 2
    [*routerB-bgp] peer 1.1.1.1 connect-interface loopback 0
    [*routerB-bgp] import-route direct
    [*DeviceB-bgp] commit
    [~DeviceB-bgp] return

    # Configure BGP and set up an IBGP peer relationship between router A and router C.

    <routerA> system-view
    [~routerA] bgp 100
    [*routerA-bgp] peer 10.20.1.1 as-number 100
    [*routerA-bgp] import-route direct
    [*DeviceA-bgp] commit
    [~DeviceA-bgp] quit
    <routerC> system-view
    [~routerC] bgp 100
    [*routerC-bgp] peer 10.20.1.2 as-number 100
    [*routerC-bgp] import-route direct
    [*DeviceC-bgp] commit
    [~DeviceC-bgp] quit

    After the configuration is complete, router A can communicate with router B and router C.

  2. Configure and apply routing policies on router B.

    # Configure an IP prefix on routerB.

    <routerB> system-view
    [~routerB] ip ip-prefix bb permit 66.1.1.1 32
    [*DeviceB] commit
    [~DeviceB] return

    # Configure a routing policy on router B.

    <routerB> system-view
    [~routerB] route-policy aa permit node 10
    [*routerB-route-policy] if-match ip-prefix bb
    [*routerB-route-policy] apply community 10:10
    [*DeviceB-route-policy] commit
    [~DeviceB-route-policy] return

    # Configure a policy for advertising routes on router B.

    <routerB> system-view
    [~routerB] bgp 200
    [*routerB-bgp] peer 1.1.1.1 route-policy aa export
    [*routerB-bgp] peer 1.1.1.1 advertise-community
    [*DeviceB-bgp] commit
    [~DeviceB-bgp] return

  3. Configure a policy for receiving routes on router A, and apply traffic behaviors to the route that matches the route attribute.

    # Configure a traffic behavior.

    <routerA> system-view
    [~routerA] traffic behavior dd
    [*routerA-behavior-dd] remark dscp af11
    [*DeviceA-behavior-dd] commit
    [~DeviceA-behavior-dd] return

    # Configure a routing policy and apply the traffic behavior to the route that matches the route attribute.

    <routerA> system-view
    [~routerA] ip community-filter 10 permit 10:10
    [*routerA] route-policy aa permit node 10
    [*routerA-route-policy] if-match community-filter 10
    [*routerA-route-policy] apply qos-local-id 1
    [*DeviceA-route-policy] commit
    [~DeviceA-route-policy] return

    # Configure a QPPB local policy on router A.

    <routerA> system-view
    [~routerA] qppb local-policy ac
    [*routerA-localpolicy-ac] qos-local-id 1 behavior dd
    [*DeviceA-localpolicy-ac] commit
    [~DeviceA-localpolicy-ac] return

    # Apply the routing policy to the routes sent from router B on router A.

    <routerA> system-view
    [~routerA] bgp 100
    [*routerA-bgp] peer 2.2.2.2 route-policy aa import
    [*DeviceA-bgp] commit
    [~DeviceA-bgp] return

  4. Apply the QPPB local policy to the incoming traffic on router A.

    <routerA> system-view
    [~routerA] interface GigabitEthernet 2/0/0
    [~routerA-GigabitEthernet2/0/0] qppb-policy ac source inbound
    [*DeviceA-GigabitEthernet2/0/0] commit
    [~DeviceA-GigabitEthernet2/0/0] return

  5. Verify the configuration.

    # Display the QPPB local policy information on router A.

    [~routerA] display qppb local-policy configuration ac
    qppb local-policy: ac
     statistics disable
     is-used yes
     qos-local-id 1 behavior dd 

Configuration Files

  • Configuration file of router A

    #
     sysname routerA
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     ip address 10.20.1.2 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     undo shutdown
     ip address 10.10.1.1 255.255.255.0
     qppb-policy ac source inbound
    #
    interface LoopBack0
     ip address 1.1.1.1 255.255.255.255
    #
    bgp 100
     peer 2.2.2.2 as-number 200
     peer 2.2.2.2 ebgp-max-hop 2
     peer 2.2.2.2 connect-interface LoopBack0
     peer 10.20.1.1 as-number 100
    #
    ipv4-family unicast
      undo synchronization
      import-route direct
      peer 2.2.2.2 enable
      peer 2.2.2.2 route-policy aa import
      peer 10.20.1.1 enable     
    #
    ospf 1
     area 0.0.0.0
      network 1.1.1.1 0.0.0.0
      network 10.10.1.0 0.0.0.255
      network 10.20.1.0 0.0.0.255
    #
    traffic behavior dd
     remark dscp af11
    #
    route-policy aa permit node 10
     if-match community-filter 10
     apply qos-local-id 1
    #
     ip community-filter 10 permit 10:10
    #
    qppb local-policy ac
     qos-local-id 1 behavior dd 
    return
    
  • Configuration file of router B

    #
     sysname routerB
    #
    interface GigabitEthernet2/0/0
     undo shutdown
     ip address 10.10.1.2 255.255.255.0
    #
    interface LoopBack0
     ip address 2.2.2.2 255.255.255.255
    #
    interface LoopBack10
     ip address 66.1.1.1 255.255.255.255
    #
    bgp 200
     peer 1.1.1.1 as-number 100
     peer 1.1.1.1 ebgp-max-hop 2
     peer 1.1.1.1 connect-interface LoopBack0
     #
     ipv4-family unicast
      undo synchronization
      import-route direct
      peer 1.1.1.1 enable
      peer 1.1.1.1 route-policy aa export
      peer 1.1.1.1 advertise-community
      quit
    #
    ospf 1
     area 0.0.0.0
      network 2.2.2.2 0.0.0.0
      network 10.10.1.0 0.0.0.255
    #
    route-policy aa permit node 10
     if-match ip-prefix bb
     apply community 10:10
    #
     ip ip-prefix bb index 10 permit 66.1.1.1 32
    #
    return
  • Configuration file of router C

    #
     sysname routerC
    #
    interface gigabitethernet1/0/0
     undo shutdown
     ip address 10.20.1.1 255.255.255.0
    #
    bgp 100
     peer 10.20.1.2 as-number 100
     #
     ipv4-family unicast
      undo synchronization
      import-route direct
      peer 10.20.1.2 enable
    #
    ospf 1
     area 0.0.0.0
      network 10.20.1.0 0.0.0.255
    #
    return
Translation
Download
Updated: 2019-01-03

Document ID: EDOC1100055024

Views: 25991

Downloads: 117

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Share
Previous Next