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

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

提示

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

升级

CloudEngine 12800 V200R003C00 配置指南-MPLS

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

配置CR-LSP热备份示例

组网需求

图4-31为MPLS VPN网络。要求从LSRA上建立一条TE隧道,目的地址为LSRC,并配置CR-LSP热备份(hot-standby)和逃生路径(best-effort)。其中:

  • 主CR-LSP的路径为LSRA→LSRB→LSRC;

  • 备份CR-LSP的路径为LSRA→LSRD→LSRC;

  • 逃生路径为LSRA→LSRD→LSRB→LSRC。

现需求为当主CR-LSP故障时,流量切换到备份CR-LSP;当主CR-LSP故障恢复,延时15秒后再进行流量回切。如果主、备CR-LSP都故障,触发建立逃生路径,使流量切换到逃生路径上。

说明:

请确保该场景下STP处于未使能状态,否则可能会导致某些接口被阻塞。

图4-31 配置CR-LSP热备份组网图

配置思路

采用如下思路配置CR-LSP热备份:

  1. 配置各接口的IP地址,并使用OSPF协议实现各节点之间公网路由可达。

  2. 配置LSR ID并全局使能各节点以及接口的MPLS、MPLS TE、RSVP-TE、CSPF功能,使能OSPF TE。

  3. 在入节点LSRA上配置主、备显式路径。

  4. 在入节点LSRA上创建目的地址为LSRC的隧道接口,指定显式路径,并使能热备份和逃生路径,配置回切时间为15秒。

