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

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

提示

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

升级

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

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

配置MPLS OAM保护倒换示例

通过配置MPLS OAM保护倒换功能,当主隧道发生故障时,能迅速恢复被中断的业务。

组网需求

图6-4所示的MPLS网络中,PE1和PE2之间存在三条双向LSP,在PE1和PE2上分别绑定三个Tunnel接口,Tunnel1、Tunnel2和Tunnel3。其中Tunnel1和Tunnel2作为主用隧道,Tunnel3作为保护隧道。

要求配置MPLS OAM保护倒换,当某一主隧道发生故障时,该主隧道上的流量被切换到保护隧道上,备LSP需要采用一条与主LSP完全不同的物理通道,迅速恢复PE1和PE2之间被中断的业务。

说明:

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

图6-4  配置MPLS OAM保护倒换组网图

交换机

接口

对应的VLANIF

IP地址

PE1

GE1/0/0

VLANIF10

10.1.1.1/24

PE1

GE2/0/0

VLANIF20

10.1.2.1/24

PE1

GE3/0/0

VLANIF30

10.1.3.1/24

PE1

GE3/0/1

VLANIF40

10.1.4.1/24

P1

GE1/0/0

VLANIF80

10.1.8.1/24

P1

GE2/0/0

VLANIF20

10.1.2.2/24

P1

GE3/0/0

VLANIF30

10.1.3.2/24

P1

GE3/0/1

VLANIF70

10.1.7.2/24

P2

GE1/0/0

VLANIF10

10.1.1.2/24

P2

GE2/0/0

VLANIF50

10.1.5.2/24

P3

GE1/0/0

VLANIF40

10.1.4.2/24

P3

GE2/0/0

VLANIF60

10.1.6.2/24

PE2

GE1/0/0

VLANIF50

10.1.5.1/24

PE2

GE2/0/0

VLANIF70

10.1.7.1/24

PE2

GE3/0/0

VLANIF80

10.1.8.2/24

PE2

GE3/0/1

VLANIF60

10.1.6.1/24

配置思路

采用如下思路进行配置:

  1. 在各节点上配置VLAN和VLANIF接口,配置各VLANIF接口IP地址和OSPF。
  2. 在各节点上使能MPLS、MPLS TE、MPLS OAM。
  3. 在PE1和PE2上创建三个Tunnel接口(Tunnel1、Tunnel2和Tunnel3),其中两个作为主隧道及其反向隧道的Tunnel接口,另一个作为保护隧道及其反向隧道的Tunnel接口。
  4. 在PE1配置两条静态CR-LSP并将静态LSP分别与Tunnel1和Tunnel3绑定。
  5. 在PE1上配置一条到PE2的RSVP-TE隧道。
  6. 在PE2上配置三条到PE1的静态CR-LSP作为反向LSP,分别绑定Tunnel1、Tunnel2和Tunnel3
  7. 设置MPLS OAM参数并使能MPLS OAM检测双向LSP。

数据准备

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

  • 各节点的接口IP地址、各隧道接口名和隧道ID。
  • MPLS OAM检测报文类型。
  • 隧道保护组参数,包括倒换延迟时间、回切模式、回切等待时间。

