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 - SFC

CloudEngine 6800 and 5800 V200R003C00

This document describes the configurations of Service function chain (SFC).
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 SFC in the Centralized VXLAN Gateway Networking

Example for Configuring SFC in the Centralized VXLAN Gateway Networking

Networking Requirements

SFC technology allows traffic to pass through specified SFs as required. On a centralized VXLAN gateway network (BGP EVPN) shown in Figure 8-1, SwitchA and SwitchB are leaf nodes, and there are reachable routes between SwitchC and the egress gateway. The tenant server and NSH-aware FW connect to the VXLAN through VLANs.

The customer requires that traffic from the tenant server be processed by the FW before being forwarded to the external network to ensure service forwarding security. SFC can meet customer requirements.
NOTE:

In the following figure, interface1 and interface2 represent 10GE1/0/1 and 10GE1/0/2, respectively.

Figure 8-1  SFC configuration networking in a centralized VXLAN gateway scenario
Table 8-1  Interface IP addresses

Device

Interface

IP Address

SwitchA

10GE1/0/1

192.168.1.1/24

LoopBack0

2.2.2.2/32

SwitchB

10GE1/0/1

192.168.2.2/24

LoopBack0

4.4.4.4/32

SwitchC

10GE1/0/1

192.168.1.2/24

10GE1/0/2

192.168.2.1/24

LoopBack0

3.3.3.3/32

Configuration Roadmap

The configuration roadmap is as follows:
  • Enable SFC on SwitchC.

  • Configure SwitchC as the SC to direct traffic matching rules to the SFP.

  • Configure SwitchC as an SFF to define the IP address of the next hop.

Procedure

  1. Configure the VXLAN. For details, see configuration files.
  2. Enable SFC on SwitchC.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchC
    [*HUAWEI] commit
    [~SwitchC] service-chain enable
    [*SwitchC] commit
    

  3. On SwitchC, configure the type of the next hop as SF. Configure the traffic classifier nsh to match packets with the source IP address 192.168.10.1 and destination IP address 30.1.1.1. Redirect traffic to SFP 100, set the SI to 5, and set the SI at the last hop of the SFP to 4.

    [~SwitchC] service-chain service-path 100
    [*SwitchC-service-chain-100] service-index 5 next-hop sf remote-ip 192.168.20.1
    [*SwitchC-service-chain-100] service-index 4 path-terminal
    [*SwitchC-service-chain-100] commit
    [~SwitchC-service-chain-100] quit
    [~SwitchC] acl 3001
    [*SwitchC-acl4-advance-3001] rule permit ip source 192.168.10.1 24 destination 30.1.1.1 24
    [*SwitchC-acl4-advance-3001] commit
    [~SwitchC-acl4-advance-3001] quit
    [~SwitchC] traffic classifier nsh type and
    [*SwitchC-classifier-nsh] if-match vxlan acl 3001
    [*SwitchC-classifier-nsh] commit
    [~SwitchC-classifier-nsh] quit
    [~SwitchC] traffic behavior nsh_1
    [*SwitchC-behavior-nsh_1] redirect service-path 100 service-index 5
    [*SwitchC-behavior-nsh_1] commit
    [~SwitchC-behavior-nsh_1] quit
    [~SwitchC] traffic policy nsh_2
    [*SwitchC-trafficpolicy-nsh_2] classifier nsh behavior nsh_1
    [*SwitchC-trafficpolicy-nsh_2] commit
    [~SwitchC-trafficpolicy-nsh_2] quit
    [~SwitchC] interface vbdif 10
    [~SwitchC-Vbdif10] traffic-policy nsh_2 inbound
    [*SwitchC-Vbdif10] commit

  4. Verify the configuration.

    Run the display service-chain service-path [ path-id ] command on SwitchC to view the SFP configuration.
    <SwitchC> display service-chain service-path 100
    SPI: ServicePathIndex    SI: ServiceIndex
    ServiceType: NA - NSH-aware, NUA - NSH-unaware
    NodeType: SF - Service Funtion, SFF - Service Funtion Forward, PS - Post Service
    Detailed ServicePath Information:
    ---------------------------------------------------------------------------------------------------------------------
    
         SPI     SI     RouteStatus     ServiceType     NodeType     NextHop              Vni     VpnInstance
    ---------------------------------------------------------------------------------------------------------------------
         100      5     Reachable       NA              SF           192.168.20.1        5020     --
         100      4     --              NUA             PS           --                     0     --

    Traffic can be forwarded to the external network after being processed by the FW.

