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

CLI-based Configuration Guide - IP Unicast Routing

AR100, AR120, AR150, AR160, AR200, AR1200, AR2200, AR3200, and AR3600 V200R010

This document describes the concepts and configuration procedures of IP Service features on the device, and provides the configuration examples.
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

In Figure 9-40, RouterB advertises BGP routes with the community attribute to RouterA. After RouterA receives these routes, it configures associated QoS local IDs for the routes that match the BGP community list and applies a local QPPB policy to traffic that traverses RouterA.

Traffic from RouterB to RouterC needs to traverse RouterA. RouterB is the BGP route sender, while RouterA is the BGP route receiver.

Source-based QPPB must be deployed on RouterA.

Figure 9-40 Configuring QPPB

Configuration Guidelines

None

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure basic BGP functions.

  2. On RouterB, configure a routing policy to set the community attribute for the routes to be sent and advertise routing policies through BGP.

  3. Apply the routing policy on RouterA to match route attributes and set associated QoS local IDs for routes.

  4. Apply a QPPB policy to the inbound interface of RouterA.

Data Preparation

To complete the configuration, you need the following data:

  • IP addresses of interfaces

  • Routing policy name, match rules, and route attributes

  • QPPB policy name

Procedure

  1. Configure basic BGP functions on RouterA and RouterB.

    # Configure loopback interfaces on RouterA and RouterB.

    <RouterA> system-view
    [RouterA] interface loopback 0
    [RouterA-LoopBack0] ip address 1.1.1.1 255.255.255.255
    [RouterA-LoopBack0] quit
    <RouterB> system-view
    [RouterB] interface loopback 0
    [RouterB-LoopBack0] ip address 2.2.2.2 255.255.255.255

    # Configure the interfaces that directly connect RouterA and RouterB and the interfaces that directly connect RouterA and RouterC.

    <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
    [RouterA-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
    [RouterA-GigabitEthernet1/0/0] quit
    <RouterB> system-view
    [RouterB] interface GigabitEthernet 1/0/0
    [RouterB-GigabitEthernet1/0/0] undo shutdown
    [RouterB-GigabitEthernet1/0/0] ip address 10.10.1.2 255.255.255.0
    <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
    [RouterC-GigabitEthernet1/0/0] return

    # Enable OSPF to advertise the routes to the IP addresses of interfaces.

    <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
    [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
    [RouterB-ospf-1-area-0.0.0.0] quit
    [RouterB-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
    [RouterC-ospf-1-area-0.0.0.0] return

    # Configure BGP and establish an EBGP connection between RouterA and RouterB.

    <RouterA> system-view
    [RouterA] bgp 100
    [RouterA-bgp] peer 2.2.2.2 as-number 200
    [RouterA-bgp] peer 2.2.2.2 connect-interface loopback 0
    [RouterA-bgp] import-route direct
    [RouterA-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
    [RouterB-bgp] return

    # Configure BGP and establish an EBGP connection between RouterA and RouterC.

    <RouterA> system-view
    [RouterA] bgp 100
    [RouterA-bgp] peer 10.20.1.1 as-number 100
    [RouterA-bgp] import-route direct
    [RouterA-bgp] quit
    <RouterC> system-view
    [RouterC] bgp 100
    [RouterC-bgp] peer 10.20.1.2 as-number 100
    [RouterC-bgp] import-route direct
    [RouterC-bgp] quit

    After the configurations are complete, RouterA can communicate with RouterB and RouterC.

  2. Configure a routing policy on the route sender RouterB and apply the routing policy.

    # Configure an IP prefix for the route sender.

    <RouterB> system-view
    [RouterB] ip ip-prefix bb permit 66.1.1.1 32
    [RouterB] return

    # Configure a routing policy on the route sender.

    <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
    [RouterB-route-policy] return

    # Advertise the routing policy through BGP on the route sender.

    <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
    [RouterB-bgp] return

  3. Configure a route receiving policy on the route receiver RouterA and apply the associated traffic behavior to the traffic that matches route attributes.

    # Configure a QoS policy, namely, the associated traffic behavior.

    <RouterA> system-view
    [RouterA] traffic behavior dd
    [RouterA-behavior-dd] remark dscp af11
    [RouterA-behavior-dd] return

    # Configure a route receiving policy to enforce the associated traffic behavior on the routes that match the community 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
    [RouterA-route-policy] return

    # Configure a QPPB policy on RouterA.

    <RouterA> system-view
    [RouterA] qppb local-policy ac
    [RouterA-localpolicy-ac] qos-local-id 1 behavior dd
    [RouterA-localpolicy-ac] return

    # On RouterA, apply the route receiving policy to the routes advertised by RouterB.

    <RouterA> system-view
    [RouterA] bgp 100
    [RouterA-bgp] peer 2.2.2.2 route-policy aa import
    [RouterA-bgp] return

  4. On RouterA, apply the QPPB policy to the inbound interface of traffic.

    <RouterA> system-view
    [RouterA] interface GigabitEthernet 1/0/0
    [RouterA-GigabitEthernet1/0/0] qppb-policy ac enable
    [RouterA-GigabitEthernet1/0/0] return

Configuration Files

  • Router A configuration file

    #
     sysname RouterA
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     ip address 10.20.1.2 255.255.255.0
     qppb-policy ac enable
    #
    interface GigabitEthernet2/0/0
     undo shutdown
     ip address 10.10.1.1 255.255.255.0
    #
    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 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
    
  • RouterB configuration file

    #
     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
    
  • RouterC configuration file

    #
     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-05-20

Document ID: EDOC1100034072

Views: 111236

Downloads: 163

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