操作步骤

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

    # 配置PE1,按照图6-4配置设备各接口的IP地址和OSPF。PE2、P1、P2和P3的配置与PE1相似,此处不再赘述。

    <Quidway> system-view
    [Quidway] sysname PE1
    [PE1] vlan batch 10 20 30 40
    [PE1] interface vlanif 10
    [PE1-Vlanif10] ip address 10.1.1.1 255.255.255.0
    [PE1-Vlanif10] quit
    [PE1] interface vlanif 20
    [PE1-Vlanif20] ip address 10.1.2.1 255.255.255.0
    [PE1-Vlanif20] quit
    [PE1] interface vlanif 30
    [PE1-Vlanif30] ip address 10.1.3.1 255.255.255.0
    [PE1-Vlanif30] quit
    [PE1] interface vlanif 40
    [PE1-Vlanif40] ip address 10.1.4.1 255.255.255.0
    [PE1-Vlanif40] quit
    [PE1] interface gigabitEthernet 1/0/0
    [PE1-GigabitEthernet1/0/0] port link-type access
    [PE1-GigabitEthernet1/0/0] port default vlan 10
    [PE1-GigabitEthernet1/0/0] quit
    [PE1] interface gigabitEthernet 2/0/0
    [PE1-GigabitEthernet2/0/0] port link-type access
    [PE1-GigabitEthernet2/0/0] port default vlan 20
    [PE1-GigabitEthernet2/0/0] quit
    [PE1] interface gigabitEthernet 3/0/0
    [PE1-GigabitEthernet3/0/0] port link-type access
    [PE1-GigabitEthernet3/0/0] port default vlan 30
    [PE1-GigabitEthernet3/0/0] quit
    [PE1] interface gigabitEthernet 3/0/1
    [PE1-GigabitEthernet3/0/1] port link-type access
    [PE1-GigabitEthernet3/0/1] port default vlan 40
    [PE1-GigabitEthernet3/0/1] quit
    [PE1] interface loopback 1
    [PE1-LoopBack1] ip address 1.1.1.1 255.255.255.255
    [PE1-LoopBack1] quit
    [PE1] ospf 100
    [PE1-ospf-100] area 0
    [PE1-ospf-100-area-0.0.0.0] network 1.1.1.1 0.0.0.0
    [PE1-ospf-100-area-0.0.0.0] network 10.1.1.0 0.0.0.255
    [PE1-ospf-100-area-0.0.0.0] network 10.1.2.0 0.0.0.255
    [PE1-ospf-100-area-0.0.0.0] network 10.1.3.0 0.0.0.255
    [PE1-ospf-100-area-0.0.0.0] network 10.1.4.0 0.0.0.255
    [PE1-ospf-100-area-0.0.0.0] quit
    [PE1-ospf-100] quit
    

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

  2. 在各节点的全局和物理接口上使能MPLS和MPLS TE

    # 配置PE1。PE2、P1、P2和P3的配置与PE1类似,此处不再赘述。

    [PE1] mpls lsr-id 1.1.1.1
    [PE1] mpls
    [PE1-mpls] mpls te
    [PE1-mpls] quit
    [PE1] interface vlanif 10
    [PE1-Vlanif10] mpls
    [PE1-Vlanif10] mpls te
    [PE1-Vlanif10] quit
    [PE1] interface vlanif 20
    [PE1-Vlanif20] mpls
    [PE1-Vlanif20] mpls te
    [PE1-Vlanif20] quit
    [PE1] interface vlanif 30
    [PE1-Vlanif30] mpls
    [PE1-Vlanif30] mpls te
    [PE1-Vlanif30] quit
    [PE1] interface vlanif 40
    [PE1-Vlanif40] mpls
    [PE1-Vlanif40] mpls te
    [PE1-Vlanif40] quit
    

  3. 配置Tunnel接口

    # 在PE1和PE2上配置Tunnel1和Tunnel2作为主隧道的Tunnel接口。配置Tunnel3作为保护隧道的Tunnel接口。Tunnel3同时保护Tunnel1和Tunnel2。Tunnel2信令协议为RSVP-TE,Tunnel1和Tunnel3信令协议为“cr-static”。

    # 配置PE1。

    [PE1] interface tunnel 1
    [PE1-Tunnel1] description Working tunnel-1 to PE2
    [PE1-Tunnel1] ip address unnumbered interface loopback 1
    [PE1-Tunnel1] tunnel-protocol mpls te
    [PE1-Tunnel1] destination 5.5.5.5
    [PE1-Tunnel1] mpls te signal-protocol cr-static
    [PE1-Tunnel1] mpls te tunnel-id 100
    [PE1-Tunnel1] mpls te commit
    [PE1-Tunnel1] quit
    [PE1] interface tunnel 2
    [PE1-Tunnel2] description Working tunnel-2 to PE2
    [PE1-Tunnel2] ip address unnumbered interface loopback 1
    [PE1-Tunnel2] tunnel-protocol mpls te
    [PE1-Tunnel2] destination 5.5.5.5
    [PE1-Tunnel2] mpls te signal-protocol rsvp-te
    [PE1-Tunnel2] mpls te tunnel-id 101
    [PE1-Tunnel2] mpls te commit
    [PE1-Tunnel2] quit
    [PE1] interface tunnel 3
    [PE1-Tunnel3] description Protection tunnel to PE2
    [PE1-Tunnel3] ip address unnumbered interface loopback 1
    [PE1-Tunnel3] tunnel-protocol mpls te
    [PE1-Tunnel3] destination 5.5.5.5
    [PE1-Tunnel3] mpls te signal-protocol cr-static
    [PE1-Tunnel3] mpls te tunnel-id 102
    [PE1-Tunnel3] mpls te commit
    [PE1-Tunnel3] quit

    # 配置PE2。

    [PE2] interface tunnel 1
    [PE2-Tunnel1] description Working tunnel-1 to PE1
    [PE2-Tunnel1] ip address unnumbered interface loopback 1
    [PE2-Tunnel1] tunnel-protocol mpls te
    [PE2-Tunnel1] destination 1.1.1.1
    [PE2-Tunnel1] mpls te signal-protocol cr-static
    [PE2-Tunnel1] mpls te tunnel-id 100
    [PE2-Tunnel1] mpls te commit
    [PE2-Tunnel1] quit
    [PE2] interface tunnel 2
    [PE2-Tunnel2] description Working tunnel-2 to PE1
    [PE2-Tunnel2] ip address unnumbered interface loopback 1
    [PE2-Tunnel2] tunnel-protocol mpls te
    [PE2-Tunnel2] destination 1.1.1.1
    [PE2-Tunnel2] mpls te signal-protocol rsvp-te
    [PE2-Tunnel2] mpls te tunnel-id 101
    [PE2-Tunnel2] mpls te commit
    [PE2-Tunnel2] quit
    [PE2] interface tunnel 3
    [PE2-Tunnel3] description Protection tunnel to PE1
    [PE2-Tunnel3] ip address unnumbered interface loopback 1
    [PE2-Tunnel3] tunnel-protocol mpls te
    [PE2-Tunnel3] destination 1.1.1.1
    [PE2-Tunnel3] mpls te signal-protocol cr-static
    [PE2-Tunnel3] mpls te tunnel-id 102
    [PE2-Tunnel3] mpls te commit
    [PE2-Tunnel3] quit

  4. 配置两条从PE1到PE2的静态CR-LSP,并将静态CR-LSP与Tunnel接口绑定。

    # 配置PE1。

    [PE1] static-cr-lsp ingress Tunnel1 destination 5.5.5.5 nexthop 10.1.2.2 out-label 16
    [PE1] static-cr-lsp ingress Tunnel3 destination 5.5.5.5 nexthop 10.1.4.2 out-label 30

    # 配置P1。

    [P1] static-cr-lsp transit PE1toPE2-1 incoming-interface vlanif 20 in-label 16 nexthop 10.1.7.1 out-label 17

    # 配置P3。

    [P3] static-cr-lsp transit PE1toPE2-3 incoming-interface vlanif 40 in-label 30 nexthop 10.1.6.1 out-label 31

    # 配置PE2。

    [PE2] static-cr-lsp egress PE1toPE2-1 incoming-interface vlanif 70 in-label 17 lsrid 1.1.1.1 tunnel-id 100
    [PE2] static-cr-lsp egress PE1toPE2-3 incoming-interface vlanif 60 in-label 31 lsrid 1.1.1.1 tunnel-id 102

    完成此步骤后,在PE1和PE2上执行命令display mpls te tunnel,可看到创建的隧道。

    以PE1的显示为例。

    [PE1] display mpls te tunnel
    ------------------------------------------------------------------------------
    Ingress LsrId    Destination      LSPID   In/Out Label     R  Tunnel-name     
    ------------------------------------------------------------------------------
    1.1.1.1          5.5.5.5          1       --/16            I  Tunnel1         
    1.1.1.1          5.5.5.5          1       --/30            I  Tunnel3

  5. 配置RSVP-TE隧道

    # 配置PE1。

    [PE1] mpls
    [PE1-mpls] mpls rsvp-te
    [PE1-mpls] mpls te cspf
    [PE1-mpls] quit
    [PE1] interface vlanif 30
    [PE1-Vlanif30] mpls rsvp-te
    [PE1-Vlanif30] quit
    [PE1] ospf 100
    [PE1-ospf-100] opaque-capability enable
    [PE1-ospf-100] area 0
    [PE1-ospf-100-area-0.0.0.0] mpls-te enable
    [PE1-ospf-100-area-0.0.0.0] quit
    [PE1-ospf-100] quit

    # 配置P1。

    [P1] mpls
    [P1-mpls] mpls rsvp-te
    [P1-mpls] mpls te cspf
    [P1-mpls] quit
    [P1] interface vlanif 30
    [P1-Vlanif30] mpls rsvp-te
    [P1-Vlanif30] quit
    [P1] interface vlanif 80
    [P1-Vlanif80] mpls rsvp-te
    [P1-Vlanif80] quit
    [P1] ospf 100
    [P1-ospf-100] opaque-capability enable
    [P1-ospf-100] area 0
    [P1-ospf-100-area-0.0.0.0] mpls-te enable
    [P1-ospf-100-area-0.0.0.0] quit
    [P1-ospf-100] quit

    # 配置PE2。

    [PE2] mpls
    [PE2-mpls] mpls rsvp-te
    [PE2-mpls] mpls te cspf
    [PE2-mpls] quit
    [PE2] interface vlanif 80
    [PE2-Vlanif80] mpls rsvp-te
    [PE2-Vlanif80] quit
    [PE2] ospf 100
    [PE2-ospf-100] opaque-capability enable
    [PE2-ospf-100] area 0
    [PE2-ospf-100-area-0.0.0.0] mpls-te enable
    [PE2-ospf-100-area-0.0.0.0] quit
    [PE2-ospf-100] quit

    在PE1上执行命令display mpls te tunnel-interface tunnel 2查看隧道Tunnel2的信息。

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

  6. 配置三条从PE2到PE1的静态CR-LSP并将三条静态CR-LSP分别与Tunnel接口绑定。

    # 配置PE2。

    [PE2] static-cr-lsp ingress Tunnel1 destination 1.1.1.1 nexthop 10.1.8.1 out-label 17
    [PE2] static-cr-lsp ingress Tunnel2 destination 1.1.1.1 nexthop 10.1.7.2 out-label 21
    [PE2] static-cr-lsp ingress Tunnel3 destination 1.1.1.1 nexthop 10.1.5.2 out-label 31

    # 配置P1。

    [P1] static-cr-lsp transit PE2toPE1-2 incoming-interface vlanif 70 in-label 21 nexthop 10.1.2.1 out-label 16
    [P1] static-cr-lsp transit PE2toPE1-1 incoming-interface vlanif 80 in-label 17 nexthop 10.1.3.1 out-label 20

    # 配置P2。

    [P2] static-cr-lsp transit PE2toPE1-3 incoming-interface vlanif 50 in-label 31 nexthop 10.1.1.1 out-label 30

    # 配置PE1。

    [PE1] static-cr-lsp egress PE2toPE1-2 incoming-interface vlanif 20 in-label 16 lsrid 5.5.5.5 tunnel-id 101
    [PE1] static-cr-lsp egress PE2toPE1-1 incoming-interface vlanif 30 in-label 20 lsrid 5.5.5.5 tunnel-id 100
    [PE1] static-cr-lsp egress PE2toPE1-3 incoming-interface vlanif 10 in-label 30 lsrid 5.5.5.5 tunnel-id 102

  7. 使能MPLS OAM并配置MPLS OAM检测LSP

    # 配置PE1。

    [PE1] mpls
    [PE1-mpls] mpls oam
    [PE1-mpls] quit
    [PE1] mpls oam ingress Tunnel1
    [PE1] mpls oam ingress Tunnel2
    [PE1] mpls oam ingress Tunnel3
    [PE1] mpls oam ingress enable all
    [PE1] mpls oam egress lsp-name PE2toPE1-1
    [PE1] mpls oam egress lsp-name PE2toPE1-2
    [PE1] mpls oam egress lsp-name PE2toPE1-3
    [PE1] mpls oam egress enable all

    # 配置PE2。

    [PE2] mpls
    [PE2-mpls] mpls oam
    [PE2-mpls] quit
    [PE2] mpls oam ingress Tunnel1
    [PE2] mpls oam ingress Tunnel2
    [PE2] mpls oam ingress Tunnel3
    [PE2] mpls oam ingress enable all
    [PE2] mpls oam egress lsr-id 1.1.1.1 tunnel-id 101
    [PE2] mpls oam egress lsp-name PE1toPE2-1
    [PE2] mpls oam egress lsp-name PE1toPE2-3
    [PE2] mpls oam egress enable all

    完成此步骤后,执行命令display mpls oam ingress all verbose查看MPLS OAM参数和LSP的状态,可发现被检测的LSP状态为“Non-defect”。

    以PE1的显示为例。

    [PE1] display mpls oam ingress all verbose
                                                                                                                                        
    --------------------------------------------------------------------------------                                                    
                                                                                                                                        
    Verbose information about NO.1 OAM at the ingress                                                                                   
    --------------------------------------------------------------------------------                                                    
                                                                                                                                        
                                                                                                                                        
    LSP basic information:                    OAM basic information:                                                                    
    ---------------------------------------   --------------------------------------                                                    
    Tunnel-name         : Tunnel1             OAM-Index           : 1024                                                                
    Lsp signal status   : Up                  OAM select board    : 0                                                                   
    Lsp establish type  : Static-cr-lsp       Enable-state        : Manual enable                                                       
    Lsp ingress lsr-id  : 1.1.1.1             Ttsi/lsr-id         : 1.1.1.1                                                             
    Lsp tnl-id          : 100                 Ttsi/tunnel-id      : 100                                                                 
    Lsp-id              : 1                   Compatibility Mode  : Router Mode                                                         
                                                                                                                                        
    OAM detect information:                   OAM backward information:                                                                 
    ---------------------------------------   --------------------------------------                                                    
    Type                : CV                  Share attribute     : Share                                                               
    Frequency           : 1 s                 Lsp-name            : --                                                                  
    Detect-state        : Start               Lsp ingress lsr-id  : --                                                                  
    Defect-state        : Non-defect          Lsp tnl-id          : --                                                                  
    Available-state     : Available           Lsp-id              : --                                                                  
    Unavailable time (s): 0                   Lsp-inLabel         : --                                                                  
    Packet-priority     : 7                   Lsp signal status   : --                                                                  
    Bdi-frequency       : Detect frequency                                                                                              
    Hardware Error Info : No error                                                                                                      
                                                                                                                                        
    --------------------------------------------------------------------------------                                                    
                                                                                                                                        
    Verbose information about NO.2 OAM at the ingress                                                                                   
    --------------------------------------------------------------------------------                                                    
                                                                                                                                        
                                                                                                                                        
    LSP basic information:                    OAM basic information:                                                                    
    ---------------------------------------   --------------------------------------                                                    
    Tunnel-name         : Tunnel2             OAM-Index           : 1025                                                                
    Lsp signal status   : Up                  OAM select board    : 0                                                                   
    Lsp establish type  : Rsvp lsp            Enable-state        : Manual enable                                                       
    Lsp ingress lsr-id  : 1.1.1.1             Ttsi/lsr-id         : 1.1.1.1                                                             
    Lsp tnl-id          : 101                 Ttsi/tunnel-id      : 101                                                                 
    Lsp-id              : 1                   Compatibility Mode  : Router Mode                                                         
                                                                                                                                        
    OAM detect information:                   OAM backward information:                                                                 
    ---------------------------------------   --------------------------------------                                                    
    Type                : CV                  Share attribute     : Share                                                               
    Frequency           : 1 s                 Lsp-name            : --                                                                  
    Detect-state        : Start               Lsp ingress lsr-id  : --                                                                  
    Defect-state        : Non-defect          Lsp tnl-id          : --                                                                  
    Available-state     : Available           Lsp-id              : --                                                                  
    Unavailable time (s): 0                   Lsp-inLabel         : --                                                                  
    Packet-priority     : 7                   Lsp signal status   : --                                                                  
    Bdi-frequency       : Detect frequency                                                                                              
    Hardware Error Info : No error                                                                                                      
                                                                                                                                        
    --------------------------------------------------------------------------------                                                    
                                                                                                                                        
    Verbose information about NO.3 OAM at the ingress                                                                                   
    --------------------------------------------------------------------------------                                                    
                                                                                                                                        
                                                                                                                                        
    LSP basic information:                    OAM basic information:                                                                    
    ---------------------------------------   --------------------------------------                                                    
    Tunnel-name         : Tunnel3             OAM-Index           : 1026                                                                
    Lsp signal status   : Up                  OAM select board    : 0                                                                   
    Lsp establish type  : Static-cr-lsp       Enable-state        : Manual enable                                                       
    Lsp ingress lsr-id  : 1.1.1.1             Ttsi/lsr-id         : 1.1.1.1                                                             
    Lsp tnl-id          : 102                 Ttsi/tunnel-id      : 102                                                                 
    Lsp-id              : 1                   Compatibility Mode  : Router Mode                                                         
                                                                                                                                        
    OAM detect information:                   OAM backward information:                                                                 
    ---------------------------------------   --------------------------------------                                                    
    Type                : CV                  Share attribute     : Share                                                               
    Frequency           : 1 s                 Lsp-name            : --                                                                  
    Detect-state        : Start               Lsp ingress lsr-id  : --                                                                  
    Defect-state        : Non-defect          Lsp tnl-id          : --                                                                  
    Available-state     : Available           Lsp-id              : --                                                                  
    Unavailable time (s): 0                   Lsp-inLabel         : --                                                                  
    Packet-priority     : 7                   Lsp signal status   : --                                                                  
    Bdi-frequency       : Detect frequency                                                                                              
    Hardware Error Info : No error                                                                                                      
                                                                                                                                        
    --------------------------------------------------------------------------------                                                    
                                                                                                                                        
    Total OAM Num:                   3                                                                                                  
    Total Start OAM Num:             3                                                                                                  
    Total Defect OAM Num:            0                                                                                                  
    Total Unavailable OAM Num:       0 

  8. 配置隧道保护组

    # 在PE1上配置Tunnel1和Tunnel2作为主隧道,Tunnel3作为保护隧道,采用revertive模式,WTR为2分钟。

    [PE1] interface tunnel 1
    [PE1-Tunnel1] mpls te protection tunnel 102 mode revertive wtr 4
    [PE1-Tunnel1] mpls te commit
    [PE1-Tunnel1] quit
    [PE1] interface tunnel 2
    [PE1-Tunnel2] mpls te protection tunnel 102 mode revertive wtr 4
    [PE1-Tunnel2] mpls te commit
    [PE1-Tunnel2] quit

    # 完成此步骤后,在PE上执行命令display mpls te protection tunnel all,可发现所有隧道接口都为“Non-defect”状态,流量由主隧道转发。

    以PE1的显示为例。

    [PE1] display mpls te protection tunnel all
    ------------------------------------------------------------------------                                                            
    No. Work-tunnel status  /id  Protect-tunnel status /id    Switch-Result                                                             
    ------------------------------------------------------------------------                                                            
    1          non-defect   /100        non-defect     /102     work-tunnel                                                             
    2          non-defect   /101        non-defect     /102     work-tunnel

    # 在PE上执行命令display mpls te protection binding protect-tunnel,可发现Tunnel3同时保护了Tunnel1和Tunnel2

    以PE1的显示为例。

    [PE1] display mpls te protection binding protect-tunnel 102
    ------------------------------------------------------------------------                                                            
    Binding information of( tunnel id:  102 )                                                                                           
    ------------------------------------------------------------------------                                                            
        Protect-tunnel id                    :102                                                                                       
        Protect-tunnel name                  :Tunnel3                                                                                   
        Maximum number of bound work-tunnels :16                                                                                        
        Currently bound work-tunnels         :Total( 2 )                                                                                
                                             :Tunnel1                                                                                   
                                             :Tunnel2

  9. 检查配置结果

    在PE上执行命令display mpls te protection tunnel interface tunnel interface-number verbose,可查看保护组的详细信息。以PE1上的Tunnel1的显示为例。
    [PE1]display mpls te protection tunnel interface tunnel 1 verbose
    ----------------------------------------------------------------                                                                    
    Verbose information about the No.1 protection-group                                                                                 
    ----------------------------------------------------------------                                                                    
    Work-tunnel id                           : 100                                                                                      
    Protect-tunnel id                        : 102                                                                                      
    Work-tunnel name                         : Tunnel1                                                                                  
    Protect-tunnel name                      : Tunnel3                                                                                  
    Work-tunnel reverse-lsp                  : -                                                                                        
    Protect-tunnel reverse-lsp               : -                                                                                        
    Bridge type                              : 1:1                                                                                      
    Switch type                              : unidirectional                                                                           
    Switch result                            : work-tunnel                                                                              
    Tunnel using Best-Effort                 : none                                                                                     
    Tunnel using Ordinary                    : none                                                                                     
    Work-tunnel frr in use                   : none                                                                                     
    Work-tunnel defect state                 : non-defect                                                                               
    Protect-tunnel defect state              : non-defect                                                                               
    Work-tunnel forward-lsp defect state     : non-defect                                                                               
    Protect-tunnel forward-lsp defect state  : non-defect                                                                               
    Work-tunnel reverse-lsp defect state     : non-defect                                                                               
    Protect-tunnel reverse-lsp defect state  : non-defect                                                                               
    HoldOff config time                      : 0ms                                                                                      
    HoldOff remain time                      : -                                                                                        
    WTR config time                          : 120s                                                                                     
    WTR remain time                          : -                                                                                        
    Mode                                     : revertive                                                                                
    Using same path                          : -                                                                                        
    Local state                              : no request                                                                               
    Far end request                          : no request                                                                               

    # 在PE1的Tunnel1上执行命令mpls te protect-switch manual,手工触发保护倒换。

    [PE1] interface tunnel 1
    [PE1-Tunnel1] mpls te protect-switch manual
    [PE1-Tunnel1] quit

    # 在PE1上执行命令display mpls te protection tunnel all,可发现Tunnel1Switch-Result字段为“protect-tunnel”。

    [PE1] display mpls te protection tunnel all
    ------------------------------------------------------------------------
    No. Work-tunnel status  /id  Protect-tunnel status /id      Switch-Result
    ------------------------------------------------------------------------
    1          non-defect   /100       non-defect     /102   protect-tunnel
    2          non-defect   /101       non-defect     /102      work-tunnel

    # 在PE1的Vlanif40接口上执行命令shutdown模拟保护隧道的物理链路故障。

    [PE1] interface vlanif 40
    [PE1-Vlanif40] shutdown
    [PE1-Vlanif40] quit

    # 在PE1上执行命令display mpls te protection tunnel all可发现Tunnel1的“Protect-tunnel status”字段为“in-defect”,“Switch-Result”字段为“work-tunnel”。

    [PE1] display mpls te protection tunnel all
    ------------------------------------------------------------------------                                                            
    No. Work-tunnel status  /id  Protect-tunnel status /id    Switch-Result                                                             
    ------------------------------------------------------------------------                                                            
    1          non-defect   /100         in defect     /102     work-tunnel                                                             
    2          non-defect   /101         in defect     /102     work-tunnel                                                             
    说明:

    当所有隧道都没有故障,且主隧道的Tunnel接口上配置了mpls te protect-switch manual命令,则流量被切换到保护隧道上。此时,如果保护隧道的链路发生故障,流量被切换回主隧道且主隧道Tunnel接口下的mpls te protect-switch manual命令会被自动删除。那是因为链路故障会触发Signaling Failure倒换请求,Signaling Failure倒换请求的优先级高于手工倒换。

