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

Configuration Guide - IP Unicast Routing

S9300, S9300E, and S9300X V200R011C10

This document describes IP Unicast Routing configurations supported by the switch, including the principle and configuration procedures of IP Routing Overview, Static Route, RIP, RIPng, OSPF, OSPFv3, IS-IS(IPv4), IS-IS(IPv6), BGP, Routing Policy ,and PBR, and provides 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 PBR for Route Selection Based on Low Precedence

Example for Configuring PBR for Route Selection Based on Low Precedence

Networking Requirements

As shown in Figure 12-4, an enterprise applies for broadband services from multiple carriers to meet service requirements. Considering broadband prices and link quality of carriers, the enterprise prioritizes the lines for access to the Server in the following order: line of Carrier A, line of Carrier B, and line of Carrier C (the default line).

Figure 12-4  Networking for configuring PBR for route selection based on low precedence

Configuration Roadmap

The configuration roadmap is as follows:
  1. Use a dynamic routing protocol to generate or configure a route (route 1) to the Server and specify 10.1.1.2/24 as the next hop to enable the route to pass through the line of Carrier A.
  2. Configure a policy-based route (route2) that matches the network segment where the Server resides and specify 10.1.2.2/24 as the next hop to enable the route to pass through the line of Carrier B. Specify low precedence for route2 so that route1 is preferred over route2.
  3. Configure a policy-based route (route3) that matches the entire network segment to replace the default route, and specify 10.1.3.2/24 as the next hop to enable the route to pass through the line of Carrier C. Specify low precedence for route3, create traffic classifiers for route2 and route3, and set a lower priority for the traffic classifier of route3 than that of route2. Subsequently, route1, route2, and route3 are selected in descending order of priority.

After the configurations are complete, the Switch selects route1, route2, and route3 in descending order of priority.

