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

CX11x, CX31x, CX710 (Earlier Than V6.03), and CX91x Series Switch Modules V100R001C10 Configuration Guide 12

The documents describe the configuration of various services supported by the CX11x&CX31x&CX91x series switch modules The description covers configuration examples and function configurations.
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).
Configuration Examples

Configuration Examples

The section provides several configuration examples of IP unicast PBR, including networking requirements, and configuration roadmap.

Example for Configuring PBR

Networking Requirements

On a data center shown in Figure 7-130, tenants are dual-homed to external network devices through Switch Module. Packets that tenants send are distinguished based on VLAN IDs. Packets from tenant 1 are marked with VLAN 100 and those from tenant 2 are marked with VLAN 200. Packets from the two tenants reach external network devices through the gateway 40.40.40.2/24.

To enable packets from tenant 1 need to reach external network devices through the gateway 30.30.30.2/24, you can configure policy-based routing (PBR) to ensure tenant experience. Table 7-58 lists the PBR configuration parameters.
Table 7-58 Parameters for configuring PBR

Device

Interface

VLANIF

IP Address

Switch

10GE1/17/1

100

10.10.10.1/24

Switch

10GE1/17/2

200

20.20.20.1/24

Switch

10GE1/17/3

300

30.30.30.1/24

Switch

10GE1/17/4

400

40.40.40.1/24

Figure 7-130 Networking for configuring PBR
Configuration Roadmap
Redirection is used to implement PBR so that Switch Module can provide differentiated services. The configuration roadmap is as follows:
  1. Create VLANs and configure interfaces so that Switch Module can connect to the external network devices.
  2. Configure a traffic classifier to classify packets based on VLAN IDs.
  3. Configure a traffic behavior to redirect the packets with VLAN ID 100 to 30.30.30.2/24.
  4. Configure a traffic policy, bind the traffic classifier and traffic behavior to the traffic policy. Apply the traffic policy to the inbound direction of 10GE1/17/1 on Switch Module to implement PBR for tenant 1.