操作步骤

  1. 配置各接口的IP地址,并配置OSPF

    # 配置LSRA。

    <HUAWEI> system-view
    [~HUAWEI] sysname LSRA
    [*HUAWEI] commit
    [~LSRA] vlan batch 100 500
    [*LSRA] interface vlanif 100
    [*LSRA-Vlanif100] ip address 172.1.1.1 255.255.255.0
    [*LSRA-Vlanif100] quit
    [*LSRA] interface vlanif 500
    [*LSRA-Vlanif500] ip address 172.5.1.1 255.255.255.0
    [*LSRA-Vlanif500] quit
    [*LSRA] interface 10ge 1/0/0
    [*LSRA-10GE1/0/0] port link-type trunk
    [*LSRA-10GE1/0/0] port trunk allow-pass vlan 100
    [*LSRA-10GE1/0/0] quit
    [*LSRA] interface 10ge 2/0/0
    [*LSRA-10GE2/0/0] port link-type trunk
    [*LSRA-10GE2/0/0] port trunk allow-pass vlan 500
    [*LSRA-10GE2/0/0] quit
    [*LSRA] interface loopback 1
    [*LSRA-LoopBack1] ip address 1.1.1.9 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.9 0.0.0.0
    [*LSRA-ospf-1-area-0.0.0.0] network 172.1.1.0 0.0.0.255
    [*LSRA-ospf-1-area-0.0.0.0] network 172.5.1.0 0.0.0.255
    [*LSRA-ospf-1-area-0.0.0.0] quit
    [*LSRA-ospf-1] quit
    [*LSRA] commit

    图4-31配置LSRB、LSRC、LSRD的接口IP地址,具体配置与配置LSRA类似,不再赘述。

    配置完成后,在各节点上执行display ip routing-table命令,应可以看到相互之间都学到了到对方Loopback1的路由。

  2. 配置MPLS基本能力,使能MPLS TE、RSVP-TE和CSPF

    在各节点的MPLS视图和接口视图下使能MPLS TE、RSVP-TE。在入节点使能CSPF功能。

    # 配置LSRA。

    [~LSRA] mpls lsr-id 1.1.1.9
    [*LSRA] mpls
    [*LSRA-mpls] mpls te
    [*LSRA-mpls] mpls rsvp-te
    [*LSRA-mpls] mpls te cspf
    [*LSRA-mpls] quit
    [*LSRA] interface vlanif 100
    [*LSRA-Vlanif100] mpls
    [*LSRA-Vlanif100] mpls te
    [*LSRA-Vlanif100] mpls rsvp-te
    [*LSRA-Vlanif100] quit
    [*LSRA] interface vlanif 500
    [*LSRA-Vlanif500] mpls
    [*LSRA-Vlanif500] mpls te
    [*LSRA-Vlanif500] mpls rsvp-te
    [*LSRA-Vlanif500] quit
    [*LSRA] commit

    配置LSRB、LSRC、LSRD与配置LSRA类似,不再赘述。其中,只需在主隧道和旁路隧道的入节点上使能CSPF。即只需在LSRA上使能CSPF,LSRB、LSRC和LSRD上无需使能CSPF。

  3. 配置OSPF TE

    # 配置LSRA。

    [~LSRA] ospf
    [*LSRA-ospf-1] opaque-capability enable
    [*LSRA-ospf-1] area 0
    [*LSRA-ospf-1-area-0.0.0.0] mpls-te enable
    [*LSRA-ospf-1-area-0.0.0.0] quit
    [*LSRA-ospf-1] quit
    [*LSRA] commit

    配置LSRB、LSRC、LSRD与配置LSRA类似,不再赘述。

  4. 配置主、备CR-LSP使用的显式路径

    # 在LSRA上配置主CR-LSP使用的显式路径。

    [~LSRA] explicit-path pri-path
    [*LSRA-explicit-path-pri-path] next hop 172.1.1.2
    [*LSRA-explicit-path-pri-path] next hop 172.2.1.2
    [*LSRA-explicit-path-pri-path] next hop 3.3.3.9
    [*LSRA-explicit-path-pri-path] quit
    [*LSRA] commit

    # 在LSRA上配置备份CR-LSP使用的显式路径。

    [~LSRA] explicit-path backup-path
    [*LSRA-explicit-path-backup-path] next hop 172.5.1.2
    [*LSRA-explicit-path-backup-path] next hop 172.3.1.1
    [*LSRA-explicit-path-backup-path] next hop 3.3.3.9
    [*LSRA-explicit-path-backup-path] quit
    [*LSRA] commit

    完成以上配置后,可在LSRA上执行命令查看已经配置的显式路径。

    [~LSRA] display explicit-path pri-path
    Path Name :    pri-path     Path Status :  Enabled
     1           172.1.1.2         Strict     Include
     2           172.2.1.2         Strict     Include
     3           3.3.3.9           Strict     Include
    
    [~LSRA] display explicit-path backup-path
    Path Name :    backup-path     Path Status :  Enabled
     1           172.5.1.2         Strict     Include
     2           172.3.1.1         Strict     Include
     3           3.3.3.9           Strict     Include

  5. 配置隧道接口

    # 在LSRA上创建Tunnel接口,指定显式路径。

    [~LSRA] interface tunnel 1
    [*LSRA-Tunnel1] ip address unnumbered interface loopback 1
    [*LSRA-Tunnel1] tunnel-protocol mpls te
    [*LSRA-Tunnel1] destination 3.3.3.9
    [*LSRA-Tunnel1] mpls te tunnel-id 100
    [*LSRA-Tunnel1] mpls te path explicit-path pri-path
    [*LSRA-Tunnel1] commit

    # 在该Tunnel接口配置CR-LSP热备份,回切时间为15秒,指定备份显式路径,并配置逃生路径。

    [~LSRA-Tunnel1] mpls te backup hot-standby wtr 15
    [*LSRA-Tunnel1] mpls te path explicit-path backup-path secondary
    [*LSRA-Tunnel1] mpls te backup ordinary best-effort
    [*LSRA-Tunnel1] quit
    [*LSRA] commit

    完成以上配置后,在LSRA上执行display mpls te tunnel-interface tunnel 1命令,可发现主CR-LSP、备份CR-LSP建立成功。

    [~LSRA] display mpls te tunnel-interface tunnel 1
        Tunnel Name       : Tunnel1
        Signalled Tunnel Name: -
        Tunnel State Desc : Primary CR-LSP Up and HotBackup CR-LSP Up
        Tunnel Attributes   :     
        Active LSP          : Primary LSP
        Traffic Switch      : - 
        Session ID          : 100
        Ingress LSR ID      : 1.1.1.9               Egress LSR ID: 3.3.3.9
        Admin State         : UP                    Oper State   : UP
        Signaling Protocol  : RSVP
        FTid                : 1
        Tie-Breaking Policy : None                  Metric Type  : None
        Bfd Cap             : None                  
        Reopt               : Disabled              Reopt Freq   : -              
        Auto BW             : Disabled              Threshold    : - 
        Current Collected BW: -                     Auto BW Freq : -
        Min BW              : -                     Max BW       : -
        Offload             : Disabled              Offload Freq : - 
        Low Value           : -                     High Value   : - 
        Readjust Value      : - 
        Offload Explicit Path Name: -
        Tunnel Group        : -                                              
        Interfaces Protected: -
        Excluded IP Address : -
        Referred LSP Count  : 0  
        Primary Tunnel      : -                     Pri Tunn Sum : -              
        Backup Tunnel       : -                                                    
        Group Status        : -                     Oam Status   : -             
        IPTN InLabel        : -                     Tunnel BFD Status : -
        BackUp LSP Type     : Hot-Standby           BestEffort   : Enabled
        Secondary HopLimit  : -
        BestEffort HopLimit  : -
        Secondary Explicit Path Name: backup-path
        Secondary Affinity Prop/Mask: 0x0/0x0
        BestEffort Affinity Prop/Mask: 0x0/0x0  
        IsConfigLspConstraint: -
        Hot-Standby Revertive Mode:  Revertive
        Hot-Standby Overlap-path:  Disabled
        Hot-Standby Switch State:  CLEAR
        Bit Error Detection:  Disabled
        Bit Error Detection Switch Threshold:  -
        Bit Error Detection Resume Threshold:  -
    ...

    在LSRA上使用display mpls te hot-standby state interface tunnel 1命令查看热备份信息。

    [~LSRA] display mpls te hot-standby state interface tunnel 1
    (s): same path
    ----------------------------------------------------------------
    Verbose information about the Tunnel1 hot-standby state
    ----------------------------------------------------------------
        Tunnel name           : Tunnel1
        Session ID            : 100
        Main LSP index        : 0x201
        Hot-standby LSP index : 0x221
        HSB switch result     : main LSP
        HSB switch reason     : -
        WTR config time       : 15 s
        WTR remain time       : -
        Using overlapped path : no 
    在LSRA上使用ping lsp te命令检测热备份CR-LSP连通性。
    [~LSRA] ping lsp te tunnel 1 hot-standby
      LSP PING FEC: TE TUNNEL IPV4 SESSION QUERY Tunnel1 : 100  data bytes, press CTRL_C to break
        Reply from 3.3.3.9: bytes=100 Sequence=1 time=12 ms
        Reply from 3.3.3.9: bytes=100 Sequence=2 time=4 ms
        Reply from 3.3.3.9: bytes=100 Sequence=3 time=4 ms
        Reply from 3.3.3.9: bytes=100 Sequence=4 time=4 ms
        Reply from 3.3.3.9: bytes=100 Sequence=5 time=7 ms
    
      --- FEC: TE TUNNEL IPV4 SESSION QUERY Tunnel1 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 4/6/12 ms
     

  6. 检查配置结果

    将同一台测试仪的两个接口(Port1和Port2)分别接入LSRA和LSRC,从Port1向Port2打MPLS流(注意标签值的设置)。可发现当拔出LSRA或LSRB上的10GE1/0/0接口的线缆时,故障收敛时间为毫秒级。

    # 将LSRA的VLANIF100接口shutdown,模拟线缆拔出。

    [~LSRA] interface vlanif 100
    [*LSRA-Vlanif100] shutdown
    [*LSRA-Vlanif100] quit
    [*LSRA] commit

    在LSRA上执行命令display mpls te tunnel-interface tunnel 1,可发现流量被切换到备份CR-LSP上。

    [~LSRA] display mpls te tunnel-interface tunnel 1
        Tunnel Name       : Tunnel1
        Signalled Tunnel Name: -
        Tunnel State Desc : Backup CR-LSP In use and Primary CR-LSP setting Up
        Tunnel Attributes   :     
        Active LSP          : Hot-Standby LSP
        Traffic Switch      : - 
        Session ID          : 100
        Ingress LSR ID      : 1.1.1.9               Egress LSR ID: 3.3.3.9
        Admin State         : UP                    Oper State   : UP
        Signaling Protocol  : RSVP
        FTid                : 1
        Tie-Breaking Policy : None                  Metric Type  : None
        Bfd Cap             : None                  
        Reopt               : Disabled              Reopt Freq   : -              
        Auto BW             : Disabled              Threshold    : - 
        Current Collected BW: -                     Auto BW Freq : -
        Min BW              : -                     Max BW       : -
        Offload             : Disabled              Offload Freq : - 
        Low Value           : -                     High Value   : - 
        Readjust Value      : - 
        Offload Explicit Path Name: -
        Tunnel Group        : -                                              
        Interfaces Protected: -
        Excluded IP Address : -
        Referred LSP Count  : 0  
        Primary Tunnel      : -                     Pri Tunn Sum : -              
        Backup Tunnel       : -                                                    
        Group Status        : -                     Oam Status   : -             
        IPTN InLabel        : -                     Tunnel BFD Status : -
        BackUp LSP Type     : Hot-Standby           BestEffort   : Enabled
        Secondary HopLimit  : -
        BestEffort HopLimit  : -
        Secondary Explicit Path Name: backup-path
        Secondary Affinity Prop/Mask: 0x0/0x0
        BestEffort Affinity Prop/Mask: 0x0/0x0  
        IsConfigLspConstraint: -
        Hot-Standby Revertive Mode:  Revertive
        Hot-Standby Overlap-path:  Disabled
        Hot-Standby Switch State:  CLEAR
        Bit Error Detection:  Disabled
        Bit Error Detection Switch Threshold:  -
        Bit Error Detection Resume Threshold:  -
    ...

    插上刚才拔出的线缆(在LSRA的VLANIF100接口执行命令undo shutdown)后,等15秒后,可发现流量被切换到主CR-LSP上。

    如果拔出LSRA或LSRB上的10GE1/0/0接口后再拔出LSRC或LSRD上的10GE1/0/0接口的线缆时,隧道接口变为Down后又会变为Up,逃生路径建立成功,流量被切换到逃生路径上。

    # 在LSRA的VLANIF100接口shutdown之后,再将LSRC的VLANIF300接口shutdown,模拟线缆拔出。

    [~LSRA] interface vlanif 100
    [*LSRA-Vlanif100] shutdown
    [*LSRA-Vlanif100] quit
    [*LSRA] commit
    [~LSRC] interface vlanif 300
    [*LSRC-Vlanif300] shutdown
    [*LSRC-Vlanif300] quit
    [*LSRC] commit

    在LSRA上执行命令display mpls te tunnel-interface tunnel 1,发现隧道接口变Down,逃生路径正在建立。

    几秒钟之后,在LSRA上再次执行display mpls te tunnel-interface tunnel 1,发现隧道接口Up,逃生路径建立成功。

    [~LSRA] display mpls te tunnel-interface tunnel 1
        Tunnel Name       : Tunnel1
        Signalled Tunnel Name: -
        Tunnel State Desc : Backup CR-LSP In use and Primary CR-LSP setting Up
        Tunnel Attributes   :     
        Active LSP          : BestEffort LSP
        Traffic Switch      : - 
        Session ID          : 100
        Ingress LSR ID      : 1.1.1.9               Egress LSR ID: 3.3.3.9
        Admin State         : UP                    Oper State   : UP
        Signaling Protocol  : RSVP
        FTid                : 1
        Tie-Breaking Policy : None                  Metric Type  : None
        Bfd Cap             : None                  
        Reopt               : Disabled              Reopt Freq   : -              
        Auto BW             : Disabled              Threshold    : - 
        Current Collected BW: -                     Auto BW Freq : -
        Min BW              : -                     Max BW       : -
        Offload             : Disabled              Offload Freq : - 
        Low Value           : -                     High Value   : - 
        Readjust Value      : - 
        Offload Explicit Path Name: -
        Tunnel Group        : -                                              
        Interfaces Protected: -
        Excluded IP Address : -
        Referred LSP Count  : 0  
        Primary Tunnel      : -                     Pri Tunn Sum : -              
        Backup Tunnel       : -                                                    
        Group Status        : -                     Oam Status   : -             
        IPTN InLabel        : -                     Tunnel BFD Status : -
        BackUp LSP Type     : BestEffort            BestEffort   : Enabled
        Secondary HopLimit  : -
        BestEffort HopLimit  : -
        Secondary Explicit Path Name: backup-path
        Secondary Affinity Prop/Mask: 0x0/0x0
        BestEffort Affinity Prop/Mask: 0x0/0x0  
        IsConfigLspConstraint: -
        Hot-Standby Revertive Mode:  Revertive
        Hot-Standby Overlap-path:  Disabled
        Hot-Standby Switch State:  CLEAR
        Bit Error Detection:  Disabled
        Bit Error Detection Switch Threshold:  -
        Bit Error Detection Resume Threshold:  -
    ...
    [~LSRA] display mpls te tunnel path
     Tunnel Interface Name : Tunnel1
     Lsp ID : 1.1.1.9 :100 :160
     Hop Information
      Hop 0   172.5.1.1
      Hop 1   172.5.1.2
      Hop 2   4.4.4.9
      Hop 3   172.4.1.2
      Hop 4   172.4.1.1
      Hop 5   2.2.2.9
      Hop 6   172.2.1.1
      Hop 7   172.2.1.2
      Hop 8   3.3.3.9