配置文件

  • PE1的配置文件

    #
    sysname PE1
    #
    vlan batch 10 20 30 40
    #
    mpls lsr-id 1.1.1.1
    mpls
     mpls te
     mpls rsvp-te
     mpls oam
     mpls te cspf
    #
    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 Vlanif30
     ip address 10.1.3.1 255.255.255.0
     mpls
     mpls te
     mpls rsvp-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 20
    #
    interface GigabitEthernet3/0/0
     port link-type access
     port default vlan 30
    #
    interface GigabitEthernet3/0/1
     port link-type access
     port default vlan 40
    #
    interface LoopBack1
     ip address 1.1.1.1 255.255.255.255
    #
    interface Tunnel1
     description Working tunnel-1 to PE2
     ip address unnumbered interface LoopBack1
     tunnel-protocol mpls te
     destination 5.5.5.5
     mpls te signal-protocol cr-static
     mpls te tunnel-id 100
     mpls te protection tunnel 102 mode revertive wtr 4
     mpls te commit
    #
    interface Tunnel2
     description Working tunnel-2 to PE2
     ip address unnumbered interface LoopBack1
     tunnel-protocol mpls te
     destination 5.5.5.5
     mpls te tunnel-id 101
     mpls te protection tunnel 102 mode revertive wtr 4
     mpls te commit
    #
    interface Tunnel3
     description Protection tunnel to PE2
     ip address unnumbered interface LoopBack1
     tunnel-protocol mpls te
     destination 5.5.5.5
     mpls te signal-protocol cr-static
     mpls te tunnel-id 102
     mpls te commit
    #
    ospf 100
     opaque-capability enable
     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
      network 10.1.3.0 0.0.0.255
      network 10.1.4.0 0.0.0.255
      mpls-te enable
    #
    static-cr-lsp ingress Tunnel1 destination 5.5.5.5 nexthop 10.1.2.2 out-label 16 bandwidth ct0 0
    static-cr-lsp ingress Tunnel3 destination 5.5.5.5 nexthop 10.1.4.2 out-label 30 bandwidth ct0 0
    static-cr-lsp egress PE2toPE1-2 incoming-interface Vlanif20 in-label 16 lsrid 5.5.5.5 tunnel-id 101
    static-cr-lsp egress PE2toPE1-1 incoming-interface Vlanif30 in-label 20 lsrid 5.5.5.5 tunnel-id 100
    static-cr-lsp egress PE2toPE1-3 incoming-interface Vlanif10 in-label 30 lsrid 5.5.5.5 tunnel-id 102
    #
    mpls oam ingress Tunnel1
    mpls oam ingress enable Tunnel1
    mpls oam ingress Tunnel2
    mpls oam ingress enable Tunnel2
    mpls oam ingress Tunnel3
    mpls oam ingress enable Tunnel3
    mpls oam egress lsp-name PE2toPE1-1
    mpls oam egress lsp-name PE2toPE1-2
    mpls oam egress lsp-name PE2toPE1-3
    #
    return
  • P2的配置文件

    #
    sysname P2
    #
    vlan batch 10 50
    #
    mpls lsr-id 2.2.2.2
    mpls
     mpls te
    #
    interface Vlanif10
     ip address 10.1.1.2 255.255.255.0
     mpls
     mpls te
    #
    interface Vlanif50
     ip address 10.1.5.2 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 50
    #
    interface LoopBack1
     ip address 2.2.2.2 255.255.255.255
    #
    ospf 100
     area 0.0.0.0
      network 2.2.2.2 0.0.0.0
      network 10.1.1.0 0.0.0.255
      network 10.1.5.0 0.0.0.255
    #
    static-cr-lsp transit PE2toPE1-3 incoming-interface Vlanif50 in-label 31 nexthop 10.1.1.1 out-label 30 bandwidth ct0 0
    #
    return
  • P1的配置文件

    #
    sysname P1
    #
    vlan batch 20 30 70 80
    #
    mpls lsr-id 3.3.3.3
    mpls
     mpls te
     mpls rsvp-te
     mpls te cspf
    #
    interface Vlanif20
     ip address 10.1.2.2 255.255.255.0
     mpls
     mpls te
    #
    interface Vlanif30
     ip address 10.1.3.2 255.255.255.0
     mpls
     mpls te
     mpls rsvp-te
    #
    interface Vlanif70
     ip address 10.1.7.2 255.255.255.0
     mpls
     mpls te
    #
    interface Vlanif80
     ip address 10.1.8.1 255.255.255.0
     mpls
     mpls te
     mpls rsvp-te
    #
    interface GigabitEthernet1/0/0
     port link-type access
     port default vlan 80
    #
    interface GigabitEthernet2/0/0
     port link-type access
     port default vlan 20
    #
    interface GigabitEthernet3/0/0
     port link-type access
     port default vlan 30
    #
    interface GigabitEthernet3/0/1
     port link-type access
     port default vlan 70
    #
    interface LoopBack1
     ip address 3.3.3.3 255.255.255.255
    #
    ospf 100
     opaque-capability enable
     area 0.0.0.0
      network 3.3.3.3 0.0.0.0
      network 10.1.2.0 0.0.0.255
      network 10.1.3.0 0.0.0.255
      network 10.1.7.0 0.0.0.255
      network 10.1.8.0 0.0.0.255
      mpls-te enable
    #
    static-cr-lsp transit PE1toPE2-1 incoming-interface Vlanif20 in-label 16 nexthop 10.1.7.1 out-label 17 bandwidth ct0 0
    static-cr-lsp transit PE2toPE1-2 incoming-interface Vlanif70 in-label 21 nexthop 10.1.2.1 out-label 16 bandwidth ct0 0
    static-cr-lsp transit PE2toPE1-1 incoming-interface Vlanif80 in-label 17 nexthop 10.1.3.1 out-label 20 bandwidth ct0 0
    #
    return
  • P3的配置文件

    #
    sysname P3
    #
    vlan batch 40 60
    #
    mpls lsr-id 4.4.4.4
    mpls
     mpls te
    #
    interface Vlanif40
     ip address 10.1.4.2 255.255.255.0
     mpls
     mpls te
    #
    interface Vlanif60
     ip address 10.1.6.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 60
    #
    interface LoopBack1
     ip address 4.4.4.4 255.255.255.255
    #
    ospf 100
     area 0.0.0.0
      network 4.4.4.4 0.0.0.0
      network 10.1.4.0 0.0.0.255
      network 10.1.6.0 0.0.0.255
    #
    static-cr-lsp transit PE1toPE2-3 incoming-interface Vlanif40 in-label 30 nexthop 10.1.6.1 out-label 31 bandwidth ct0 0
    #
    return
  • PE2的配置文件

    #
    sysname PE2
    #
    vlan batch 50 60 70 80
    #
    mpls lsr-id 5.5.5.5
    mpls
     mpls te
     mpls rsvp-te
     mpls oam
     mpls te cspf
    #
    interface Vlanif50
     ip address 10.1.5.1 255.255.255.0
     mpls
     mpls te
    #
    interface Vlanif60
     ip address 10.1.6.1 255.255.255.0
     mpls
     mpls te
    #
    interface Vlanif70
     ip address 10.1.7.1 255.255.255.0
     mpls
     mpls te
    #
    interface Vlanif80
     ip address 10.1.8.2 255.255.255.0
     mpls
     mpls te
     mpls rsvp-te
    #
    interface GigabitEthernet1/0/0
     port link-type access
     port default vlan 50
    #
    interface GigabitEthernet2/0/0
     port link-type access
     port default vlan 70
    #
    interface GigabitEthernet3/0/0
     port link-type access
     port default vlan 80
    #
    interface GigabitEthernet3/0/1
     port link-type access
     port default vlan 60
    #
    interface LoopBack1
     ip address 5.5.5.5 255.255.255.255
    #
    interface Tunnel1
     description Working tunnel-1 to PE1
     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
    #
    interface Tunnel2
     description Working tunnel-2 to PE1
     ip address unnumbered interface LoopBack1
     tunnel-protocol mpls te
     destination 1.1.1.1
     mpls te tunnel-id 101
     mpls te commit
    #
    interface Tunnel3
     description Protection tunnel to PE1
     ip address unnumbered interface LoopBack1
     tunnel-protocol mpls te
     destination 1.1.1.1
     mpls te signal-protocol cr-static
     mpls te tunnel-id 102
     mpls te commit
    #
    ospf 100
     opaque-capability enable
     area 0.0.0.0
      network 5.5.5.5 0.0.0.0
      network 10.1.5.0 0.0.0.255
      network 10.1.6.0 0.0.0.255
      network 10.1.7.0 0.0.0.255
      network 10.1.8.0 0.0.0.255
      mpls-te enable
    #
    static-cr-lsp egress PE1toPE2-1 incoming-interface Vlanif70 in-label 17 lsrid 1.1.1.1 tunnel-id 100
    static-cr-lsp egress PE1toPE2-3 incoming-interface Vlanif60 in-label 31 lsrid 1.1.1.1 tunnel-id 102
    static-cr-lsp ingress Tunnel1 destination 1.1.1.1 nexthop 10.1.8.1 out-label 17 bandwidth ct0 0
    static-cr-lsp ingress Tunnel2 destination 1.1.1.1 nexthop 10.1.7.2 out-label 21 bandwidth ct0 0
    static-cr-lsp ingress Tunnel3 destination 1.1.1.1 nexthop 10.1.5.2 out-label 31 bandwidth ct0 0
    #
    mpls oam ingress Tunnel1
    mpls oam ingress enable Tunnel1
    mpls oam ingress Tunnel2
    mpls oam ingress enable Tunnel2
    mpls oam ingress Tunnel3
    mpls oam ingress enable Tunnel3
    mpls oam egress lsr-id 1.1.1.1 tunnel-id 101
    mpls oam egress lsp-name PE1toPE2-1
    mpls oam egress lsp-name PE1toPE2-3
    #
    return
翻译
下载文档
更新时间:2019-08-20

文档编号:EDOC1000141521

浏览量:8263

下载量:343

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