Procedure

  1. Create VLANs and configure interfaces and the default route to allow all packets to access the external network devices through the gateway 40.40.40.2/24.

    # Create VLAN 100 on Switch ModuleA.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleA
    [*HUAWEI] commit
    [~Switch ModuleA] vlan 100
    [*Switch ModuleA-vlan100] quit
    [*Switch ModuleA] commit

    # Configure 10GE1/17/2 on Switch ModuleA as a trunk interface. Add 10GE1/17/1 and 10GE1/17/2 to VLAN 100.

    [~Switch ModuleA] interface 10ge 1/17/1
    [~Switch ModuleA-10GE1/17/1] port default vlan 100
    [*Switch ModuleA-10GE1/17/1] quit
    [*Switch ModuleA] interface 10ge 1/17/2
    [*Switch ModuleA-10GE1/17/2] port link-type trunk
    [*Switch ModuleA-10GE1/17/2] port trunk allow-pass vlan 100
    [*Switch ModuleA-10GE1/17/2] quit
    [*Switch ModuleA] commit

    # Create VLAN 200 on Switch ModuleB.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleB
    [*HUAWEI] commit
    [~Switch ModuleB] vlan 200
    [*Switch ModuleB-vlan200] quit
    [*Switch ModuleB] commit

    # Configure 10GE1/17/2 on Switch ModuleB as a trunk interface. Add 10GE1/17/1 and 10GE1/17/2 to VLAN 200.

    [~Switch ModuleB] interface 10ge 1/17/1
    [~Switch ModuleB-10GE1/17/1] port default vlan 200
    [*Switch ModuleB-10GE1/17/1] quit
    [*Switch ModuleB] interface 10ge 1/17/2
    [*Switch ModuleB-10GE1/17/2] port link-type trunk
    [*Switch ModuleB-10GE1/17/2] port trunk allow-pass vlan 200
    [*Switch ModuleB-10GE1/17/2] quit
    [*Switch ModuleB] commit

    # Create VLAN 100, VLAN 200, VLAN 300, and VLAN 400 on Switch Module.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch Module
    [*HUAWEI] commit
    [~Switch Module] vlan batch 100 200 300 400
    [*Switch Module] commit

    # Configure 10GE1/17/1, 10GE1/17/2, 10GE1/17/3, and 10GE1/17/4 on Switch Module as trunk interfaces. Add 10GE1/17/1 to VLAN 100, 10GE1/17/2 to VLAN 200, 10GE1/17/3 to VLAN 300, and 10GE1/17/4 to VLAN 400.

    [~Switch Module] interface 10ge 1/17/1
    [~Switch Module-10GE1/17/1] port link-type trunk
    [*Switch Module-10GE1/17/1] port trunk allow-pass vlan 100
    [*Switch Module-10GE1/17/1] quit
    [*Switch Module] interface 10ge 1/17/2
    [*Switch Module-10GE1/17/2] port link-type trunk
    [*Switch Module-10GE1/17/2] port trunk allow-pass vlan 200
    [*Switch Module-10GE1/17/2] quit
    [*Switch Module] interface 10ge 1/17/3
    [*Switch Module-10GE1/17/3] port link-type trunk
    [*Switch Module-10GE1/17/3] port trunk allow-pass vlan 300
    [*Switch Module-10GE1/17/3] quit
    [*Switch Module] interface 10ge 1/17/4
    [*Switch Module-10GE1/17/4] port link-type trunk
    [*Switch Module-10GE1/17/4] port trunk allow-pass vlan 400
    [*Switch Module-10GE1/17/4] quit
    [*Switch Module] commit
    

    # Create VLANIF 100, VLANIF 200, VLANIF 300, and VLANIF 400 on Switch Module and configure IP addresses for them.

    [~Switch Module] interface vlanif 100
    [*Switch Module-Vlanif100] ip address 10.10.10.1 24
    [*Switch Module-Vlanif100] quit
    [*Switch Module] interface vlanif 200
    [*Switch Module-Vlanif200] ip address 20.20.20.1 24
    [*Switch Module-Vlanif200] quit
    [*Switch Module] interface vlanif 300
    [*Switch Module-Vlanif300] ip address 30.30.30.1 24
    [*Switch Module-Vlanif300] quit
    [*Switch Module] interface vlanif 400
    [*Switch Module-Vlanif400] ip address 40.40.40.1 24
    [*Switch Module-Vlanif400] quit
    [*Switch Module] commit

    # Configure the default route on Switch Module to allow all packets to access the external network devices through the gateway 40.40.40.2/24.

    [~Switch Module] ip route-static 0.0.0.0 0.0.0.0 40.40.40.2
    [*Switch Module] commit

  2. Configure a traffic classifier.

    # On Switch Module, create traffic classifier c1 to match packets with VLAN ID 100.

    [~Switch Module] traffic classifier c1
    [*Switch Module-classifier-c1] if-match vlan 100
    [*Switch Module-classifier-c1] quit
    [*Switch Module] commit

  3. Configure a traffic behavior.

    # On Switch Module, create traffic behavior b1 to specify redirection to the gateway 30.30.30.2/24.

    [~Switch Module] traffic behavior b1
    [*Switch Module-behavior-b1] redirect nexthop 30.30.30.2
    [*Switch Module-behavior-b1] quit
    [*Switch Module] commit

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

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

    [~Switch Module] traffic policy p1
    [*Switch Module-trafficpolicy-p1] classifier c1 behavior b1
    [*Switch Module-trafficpolicy-p1] quit
    [*Switch Module] commit

    # Apply the traffic policy p1 to the inbound direction of 10GE1/17/1.

    [~Switch Module] interface 10ge 1/17/1
    [~Switch Module-10GE1/17/1] traffic-policy p1 inbound
    [*Switch Module-10GE1/17/1] quit
    [*Switch Module] commit

  5. Verify the configuration.

    # View the traffic classifier configuration.

    <Switch Module> display traffic classifier
      Traffic Classifier Information:
        Classifier: c1 
          Type: OR
          Rule(s) : 
            if-match vlan 100
    
    Total classifier number is 1   
    

    # View the traffic policy configuration.

    <Switch Module> display traffic policy p1
      Traffic Policy Information:
        Policy: p1  
          Classifier: c1
            Type: OR
          Behavior: b1
            Redirect: 
              Redirect nexthop
              30.30.30.2
    

Configuration Files
  • Configuration file of Switch Module
    #
    sysname Switch Module
    #
    vlan batch 100 200 300 400
    #
    traffic classifier c1 type or
     if-match vlan 100
    #
    traffic behavior b1
     redirect nexthop 30.30.30.2
    #
    traffic policy p1
     classifier c1 behavior b1 precedence 5
    #
    interface Vlanif100
     ip address 10.10.10.1 255.255.255.0
    #
    interface Vlanif200
     ip address 20.20.20.1 255.255.255.0
    #
    interface Vlanif300
     ip address 30.30.30.1 255.255.255.0
    #
    interface Vlanif400
     ip address 40.40.40.1 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 100
     traffic-policy p1 inbound
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 200
    #
    interface 10GE1/17/3
     port link-type trunk
     port trunk allow-pass vlan 300
    #
    interface 10GE1/17/4
     port link-type trunk
     port trunk allow-pass vlan 400
    #
    ip route-static 0.0.0.0 0.0.0.0 40.40.40.2
    #
    return
    
  • Configuration file of Switch ModuleA
    #
    sysname Switch ModuleA
    #
    vlan batch 100
    #
    interface 10GE1/17/1
     port default vlan 100
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 100
    #
    return
    
  • Configuration file of Switch ModuleB
    #
    sysname Switch ModuleB
    #
    vlan batch 200
    #
    interface 10GE1/17/1
     port default vlan 200
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 200
    #
    return
    
Translation
Download
Updated: 2019-08-09

Document ID: EDOC1000041694

Views: 57212

Downloads: 3617

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