Configuration Files

  • SwitchA configuration file

    #
    sysname SwitchA
    #
    evpn-overlay enable
    #
    bridge-domain 10
     vxlan vni 5010
     evpn
      route-distinguisher 11:1
      vpn-target 1:1 export-extcommunity
      vpn-target 1:1 import-extcommunity
    #
    bridge-domain 20
     vxlan vni 5020
     evpn
      route-distinguisher 12:1
      vpn-target 2:2 export-extcommunity
      vpn-target 2:2 import-extcommunity
    #
    interface 10GE1/0/1
     undo portswitch
     ip address 192.168.1.1 255.255.255.0
    #
    interface 10GE1/0/2.1 mode l2
     encapsulation dot1q vid 10
     bridge-domain 10
    #
    interface 10GE1/0/3.1 mode l2
     encapsulation dot1q vid 30
     bridge-domain 20
    #
    interface LoopBack1
     ip address 2.2.2.2 255.255.255.255
    #
    interface Nve1
     source 2.2.2.2
     vni 5010 head-end peer-list protocol bgp
     vni 5020 head-end peer-list protocol bgp
    #
    bgp 100 instance evpn1
     peer 3.3.3.3 as-number 100
     peer 3.3.3.3 connect-interface LoopBack1
     peer 4.4.4.4 as-number 100
     peer 4.4.4.4 connect-interface LoopBack1
     #
     l2vpn-family evpn
      policy vpn-target
      peer 3.3.3.3 enable
      peer 4.4.4.4 enable
    #
    ospf 1
     area 0.0.0.0
      network 2.2.2.2 0.0.0.0
      network 192.168.1.0 0.0.0.255
    #
    return
  • SwitchB configuration file

    #
    sysname SwitchB
    #
    evpn-overlay enable
    #
    bridge-domain 20
     vxlan vni 5020
     evpn
      route-distinguisher 31:2
      vpn-target 2:2 export-extcommunity
      vpn-target 2:2 import-extcommunity
    #
    interface 10GE1/0/1
     undo portswitch
     ip address 192.168.2.2 255.255.255.0
    #
    interface 10GE1/0/2.1 mode l2
     encapsulation dot1q vid 20
     bridge-domain 20
    #
    interface LoopBack1
     ip address 4.4.4.4 255.255.255.255
    #
    interface Nve1
     source 4.4.4.4
     vni 5020 head-end peer-list protocol bgp
    #
    bgp 100 instance evpn1
     peer 2.2.2.2 as-number 100
     peer 2.2.2.2 connect-interface LoopBack1
     peer 3.3.3.3 as-number 100
     peer 3.3.3.3 connect-interface LoopBack1
     #
     l2vpn-family evpn
      policy vpn-target
      peer 2.2.2.2 enable
      peer 3.3.3.3 enable
    #
    ospf 1
     area 0.0.0.0
      network 4.4.4.4 0.0.0.0
      network 192.168.2.0 0.0.0.255
    #
    return
  • SwitchC configuration file
    #
    sysname SwitchC
    #
    evpn-overlay enable
    #
    service-chain enable
    #
    service-chain service-path 100
     service-index 5 next-hop sf remote-ip 192.168.20.1
     service-index 4 path-terminal
    #
    bridge-domain 10
     vxlan vni 5010
     evpn
      route-distinguisher 21:1
      vpn-target 1:1 export-extcommunity
      vpn-target 1:1 import-extcommunity
    #
    bridge-domain 20
     vxlan vni 5020
     evpn
      route-distinguisher 23:1
      vpn-target 2:2 export-extcommunity
      vpn-target 2:2 import-extcommunity
    #
    acl number 3001
     rule 5 permit ip source 192.168.10.1 0.0.0.255 destination 30.1.1.1 0.0.0.255
    #
    traffic classifier nsh type and
     if-match vxlan acl 3001
    #
    traffic behavior nsh_1
     redirect service-path 100 service-index 5 
    #
    traffic policy nsh_2
     classifier nsh behavior nsh_1 precedence 5
    #
    interface Vbdif10
     ip address 192.168.10.10 255.255.255.0
     traffic-policy nsh_2 inbound 
    #
    interface Vbdif20
     ip address 192.168.20.10 255.255.255.0
    #
    interface 10GE1/0/1
     undo portswitch
     ip address 192.168.1.2 255.255.255.0
    #
    interface 10GE1/0/2
     undo portswitch
     ip address 192.168.2.1 255.255.255.0
    #
    interface LoopBack1
     ip address 3.3.3.3 255.255.255.255
    #
    interface Nve1
     source 3.3.3.3
     vni 5010 head-end peer-list protocol bgp
     vni 5020 head-end peer-list protocol bgp
    #
    bgp 100 instance evpn1
     peer 2.2.2.2 as-number 100
     peer 2.2.2.2 connect-interface LoopBack1
     peer 4.4.4.4 as-number 100
     peer 4.4.4.4 connect-interface LoopBack1
     #
     l2vpn-family evpn
      policy vpn-target
      peer 2.2.2.2 enable
      peer 4.4.4.4 enable
    #
    ospf 1
     area 0.0.0.0
      network 3.3.3.3 0.0.0.0
      network 192.168.1.0 0.0.0.255
      network 192.168.2.0 0.0.0.255
    #
    return
Translation
Download
Updated: 2019-05-08

Document ID: EDOC1100004362

Views: 4878

Downloads: 82

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