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

S7700 and S9700 V200R010C00

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

Example for Configuring PBR

Networking Requirements

As shown in Figure 1, enterprise users are dual-homed to external network devices through the switch. Among the two links, one link is the low-speed link and the gateway address is 10.1.20.1/24, and the other link is the high-speed link and the gateway address is 10.1.30.1/24.

The enterprise requires that outgoing packets with IP priorities 4, 5, 6, and 7 be transmitted on the high-speed link and outgoing packets with IP priorities 0, 1, 2, and 3 be transmitted on the low-speed link.

Figure 12-2  PBR networking

Configuration Roadmap

Redirection is used to implement PBR so that the device can provide differentiated services. The configuration roadmap is as follows:
  1. Create VLANs and configure interfaces so that the device can connect to external network devices.
  2. Configure ACL rules to match the packets with IP priorities of 4, 5, 6, and 7 and the packets with IP priorities of 0, 1, 2, and 3.
  3. Configure traffic classifiers and reference ACL rules in the traffic classifiers so that the switch can differentiate packets.
  4. Configure traffic behaviors to redirect the packets matching traffic classification rules to 10.1.20.1/24 and 10.1.30.1/24.
  5. Configure a traffic policy in which the traffic classifiers are bound to traffic behaviors and apply the traffic policy to GE2/0/1 in the inbound direction to implement PBR.

Procedure

  1. Create VLANs and configure interfaces.

    # Create VLAN 100 and VLAN 200 on the Switch.

    <HUAWEI> system-view
    [HUAWEI] sysname Switch
    [Switch] vlan batch 100 200

    # Configure GE1/0/1, GE1/0/2, and GE2/0/1 on the Switch as trunk interfaces and add them to VLAN 100 and VLAN 200.

    [Switch] interface gigabitethernet 1/0/1
    [Switch-GigabitEthernet1/0/1] port link-type trunk
    [Switch-GigabitEthernet1/0/1] port trunk allow-pass vlan 100 200
    [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 100 200
    [Switch-GigabitEthernet1/0/2] quit
    [Switch] interface gigabitethernet 2/0/1
    [Switch-GigabitEthernet2/0/1] port link-type trunk
    [Switch-GigabitEthernet2/0/1] port trunk allow-pass vlan 100 200
    [Switch-GigabitEthernet2/0/1] quit
    NOTE:

    Configure the interface of the LSW connected to Switch as a trunk interface and add it to VLAN 100 and VLAN 200.

    # Create VLANIF 100 and VLANIF 200 and configure IP addresses for them.

    [Switch] interface vlanif 100
    [Switch-Vlanif100] ip address 10.1.20.2 24
    [Switch-Vlanif100] quit
    [Switch] interface vlanif 200
    [Switch-Vlanif200] ip address 10.1.30.2 24
    [Switch-Vlanif200] quit

  2. Configure ACLs.

    # Create advanced ACLs 3001 and 3002 on the Switch. ACL 3001 permits packets with IP precedences of 0, 1, 2, and 3 and ACL 3002 permits packets with IP precedences of 4, 5, 6, and 7.

    [Switch] acl 3001
    [Switch-acl-adv-3001] rule permit ip precedence 0
    [Switch-acl-adv-3001] rule permit ip precedence 1
    [Switch-acl-adv-3001] rule permit ip precedence 2
    [Switch-acl-adv-3001] rule permit ip precedence 3
    [Switch-acl-adv-3001] quit
    [Switch] acl 3002
    [Switch-acl-adv-3002] rule permit ip precedence 4
    [Switch-acl-adv-3002] rule permit ip precedence 5
    [Switch-acl-adv-3002] rule permit ip precedence 6
    [Switch-acl-adv-3002] rule permit ip precedence 7
    [Switch-acl-adv-3002] quit

  3. Configure traffic classifiers.

    Create traffic classifiers c1 and c2 on the Switch, and bind c1 to ACL 3001 and c2 to ACL 3002.

    [Switch] traffic classifier c1 operator and
    [Switch-classifier-c1] if-match acl 3001
    [Switch-classifier-c1] quit
    [Switch] traffic classifier c2 operator and
    [Switch-classifier-c2] if-match acl 3002
    [Switch-classifier-c2] quit

  4. Configure traffic behaviors.

    # Create traffic behaviors b1 and b2 on the Switch that redirects traffic to 10.1.20.1/24 and 10.1.30.1/24, respectively.

    [Switch] traffic behavior b1
    [Switch-behavior-b1] redirect ip-nexthop 10.1.20.1
    [Switch-behavior-b1] quit
    [Switch] traffic behavior b2
    [Switch-behavior-b2] redirect ip-nexthop 10.1.30.1
    [Switch-behavior-b2] quit

  5. Configure a traffic policy and apply the traffic policy to interfaces.

    # Create a traffic policy p1 on the Switch and bind the traffic policy to the traffic classifier and traffic behavior.

    [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 to GE2/0/1 in the inbound direction.

    [Switch] interface gigabitethernet 2/0/1
    [Switch-GigabitEthernet2/0/1] traffic-policy p1 inbound
    [Switch-GigabitEthernet2/0/1] return

  6. Verify the configuration.

    # Check the ACL configuration.

    <Switch> display acl 3001
    Advanced ACL 3001, 4 rules
    Acl's step is 5
     rule 5 permit ip precedence routine
     rule 10 permit ip precedence priority
     rule 15 permit ip precedence immediate
     rule 20 permit ip precedence flash
    <Switch> display acl 3002
    Advanced ACL 3002, 4 rules
    Acl's step is 5
     rule 5 permit ip precedence flash-override
     rule 10 permit ip precedence critical
     rule 15 permit ip precedence internet
     rule 20 permit ip precedence network

    # Check the traffic classifier configuration.

    <Switch> display traffic classifier user-defined
      User Defined Classifier Information:
        Classifier: c2
         Precedence: 10
         Operator: AND
         Rule(s) : if-match acl 3002
    
        Classifier: c1
          Precedence: 5
          Operator: AND
          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: AND
         Behavior: b1
          Redirect: no forced
            Redirect ip-nexthop
            10.1.20.1
       Classifier: c2
        Operator: AND
         Behavior: b2
          Redirect: no forced
            Redirect ip-nexthop
            10.1.30.1

Configuration Files

  • Switch configuration file

    #
    sysname Switch
    #
    vlan batch 100 200 
    #
    acl number 3001
     rule 5 permit ip precedence routine
     rule 10 permit ip precedence priority
     rule 15 permit ip precedence immediate
     rule 20 permit ip precedence flash
    acl number 3002
     rule 5 permit ip precedence flash-override
     rule 10 permit ip precedence critical
     rule 15 permit ip precedence internet
     rule 20 permit ip precedence network
    #
    traffic classifier c1 operator and precedence 5
     if-match acl 3001
    traffic classifier c2 operator and precedence 10
     if-match acl 3002
    #
    traffic behavior b1
     permit
     redirect ip-nexthop 10.1.20.1
    traffic behavior b2
     permit
     redirect ip-nexthop 10.1.30.1
    #
    traffic policy p1 match-order config
     classifier c1 behavior b1
     classifier c2 behavior b2
    #
    interface Vlanif100
     ip address 10.1.20.2 255.255.255.0
    #
    interface Vlanif200
     ip address 10.1.30.2 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 100 200
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 100 200
    #
    interface GigabitEthernet2/0/1
     port link-type trunk
     port trunk allow-pass vlan 100 200
     traffic-policy p1 inbound
    #
    return
    
Translation
Download
Updated: 2019-08-21

Document ID: EDOC1000141900

Views: 190240

Downloads: 194

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