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 PBR Based on Redirection to an MPLS-TE P2P Tunnel

Example for Configuring PBR Based on Redirection to an MPLS-TE P2P Tunnel

This section provides an example for configuring policy-based routing (PBR) based on redirection to an MPLS-TE P2P tunnel.

Networking Requirements

In Figure 6-2, a PBR policy named aaa needs to be configured on Device A. After the PBR policy is configured, if receiving packets from GE 1/0/0, Device A forwards all the packets with the source address of 10.100.0.11/24 to Tunnel30; if receiving packets from GE 2/0/0, Device A forwards all the packets with the source address of 10.110.0.11/24 to Tunnel 40. Device A is directly connected to Device B and Device C.

NOTE:

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

Figure 6-2 Configuring PBR based on redirection to an MPLS-TE P2P tunnel

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure IP addresses for interfaces on Device A, Device B, Device C, and Device D.

  2. Configure routes from Device B and Device C to Device D.

  3. Define ACLs.

  4. Configure rules and the action for PBR and apply PBR to an interface.

Data Preparation

To complete the configuration, you need the following data:

  • ACL numbers and rules

  • Name of a PBR policy

  • Outbound interface or next hop address to which packets are redirected

Procedure

  1. Configure IP addresses for interfaces on Device A, Device B, Device C, and Device D.
  2. Configure routes from Device B and Device C to Device D.
  3. Define an ACL on Device A.

    # Define ACL 3001 to match the packets with the source address of 10.100.0.11/24 and ACL 3002 to match the packets with the source address of 10.110.0.11/24.

    <HUAWEI> system-view
    [~HUAWEI] sysname DeviceA
    [*DeviceA] acl name a3001 number 3001
    [*DeviceA-acl4-advance-3001] rule permit ip source 10.100.0.11 0.0.0.255
    [*DeviceA-acl4-advance-3001] commit
    [~DeviceA-acl4-advance-3001] quit
    [*DeviceA]  acl name a3002 number 3002
    [*DeviceA-acl4-advance-3002] rule permit ip source 10.110.0.11 0.0.0.255
    [*DeviceA-acl4-advance-3002] commit
    [~DeviceA-acl4-advance-3002] quit

  4. Configure rules and the action for PBR and apply PBR to an interface of Device A.

    # Configure node 5 to forward packets with the source address of 10.100.0.11/24 to Tunnel 30.

    [*DeviceA] policy-based-route aaa permit node 5
    [*DeviceA-policy-based-route-aaa-5] if-match acl name a3001
    [*DeviceA-policy-based-route-aaa-5] apply output-interface Tunnel30
    [*DeviceA-policy-based-route-aaa-5] commit
    [~DeviceA-policy-based-route-aaa-5] quit

    # Configure node 10 to forward packets with the source address of 10.110.0.11/24 to Tunnel 40.

    [*DeviceA] policy-based-route aaa permit node 10
    [*DeviceA-policy-based-route-aaa-10] if-match acl name a3002
    [*DeviceA-policy-based-route-aaa-10] apply output-interface Tunnel40
    [*DeviceA-policy-based-route-aaa-10] commit
    [~DeviceA-policy-based-route-aaa-10] quit

    # Apply the PBR policy named aaa to GE 1/0/0.

    [*DeviceA] interface gigabitethernet 1/0/0
    [*DeviceA-GigabitEthernet1/0/0] ip address 10.100.0.10 255.255.255.0
    [*DeviceA-GigabitEthernet1/0/0] ip policy-based-route aaa
    [*DeviceA-GigabitEthernet1/0/0] undo shutdown
    [*DeviceA-GigabitEthernet1/0/0] commit
    [~DeviceA-GigabitEthernet1/0/0] quit

    # Apply the PBR policy named aaa to GE 2/0/0.

    [*DeviceA] interface gigabitethernet 2/0/0
    [*DeviceA-GigabitEthernet2/0/0] ip address 10.110.0.10 255.255.255.0
    [*DeviceA-GigabitEthernet2/0/0] ip policy-based-route aaa
    [*DeviceA-GigabitEthernet2/0/0] undo shutdown
    [*DeviceA-GigabitEthernet2/0/0] commit
    [~DeviceA-GigabitEthernet2/0/0] quit
    [*DeviceA] commit
    [~DeviceA] quit

  5. Verify the configuration.

    Run the display ip policy-based-route command. The command output shows the enabled PBR policies.

    <DeviceA> display ip policy-based-route
    policy Name                     Interface
    aaa                          GigabitEthernet1/0/0
    aaa                          GigabitEthernet2/0/0
    

    Run the display ip policy-based-route command. The command output shows the created policy content.

    <DeviceA> display policy-based-route
    -----------------------------------------------------
      User Defined policy-based-route Policy Information:
    -----------------------------------------------------
        Total: 100  Used: 1  Free: 99
        Policy: aaa
            Node: 5     MapInstance: 5
                  if-match acl name a3001
                  apply output-interface Tunnel30
            Node: 10    MapInstance: 10
                  if-match acl name a3002
                  apply output-interface Tunnel40

Configuration Files

  • Device A configuration file

    #
    sysname DeviceA
    #
    acl name a3001 number 3001
     rule permit ip source 10.100.0.11 0.0.0.255
    acl name a3002 number 3002
     rule permit ip source 10.110.0.11 0.0.0.255
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     ip address 10.100.0.10 255.255.255.0
     ip policy-based-route aaa
    #
    #
    interface GigabitEthernet2/0/0
     undo shutdown
     ip address 10.110.0.10 255.255.255.0
     ip policy-based-route aaa
    #
     policy-based-route aaa permit node 5 map-instance 5
      if-match acl name a3001
      apply output-interface Tunnel30
     policy-based-route aaa permit node 10 map-instance 10
      if-match acl name a3002
      apply output-interface Tunnel40
    #
    return
  • Device B configuration file

    #
    sysname DeviceB
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     ip address 10.100.0.11 255.255.255.0
    #
     ip route-static 10.1.3.0 255.255.255.0 10.100.0.10
    #
    return
  • Device C configuration file

    #
    sysname DeviceC
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     ip address 10.110.0.11 255.255.255.0
    #
     ip route-static 10.1.2.0 255.255.255.0 10.110.0.10
    #
    return
Translation
Download
Updated: 2019-01-03

Document ID: EDOC1100055024

Views: 23100

Downloads: 115

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