Procedure

  1. Create VLANs and add interfaces to respective VLANs.

    # Create VLANs 10, 20, and 30 on the Switch.

    <Quidway> system-view
    [Quidway] sysname Switch
    [Switch] vlan batch 10 20 30

    # Configure GE1/0/1, GE1/0/2, and GE1/0/3 of the Switch as trunk interfaces and add them to VLANs 10, 20, and 30 respectively.

    [Switch] interface gigabitethernet 1/0/1
    [Switch-GigabitEthernet1/0/1] port link-type trunk
    [Switch-GigabitEthernet1/0/1] port trunk allow-pass vlan 10
    [Switch-GigabitEthernet1/0/1] quit
    [Switch] interface gigabitethernet 1/0/2
    [Switch-GigabitEthernet1/0/2] port link-type trunk
    [Switch-GigabitEthernet1/0/2] port trunk allow-pass vlan 20
    [Switch-GigabitEthernet1/0/2] quit
    [Switch] interface gigabitethernet 1/0/3
    [Switch-GigabitEthernet1/0/3] port link-type trunk
    [Switch-GigabitEthernet1/0/3] port trunk allow-pass vlan 30
    [Switch-GigabitEthernet1/0/3] quit

    # Create VLANIF 10, VLANIF 20, and VLANIF 30 and configure IP addresses for them.

    [Switch] interface vlanif 10
    [Switch-Vlanif10] ip address 10.1.1.1 24
    [Switch-Vlanif10] quit
    [Switch] interface vlanif 20
    [Switch-Vlanif20] ip address 10.1.2.1 24
    [Switch-Vlanif20] quit
    [Switch] interface vlanif 30
    [Switch-Vlanif30] ip address 10.1.3.1 24
    [Switch-Vlanif30] quit

  2. Configure a static route to the Server.

    # Configure a static route to the Server and specify 10.1.1.2/24 as the next hop.

    [Switch] ip route-static 10.1.4.0 24 10.1.1.2
    

  3. Configure traffic classifiers.

    # On the Switch, create advanced ACLs 3001 and 3002 that respectively allow packets with destination IP addresses 10.1.4.0/24 and 0.0.0.0/0 to pass through.

    [Switch] acl 3001
    [Switch-acl-adv-3001] rule permit ip destination 10.1.4.0 0.0.0.255
    [Switch-acl-adv-3001] quit
    [Switch] acl 3002
    [Switch-acl-adv-3002] rule permit ip destination 0.0.0.0 255.255.255.255
    [Switch-acl-adv-3002] quit

    On the Switch, create traffic classifiers c1 and c2 that match ACLs 3001 and 3002 respectively, and set a higher priority for c1 than c2.

    [Switch] traffic classifier c1 precedence 5
    [Switch-classifier-c1] if-match acl 3001
    [Switch-classifier-c1] quit
    [Switch] traffic classifier c2 precedence 10
    [Switch-classifier-c2] if-match acl 3002
    [Switch-classifier-c2] quit

  4. Configure traffic behaviors.

    # Create traffic behaviors b1 and b2 on the Switch, set 10.1.2.2/24 and 10.1.3.2/24 as next-hop IP addresses for redirection in b1 and b2 respectively, and specify low precedence for the redirection routes. Subsequently, route1 is preferred over route2 and route3.

    [Switch] traffic behavior b1
    [Switch-behavior-b1] redirect ip-nexthop 10.1.2.2 low-precedence
    [Switch-behavior-b1] quit
    [Switch] traffic behavior b2
    [Switch-behavior-b2] redirect ip-nexthop 10.1.3.2 low-precedence
    [Switch-behavior-b2] quit

  5. Configure a traffic policy and apply the traffic policy globally.

    # Create a traffic policy p1 on the Switch and bind the traffic classifiers and traffic behaviors in the traffic policy.

    [Switch] traffic policy p1
    [Switch-trafficpolicy-p1] classifier c1 behavior b1
    [Switch-trafficpolicy-p1] classifier c2 behavior b2
    [Switch-trafficpolicy-p1] quit

    # Apply the traffic policy p1 globally to match all the packets received by the Switch.

    [Switch] traffic-policy p1 global inbound
    [Switch] quit

  6. Verify the configuration.

    After the configurations are complete, the Switch selects route1, route2, and route3 in descending order of priority.

    # Check the ACL configuration.

    <Switch> display acl 3001
    Advanced ACL 3001, 1 rule
    Acl's step is 5
     rule 5 permit ip destination 10.1.4.0 0.0.0.255
    <Switch> display acl 3002
    Advanced ACL 3002, 1 rule
    Acl's step is 5
     rule 5 permit ip

    # Check the traffic classifier configuration.

    <Switch> display traffic classifier user-defined
      User Defined Classifier Information:
       Classifier: c2
        Precedence: 10
        Operator: OR
        Rule(s) : if-match acl 3002
    
       Classifier: c1
        Precedence: 5
        Operator: OR
        Rule(s) : if-match acl 3001
    
    Total classifier number is 2 
    

    # Check the traffic policy configuration.

    <Switch> display traffic policy user-defined p1
      User Defined Traffic Policy Information:
      Policy: p1
       Classifier: c1
        Operator: OR
         Behavior: b1
          Permit
          Redirect: no forced
            Redirect ip-nexthop low-precedence
            10.1.2.2
       Classifier: c2
        Operator: OR
         Behavior: b2
          Permit
          Redirect: no forced
            Redirect ip-nexthop low-precedence
            10.1.3.2 

Configuration Files

  • Configuration file of the Switch

    #
    sysname Switch
    #
    vlan batch 10 20 30
    #
    acl number 3001
     rule 5 permit ip destination 10.1.4.0 0.0.0.255
    acl number 3002
     rule 5 permit ip
    #
    traffic classifier c1 operator or precedence 5
     if-match acl 3001
    traffic classifier c2 operator or precedence 10
     if-match acl 3002
    #
    traffic behavior b1
     permit
     redirect ip-nexthop 10.1.2.2 low-precedence
    traffic behavior b2
     permit
     redirect ip-nexthop 10.1.3.2 low-precedence
    #
    traffic policy p1 match-order config
     classifier c1 behavior b1
     classifier c2 behavior b2
    #
    interface Vlanif10
     ip address 10.1.1.1 255.255.255.0
    #
    interface Vlanif20
     ip address 10.1.2.1 255.255.255.0
    #
    interface Vlanif30
     ip address 10.1.3.1 255.255.255.0 
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    interface GigabitEthernet1/0/3
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    traffic-policy p1 global inbound 
    #
    return
    
Translation
Download
Updated: 2019-10-22

Document ID: EDOC1000178418

Views: 200212

Downloads: 37

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