所选语种没有对应资源,请选择:

本站点使用Cookies,继续浏览表示您同意我们使用Cookies。Cookies和隐私政策>

提示

尊敬的用户,您的IE浏览器版本过低,为获取更好的浏览体验,请升级您的IE浏览器。

升级

S9300, S9300E, S9300X V200R010C00 配置指南-MPLS

本文档介绍了设备支持的MPLS相关配置。主要内容包括静态LSP的基本原理和配置过程、MPLS LDP的基本原理和配置过程、MPLS QoS的基本原理和配置过程、MPLS TE的基本原理和配置过程、MPLS OAM的基本原理和配置过程、Seamless MPLS的基本原理和配置过程,并提供相关的配置案例。
评分并提供意见反馈 :
华为采用机器翻译与人工审校相结合的方式将此文档翻译成不同语言,希望能帮助您更容易理解此文档的内容。 请注意:即使是最好的机器翻译,其准确度也不及专业翻译人员的水平。 华为对于翻译的准确性不承担任何责任,并建议您参考英文文档(已提供链接)。
配置MPLS OAM检测静态LSP连通性示例

配置MPLS OAM检测静态LSP连通性示例

通过配置MPLS OAM功能,来检测静态LSP全程链路的连通性并及时获知链路缺陷。

组网需求

图6-3所示的MPLS网络中,LSRA→LSRB→LSRC存在一条静态LSP隧道。

如果这条静态LSP隧道出现连通性故障,要求配置MPLS OAM机制对这条静态LSP的全程链路及节点进行连通性检测,当出节点LSRC检测到LSP缺陷后,分析缺陷类型,并由出节点LSRC通过反向通道将携带缺陷信息报文发送给入节点LSRA,从而使入节点LSRA及时获知缺陷。

说明:

请确保该场景下互联接口的STP处于未使能状态。同时将互连接口退出VLAN1,避免形成环路。因为在使能STP的环形网络中,如果用交换机的VLANIF接口构建三层网络,会导致某个端口被阻塞,从而导致三层业务不能正常运行。

图6-3  配置MPLS OAM基本检测功能组网图

配置思路

采用如下思路进行配置:

  1. 在LSRA上建立一条使用静态LSP的TE隧道,目的地是LSRC。
  2. 建立一条从LSRC经LSRD到达LSRA的静态CR-LSP,作为反向通道,向入节点通告故障。
  3. 在入节点LSRA配置OAM参数,并启动OAM功能。
  4. 在出节点LSRC配置OAM参数,使用OAM自动协议功能。

数据准备

为完成此配置例,需准备如下的数据:

  • 各节点的接口IP地址、各隧道接口名、隧道ID。
  • 发送的检测报文类型。
  • 反向通道的占用方式等参数。

