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

Common Operation Guide

CloudEngine 12800, 12800E, 8800, 7800, 6800, and 5800 Series Switches

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).
Common PBR Operations

Common PBR Operations

Policy-based routing (PBR) is implemented through redirection in Modular QoS Command-Line Interface (MQC). A traffic classifier classifies data traffic, a traffic behavior redirects the specified data traffic, and then a traffic policy combines the traffic classifier and traffic behavior and is applied to an interface to implement PBR. The following example describes how to configure PBR.

In Figure 28-1, PBR is configured to redirect packets from VLAN 100 to RouterA. Before PBR is configured, all packets pass through RouterB.
Figure 28-1  PBR networking
  1. You need to create VLANs and configure interfaces as well as default routes to enable all packets to reach external network devices through the gateway at 10.40.40.2/24. The procedure is not mentioned here.
  2. The following part describes the procedure of configuring PBR.
    1. Create a traffic classifier to classify packets by the VLAN ID.
      <HUAWEI> system-view
      [~HUAWEI] sysname Switch
      [*HUAWEI] commit
      [~Switch] traffic classifier c1      //Create a traffic classifier c1 on the Switch.
      [*Switch-classifier-c1] if-match vlan 100      //Match packets with VLAN ID 100.
      [*Switch-classifier-c1] quit
      [*Switch] commit
    2. Create a traffic behavior to redirect packets with VLAN ID 100 to 10.30.30.2/24.
      [~Switch] traffic behavior b1      //Create a traffic behavior b1 on the Switch.
      [*Switch-behavior-b1] redirect nexthop 10.30.30.2      //Configure an action that redirects packets to the gateway at 10.30.30.2/24.
      [*Switch-behavior-b1] quit
      [*Switch] commit
      
    3. Configure a traffic policy, bind the traffic classifier and traffic behavior to it, and apply it to the inbound direction of 10GE1/0/1 on the Switch to implement PBR.
      [~Switch] traffic policy p1      //Create a traffic policy p1 on the Switch.
      [*Switch-trafficpolicy-p1] classifier c1 behavior b1      //Bind the traffic classifier and traffic behavior to the traffic policy.
      [*Switch-trafficpolicy-p1] quit
      [*Switch] commit
      [~Switch] interface 10ge 1/0/1
      [~Switch-10GE1/0/1] traffic-policy p1 inbound      //Apply the traffic policy p1 to the inbound direction of 10GE1/0/1.
      [*Switch-10GE1/0/1] quit
      [*Switch] commit
      
  3. Check the configuration.
    [~Switch] display traffic classifier      //Check the traffic classifier configuration.
      Traffic Classifier Information:
        Classifier: c1 
          Type: OR
          Rule(s) : 
            if-match vlan 100
    
    Total classifier number is 1 
    [~Switch] display traffic policy p1      //Check the traffic policy configuration.
      Traffic Policy Information:
        Policy: p1  
          Classifier: c1
            Type: OR
          Behavior: b1
            Redirect: 
              Redirect nexthop
              10.30.30.2
Translation
Download
Updated: 2018-10-08

Document ID: EDOC1000102369

Views: 144051

Downloads: 3160

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