配置文件

  • LSRA的配置文件

    #
    sysname LSRA
    #
    vlan batch 100 500
    #
    mpls lsr-id 1.1.1.9
    #
    mpls
     mpls te
     mpls rsvp-te
     mpls te cspf
    #
    explicit-path pri-path
     next hop 172.1.1.2
     next hop 172.2.1.2
     next hop 3.3.3.9
    #
    explicit-path backup-path
     next hop 172.5.1.2
     next hop 172.3.1.1
     next hop 3.3.3.9
    #
    interface Vlanif100
     ip address 172.1.1.1 255.255.255.0
     mpls
     mpls te
     mpls rsvp-te
    #
    interface Vlanif500
     ip address 172.5.1.1 255.255.255.0
     mpls
     mpls te
     mpls rsvp-te
    #
    interface 10GE1/0/0
     port link-type trunk
     port trunk allow-pass vlan 100
    #    
    interface 10GE2/0/0
     port link-type trunk
     port trunk allow-pass vlan 500
    #
    interface LoopBack1
     ip address 1.1.1.9 255.255.255.255
    #
    interface Tunnel1
     ip address unnumbered interface LoopBack1
     tunnel-protocol mpls te
     destination 3.3.3.9
     mpls te record-route
     mpls te backup ordinary best-effort
     mpls te backup hot-standby mode revertive wtr 15
     mpls te tunnel-id 100
     mpls te path explicit-path pri-path  
     mpls te path explicit-path backup-path secondary
    #
    ospf 1
     opaque-capability enable
     area 0.0.0.0
      network 1.1.1.9 0.0.0.0
      network 172.1.1.0 0.0.0.255
      network 172.5.1.0 0.0.0.255
      mpls-te enable
    #
    return
  • LSRB的配置文件

    #
    sysname LSRB
    #
    vlan batch 100 200 400
    #
    mpls lsr-id 2.2.2.9
    #
    mpls
     mpls te
     mpls rsvp-te
    #
    interface Vlanif100
     ip address 172.1.1.2 255.255.255.0
     mpls
     mpls te
     mpls rsvp-te
    #
    interface Vlanif200
     ip address 172.2.1.1 255.255.255.0
     mpls
     mpls te
     mpls rsvp-te
    #
    interface Vlanif400
     ip address 172.4.1.1 255.255.255.0
     mpls
     mpls te
     mpls rsvp-te
    #
    interface 10GE1/0/0
     port link-type trunk
     port trunk allow-pass vlan 100
    # 
    interface 10GE2/0/0
     port link-type trunk
     port trunk allow-pass vlan 200
    #
    interface 10GE3/0/0
     port link-type trunk
     port trunk allow-pass vlan 400
    #
    interface LoopBack1
     ip address 2.2.2.9 255.255.255.255
    #
    ospf 1
     opaque-capability enable
     area 0.0.0.0
      network 2.2.2.9 0.0.0.0
      network 172.1.1.0 0.0.0.255
      network 172.2.1.0 0.0.0.255
      network 172.4.1.0 0.0.0.255
      mpls-te enable
    #
    return
  • LSRC的配置文件

    #
    sysname LSRC
    #
    vlan batch 200 300
    #
    mpls lsr-id 3.3.3.9
    #
    mpls
     mpls te
     mpls rsvp-te
    #
    interface Vlanif200
     ip address 172.2.1.2 255.255.255.0
     mpls
     mpls te
     mpls rsvp-te
    #
    interface Vlanif300
     ip address 172.3.1.1 255.255.255.0
     mpls
     mpls te
     mpls rsvp-te
    #
    interface 10GE1/0/0
     port link-type trunk
     port trunk allow-pass vlan 300
    #
    interface 10GE2/0/0
     port link-type trunk
     port trunk allow-pass vlan 200
    #
    interface LoopBack1
     ip address 3.3.3.9 255.255.255.255
    #
    ospf 1                                                                          
     opaque-capability enable                                                       
     area 0.0.0.0                                                                   
      network 3.3.3.9 0.0.0.0                                                       
      network 172.2.1.0 0.0.0.255                                                   
      network 172.3.1.0 0.0.0.255                                                   
      mpls-te enable                                                                
    # 
    return
  • LSRD的配置文件

    #
    sysname LSRD
    #
    vlan batch 300 400 500
    #
    mpls lsr-id 4.4.4.9
    #
    mpls
     mpls te
     mpls rsvp-te
    #
    interface Vlanif300
     ip address 172.3.1.2 255.255.255.0
     mpls
     mpls te
     mpls rsvp-te
    #
    interface Vlanif400
     ip address 172.4.1.2 255.255.255.0
     mpls
     mpls te
     mpls rsvp-te
    #
    interface Vlanif500
     ip address 172.5.1.2 255.255.255.0
     mpls
     mpls te
     mpls rsvp-te
    #
    interface 10GE1/0/0
     port link-type trunk
     port trunk allow-pass vlan 300
    #
    interface 10GE2/0/0
     port link-type trunk
     port trunk allow-pass vlan 500
    #
    interface 10GE3/0/0
     port link-type trunk
     port trunk allow-pass vlan 400
    #
    interface LoopBack1
     ip address 4.4.4.9 255.255.255.255
    #
    ospf 1                                                                          
     opaque-capability enable                                                       
     area 0.0.0.0                                                                   
      network 4.4.4.9 0.0.0.0                                                       
      network 172.3.1.0 0.0.0.255                                                   
      network 172.4.1.0 0.0.0.255                                                   
      network 172.5.1.0 0.0.0.255                                                   
      mpls-te enable                                                                
    # 
    return
翻译
下载文档
更新时间:2019-05-05

文档编号:EDOC1100004215

浏览量:29675

下载量:487

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