操作步骤

  1. 配置各接口的IP地址及路由协议

    # 配置LSRA,按照图6-3配置设备各接口的IP地址和OSPF。LSRB、LSRC和LSRD的配置与LSRA相似,此处不再赘述。

    <Quidway> system-view
    [Quidway] sysname LSRA
    [LSRA] vlan batch 10 20
    [LSRA] interface Vlanif10
    [LSRA-Vlanif10] ip address 10.1.1.1 255.255.255.0
    [LSRA-Vlanif10] quit
    [LSRA] interface Vlanif20
    [LSRA-Vlanif20] ip address 10.1.2.1 255.255.255.0
    [LSRA-Vlanif20] quit
    [LSRA] interface gigabitEthernet1/0/0
    [LSRA-GigabitEthernet1/0/0] port link-type access
    [LSRA-GigabitEthernet1/0/0] port default vlan 10
    [LSRA-GigabitEthernet1/0/0] quit
    [LSRA] interface gigabitEthernet2/0/0
    [LSRA-GigabitEthernet2/0/0] port link-type access
    [LSRA-GigabitEthernet2/0/0] port default vlan 20
    [LSRA-GigabitEthernet2/0/0] quit
    [LSRA] interface loopback 1
    [LSRA-LoopBack1] ip address 1.1.1.1 255.255.255.255
    [LSRA-LoopBack1] quit
    [LSRA] ospf 1
    [LSRA-ospf-1] area 0
    [LSRA-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
    [LSRA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
    [LSRA-ospf-1-area-0.0.0.0] network 10.1.2.0 0.0.0.255
    [LSRA-ospf-1-area-0.0.0.0] quit
    [LSRA-ospf-1] quit
    

    配置完成后,各LSR可以互相Ping通对方的LSR-ID,在各LSR上执行display ip routing-table命令可以看到到达各LSR-ID的路由表项。

    以LSRA的显示为例:

    [LSRA] display ip routing-table
    Route Flags: R - relay, D - download to fib
    ------------------------------------------------------------------------------
    Routing Tables: Public
             Destinations : 12       Routes : 13
    
    Destination/Mask    Proto  Pre  Cost      Flags  NextHop         Interface
    
            1.1.1.1/32    Direct 0    0         D    127.0.0.1       LoopBack1
            2.2.2.2/32    OSPF   10   1         D    10.1.2.2        Vlanif20
            3.3.3.3/32    OSPF   10   2         D    10.1.1.2        Vlanif10
                          OSPF   10   2         D    10.1.2.2        Vlanif20
            4.4.4.4/32    OSPF   10   1         D    10.1.1.2        Vlanif10
           10.1.1.0/24    Direct 0    0         D    10.1.1.1        Vlanif10
           10.1.1.1/32    Direct 0    0         D    127.0.0.1       Vlanif10
           10.1.2.0/24    Direct 0    0         D    10.1.2.1        Vlanif20
           10.1.2.1/32    Direct 0    0         D    127.0.0.1       Vlanif20
           10.1.3.0/24    OSPF   10   2         D    10.1.2.2        Vlanif20
           10.1.4.0/24    OSPF   10   2         D    10.1.1.2        Vlanif10
          127.0.0.0/8     Direct 0    0         D    127.0.0.1       InLoopBack0
          127.0.0.1/32    Direct 0    0         D    127.0.0.1       InLoopBack0

  2. 建立被检测的静态LSP

    # 在LSRA上配置MPLS基本能力和MPLS TE基本能力。LSRB、LSRC和LSRD的配置与LSRA相似,此处不再赘述。

    [LSRA] mpls lsr-id 1.1.1.1
    [LSRA] mpls
    [LSRA-mpls] mpls te
    [LSRA-mpls] quit
    [LSRA] interface vlanif 10
    [LSRA-Vlanif10] mpls
    [LSRA-Vlanif10] mpls te
    [LSRA-Vlanif10] quit
    [LSRA] interface vlanif 20
    [LSRA-Vlanif20] mpls
    [LSRA-Vlanif20] mpls te
    [LSRA-Vlanif20] quit

    # 在LSRA上配置去往LSRC的MPLS TE隧道,使用静态LSP。

    [LSRA] interface tunnel 2
    [LSRA-Tunnel2] ip address unnumbered interface loopback 1
    [LSRA-Tunnel2] tunnel-protocol mpls te
    [LSRA-Tunnel2] destination 3.3.3.3
    [LSRA-Tunnel2] mpls te tunnel-id 200
    [LSRA-Tunnel2] mpls te signal-protocol static
    [LSRA-Tunnel2] mpls te commit
    [LSRA-Tunnel2] quit

    # 配置LSRA为静态LSP的入节点,使用TE隧道。

    [LSRA] static-lsp ingress tunnel-interface tunnel 2 destination 3.3.3.3 nexthop 10.1.2.2 out-label 20

    # 配置LSRB为静态LSP的中间节点。

    [LSRB] static-lsp transit oamlsp incoming-interface vlanif 20 in-label 20 nexthop 10.1.3.2 out-label 30

    # 配置LSRC为静态LSP的出节点,指定lsridtunnel-id

    [LSRC] static-lsp egress oamlsp incoming-interface vlanif 30 in-label 30 lsrid 1.1.1.1 tunnel-id 200

    配置完成后,在LSRA上执行display mpls te tunnel-interface命令,可以看到TE隧道使用静态信令,运行状态为UP。主要关注以下信息:

    [LSRA] display mpls te tunnel-interface
    ----------------------------------------------------------------
                               Tunnel2                          
    ----------------------------------------------------------------
    Tunnel State Desc   :  UP                             
    Active LSP          :  Primary LSP                              
    Session ID          :  200                                      
    Ingress LSR ID      :  1.1.1.1          Egress LSR ID:  3.3.3.3 
    Admin State         :  UP               Oper State   :  UP      
    Primary LSP State      : UP                                     
      Main LSP State       : READY               LSP ID  : 1        
    

    在LSRA上执行display mpls static-lsp命令,可以看到Tunnel2对应的静态LSP状态为Up。

    [LSRA] display mpls static-lsp
    TOTAL          : 1       STATIC LSP(S)
    UP             : 1       STATIC LSP(S)
    DOWN           : 0       STATIC LSP(S)   
    Name            FEC           I/O Label  I/O If                     Status
    Tunnel2         3.3.3.3/32     NULL/20    -/Vlanif20                 Up

  3. 建立反向通道

    # 在LSRC上配置去往LSRA的MPLS TE隧道,使用静态CR-LSP。

    [LSRC] interface tunnel 1
    [LSRC-Tunnel1] ip address unnumbered interface loopback 1
    [LSRC-Tunnel1] tunnel-protocol mpls te
    [LSRC-Tunnel1] destination 1.1.1.1
    [LSRC-Tunnel1] mpls te tunnel-id 100
    [LSRC-Tunnel1] mpls te signal-protocol cr-static
    [LSRC-Tunnel1] mpls te commit
    [LSRC-Tunnel1] quit

    # 配置LSRC为静态CR-LSP的入节点。

    [LSRC] static-cr-lsp ingress tunnel-interface tunnel 1 destination 1.1.1.1 nexthop 10.1.4.1 out-label 70

    # 配置LSRD为静态CR-LSP的中间节点。

    [LSRD] static-cr-lsp transit tunnel1 incoming-interface vlanif 40 in-label 70 nexthop 10.1.1.1 out-label 80

    # 配置LSRA为静态CR-LSP的出节点,指定lsridtunnel-id

    [LSRA] static-cr-lsp egress tunnel1 incoming-interface vlanif 10 in-label 80 lsrid 3.3.3.3 tunnel-id 100

    配置完成后,在LSRC上执行display mpls te tunnel-interface命令,可以看到反向TE隧道的运行状态为UP。主要关注如下信息:

    [LSRC] display mpls te tunnel-interface
    ----------------------------------------------------------------
                               Tunnel1                          
    ----------------------------------------------------------------
    Tunnel State Desc   :  UP                             
    Active LSP          :  Primary LSP                              
    Session ID          :  100                                      
    Ingress LSR ID      :  3.3.3.3          Egress LSR ID:  1.1.1.1 
    Admin State         :  UP               Oper State   :  UP      
    Primary LSP State      : UP                                     
      Main LSP State       : READY               LSP ID  : 1        
    

    在LSRC上执行display mpls static-cr-lsp命令,可以看到建立的静态CR-LSP状态为Up。

    [LSRC] display mpls static-cr-lsp
    TOTAL          : 1     STATIC CRLSP(S)
    UP             : 1     STATIC CRLSP(S)
    DOWN           : 0     STATIC CRLSP(S)
    Name            FEC            I/O Label  I/O If                      Status
    Tunnel1          1.1.1.1/32     NULL/70    -/Vlanif40                  Up

  4. 配置MPLS OAM功能

    # 在LSRA上配置入节点的MPLS OAM功能。采用缺省配置,即发送CV报文。反向通道的具体参数取决于出节点的配置。

    [LSRA] mpls
    [LSRA-mpls] mpls oam
    [LSRA-mpls] quit
    [LSRA] mpls oam ingress tunnel2 backward-lsp lsr-id 3.3.3.3 tunnel-id 100
    [LSRA] mpls oam ingress enable all

    # 在LSRC上配置出节点的MPLS OAM功能。

    [LSRC] mpls
    [LSRC-mpls] mpls oam
    [LSRC-mpls] quit

    # 配置出节点使用OAM自动协议,指定对名为oamlsp的LSP进行检测,反向通道为Tunnel1对应的LSP,采用独占方式。

    [LSRC] mpls oam egress lsp-name oamlsp auto-protocol backward-lsp tunnel 1 private

    出节点配置自动协议后,当出节点收到第一个正确的检测报文后,自动启动OAM功能。

    配置完成后,在入节点LSRA和出节点LSRC上查看LSP的MPLS OAM参数及状态信息。可以看到入节点和出节点都处于正常检测状态,没有故障。

    [LSRA] display mpls oam ingress all verbose
    
    --------------------------------------------------------------------------------
    
    Verbose information about NO.1 OAM at the ingress
    --------------------------------------------------------------------------------
    
    
    LSP basic information:                    OAM basic information:
    ---------------------------------------   --------------------------------------
    Tunnel-name         : Tunnel2             OAM-Index           : 256
    Lsp signal status   : Up                  OAM select board    : 1
    Lsp establish type  : Static lsp          Enable-state        : Manual enable
    Lsp ingress lsr-id  : 1.1.1.1             Ttsi/lsr-id         : 1.1.1.1
    Lsp tnl-id          : 200                 Ttsi/tunnel-id      : 200
    Lsp-id              : 1                   Compatibility Mode  : Router Mode
    
    OAM detect information:                   OAM backward information:
    ---------------------------------------   --------------------------------------
    Type                : CV                  Share attribute     : Private
    Frequency           : 1 s                 Lsp-name            : tunnel1
    Detect-state        : Start               Lsp ingress lsr-id  : 3.3.3.3
    Defect-state        : Non-defect          Lsp tnl-id          : 100
    Available-state     : Available           Lsp-id              : --
    Unavailable time (s): 0                   Lsp-inLabel         : 80
    Packet-priority     : 7                   Lsp signal status   : Up
    Bdi-frequency       : Detect frequency 
    Hardware Error Info : No error
    
    --------------------------------------------------------------------------------
    
    Total OAM Num:           	 1
    Total Start OAM Num:     	 1
    Total Defect OAM Num:    	 0
    Total Unavailable OAM Num:	 0
    
    [LSRC] display mpls oam egress all verbose
    
    --------------------------------------------------------------------------------
    
    Verbose information about NO.1 OAM at the egress
    --------------------------------------------------------------------------------
    
    
    LSP basic information:                    OAM basic information:
    ---------------------------------------   --------------------------------------
    Lsp name            : oamlsp              OAM-Index           : 256
    Lsp signal status   : Up                  OAM select board    : 1
    Lsp establish type  : Static lsp          Enable-state        : --
    Lsp incoming Label  : 30                  Auto-protocol       : Enable
    Lsp ingress lsr-id  : 1.1.1.1             Auto-overtime (s)   : 300
    Lsp tnl-id          : 200                 Ttsi/lsr-id         : 1.1.1.1
    Lsp-id              : --                  Ttsi/tunnel-id      : 200
    Lsp Incoming-int    : Vlanif30 
    
    OAM detect information:                   OAM backward information:
    ---------------------------------------   --------------------------------------
    Type                : CV                  Tunnel name         : Tunnel1
    Frequency           : 1 s                 Share attribute     : Private
    Detect-state        : Start               Lsp signal status   : Up
    Defect-state        : Non-defect          Bdi-frequency       : Detect frequency
    Available-state     : Available
    Unavailable time (s): 0
    Hardware Error Info : No error
    
    --------------------------------------------------------------------------------
    
    Total OAM Num:           	 1
    Total Start OAM Num:     	 1
    Total Defect OAM Num:    	 0
    Total Unavailable OAM Num:	 0
    

  5. 验证配置结果

    # 对LSRB的VLANIF30接口执行shutdown命令,模拟链路故障。

    [LSRB] interface vlanif 30
    [LSRB-Vlanif30] shutdown

    # 到LSRC上执行display mpls oam egress all verbose命令,可以看到LSRC发现了这个故障,缺陷状态为dLocv。

    [LSRC] display mpls oam egress all verbose
    
    --------------------------------------------------------------------------------
    
    Verbose information about NO.1 OAM at the egress
    --------------------------------------------------------------------------------
    
    
    LSP basic information:                    OAM basic information:
    ---------------------------------------   --------------------------------------
    Lsp name            : oamlsp              OAM-Index           : 256
    Lsp signal status   : Up                  OAM select board    : 1
    Lsp establish type  : Static lsp          Enable-state        : --
    Lsp incoming Label  : 30                  Auto-protocol       : Enable
    Lsp ingress lsr-id  : 1.1.1.1             Auto-overtime (s)   : 300
    Lsp tnl-id          : 200                 Ttsi/lsr-id         : 1.1.1.1
    Lsp-id              : --                  Ttsi/tunnel-id      : 200
    Lsp Incoming-int    : Vlanif30 
    
    OAM detect information:                   OAM backward information:
    ---------------------------------------   --------------------------------------
    Type                : CV                  Tunnel name         : Tunnel1
    Frequency           : 1 s                 Share attribute     : Private
    Detect-state        : Start               Lsp signal status   : Up
    Defect-type         : dLocv               Bdi-frequency       : Detect frequency
    Available-state     : Unavailable
    Unavailable time (s): 42
    Hardware Error Info : No error
    
    --------------------------------------------------------------------------------
    
    Total OAM Num:           	 1
    Total Start OAM Num:     	 1
    Total Defect OAM Num:    	 1
    Total Unavailable OAM Num:	 1

配置文件

  • LSRA的配置文件

    #
    sysname LSRA
    #
    vlan batch 10 20
    #
    mpls lsr-id 1.1.1.1
    mpls
     mpls te
     mpls oam
    #
    interface Vlanif10
     ip address 10.1.1.1 255.255.255.0
     mpls
     mpls te
    #
    interface Vlanif20
     ip address 10.1.2.1 255.255.255.0
     mpls
     mpls te
    #
    interface GigabitEthernet1/0/0
     port link-type access
     port default vlan 10
    #
    interface GigabitEthernet2/0/0
     port link-type access
     port default vlan 20
    #
    interface LoopBack1
     ip address 1.1.1.1 255.255.255.255
    #
    interface Tunnel2
     ip address unnumbered interface LoopBack1
     tunnel-protocol mpls te
     destination 3.3.3.3
     mpls te signal-protocol static
     mpls te tunnel-id 200
     mpls te commit
    #
    ospf 1
     area 0.0.0.0
      network 1.1.1.1 0.0.0.0
      network 10.1.1.0 0.0.0.255
      network 10.1.2.0 0.0.0.255
    #
    static-lsp ingress tunnel-interface Tunnel2 destination 3.3.3.3 nexthop 10.1.2.2 out-label 20
    static-cr-lsp egress tunnel1 incoming-interface Vlanif10 in-label 80 lsrid 3.3.3.3 tunnel-id 100
    #
    mpls oam ingress Tunnel2 backward-lsp lsr-id 3.3.3.3 tunnel-id 100
    mpls oam ingress enable Tunnel2
    #
    return
  • LSRB的配置文件

    #
    sysname LSRB
    #
    vlan batch 20 30
    #
    mpls lsr-id 2.2.2.2
    mpls
     mpls te
    #
    interface Vlanif20
     ip address 10.1.2.2 255.255.255.0
     mpls
     mpls te
    #
    interface Vlanif30
     ip address 10.1.3.1 255.255.255.0
     mpls
     mpls te
    #
    interface GigabitEthernet1/0/0
     port link-type access
     port default vlan 20
    #
    interface GigabitEthernet2/0/0
     port link-type access
     port default vlan 30
    #
    interface LoopBack1
     ip address 2.2.2.2 255.255.255.255
    #
    ospf 1
     area 0.0.0.0
      network 2.2.2.2 0.0.0.0
      network 10.1.2.0 0.0.0.255
      network 10.1.3.0 0.0.0.255
    #
    static-lsp transit oamlsp incoming-interface Vlanif20 in-label 20 nexthop 10.1.3.2 out-label 30
    #
    return
  • LSRC的配置文件

    #
    sysname LSRC
    #
    vlan batch 30 40
    #
    mpls lsr-id 3.3.3.3
    mpls
     mpls te
     mpls oam
    #
    interface Vlanif30
     ip address 10.1.3.2 255.255.255.0
     mpls
     mpls te
    #
    interface Vlanif40
     ip address 10.1.4.2 255.255.255.0
     mpls
     mpls te
    #
    interface GigabitEthernet1/0/0
     port link-type access
     port default vlan 40
    #
    interface GigabitEthernet2/0/0
     port link-type access
     port default vlan 30
    #
    interface LoopBack1
     ip address 3.3.3.3 255.255.255.255
    #
    interface Tunnel1
     ip address unnumbered interface LoopBack1
     tunnel-protocol mpls te
     destination 1.1.1.1
     mpls te signal-protocol cr-static
     mpls te tunnel-id 100
     mpls te commit
    #
    ospf 1
     area 0.0.0.0
      network 3.3.3.3 0.0.0.0
      network 10.1.3.0 0.0.0.255
      network 10.1.4.0 0.0.0.255
    #
    static-lsp egress oamlsp incoming-interface Vlanif30 in-label 30 lsrid 1.1.1.1 tunnel-id 200
    static-cr-lsp ingress tunnel-interface Tunnel1 destination 1.1.1.1 nexthop 10.1.4.1 out-label 70 bandwidth ct0 0
    #
    mpls oam egress lsp-name oamlsp backward-lsp Tunnel1 private
    #
    return
  • LSRD的配置文件

    #
    sysname LSRD
    #
    vlan batch 10 40
    #
    mpls lsr-id 4.4.4.4
    mpls
     mpls te
    #
    interface Vlanif10
     ip address 10.1.1.2 255.255.255.0
     mpls
     mpls te
    #
    interface Vlanif40
     ip address 10.1.4.1 255.255.255.0
     mpls
     mpls te
    #
    interface GigabitEthernet1/0/0
     port link-type access
     port default vlan 10
    #
    interface GigabitEthernet2/0/0
     port link-type access
     port default vlan 40
    #
    interface LoopBack1
     ip address 4.4.4.4 255.255.255.255
    #
    ospf 1
     area 0.0.0.0
      network 4.4.4.4 0.0.0.0
      network 10.1.1.0 0.0.0.255
      network 10.1.4.0 0.0.0.255
    #
    static-cr-lsp transit tunnel1 incoming-interface Vlanif40 in-label 70 nexthop 10.1.1.1 out-label 80 bandwidth ct0 0
    #
    return
翻译
下载文档
更新时间:2019-08-20

文档编号:EDOC1000141521

浏览量:8856

下载量:344

平均得分:
本文档适用于这些产品
相关文档
相关版本
Share
上一页 下一页