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

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

提示

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

升级

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

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

配置本远端LDP会话共存示例

组网需求

图3-15所示,LSRA、LSRC为IP/MPLS骨干网的PE设备。LSRA和LSRC上需要部署MPLS L2VPN业务来实现VPN站点的互联,在LSR间配置本地LDP会话来建立LDP LSP,实现承载VPN业务。同时在LSRA和LSRC之间配置远端LDP会话,LSRA和LSRC实现本远端LDP会话共存。

图3-15  配置本远端LDP会话共存组网

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

配置思路

采用如下思路配置:

  1. 在LSR上配置OSPF,实现骨干网的IP连通性。
  2. 在LSR上配置本地LDP会话,实现创建公网隧道来承载VPN业务。
  3. 在LSRA和LSRC上配置远端LDP会话,提高L2VPN业务的可靠性。

操作步骤

  1. 交换机上创建VLAN、VLANIF接口,配置VLANIF接口的IP地址,并将相应的物理接口加入到VLAN

    # 配置LSRA。LSRB和LSRC的配置与LSRA类似,不再赘述。

    <Quidway> system-view
    [Quidway] sysname LSRA
    [LSRA] interface loopback 0
    [LSRA-LoopBack0] ip address 1.1.1.1 32
    [LSRA-LoopBack0] quit
    [LSRA] vlan batch 10 30
    [LSRA] interface vlanif 10
    [LSRA-Vlanif10] ip address 10.1.1.1 24
    [LSRA-Vlanif10] quit
    [LSRA] interface gigabitethernet 1/0/1
    [LSRA-GigabitEthernet1/0/1] port link-type trunk
    [LSRA-GigabitEthernet1/0/1] port trunk allow-pass vlan 10
    [LSRA-GigabitEthernet1/0/1] quit
    [LSRA] interface vlanif 30
    [LSRA-Vlanif30] ip address 10.3.1.1 24
    [LSRA-Vlanif30] quit
    [LSRA] interface gigabitethernet 1/0/2
    [LSRA-GigabitEthernet1/0/2] port link-type trunk
    [LSRA-GigabitEthernet1/0/2] port trunk allow-pass vlan 30
    [LSRA-GigabitEthernet1/0/2] quit

  2. 配置OSPF协议发布各节点接口所连网段和LSR ID的主机路由

    # 配置LSRA。

    [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.3.1.0 0.0.0.255
    [LSRA-ospf-1-area-0.0.0.0] quit
    [LSRA-ospf-1] quit

    # 配置LSRB。

    [LSRB] ospf 1
    [LSRB-ospf-1] area 0
    [LSRB-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
    [LSRB-ospf-1-area-0.0.0.0] network 10.3.1.0 0.0.0.255
    [LSRB-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
    [LSRB-ospf-1-area-0.0.0.0] quit
    [LSRB-ospf-1] quit

    # 配置LSRC。

    [LSRC] ospf 1
    [LSRC-ospf-1] area 0
    [LSRC-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
    [LSRC-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
    [LSRC-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
    [LSRC-ospf-1-area-0.0.0.0] quit
    [LSRC-ospf-1] quit

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

  3. 在各LSR上使能全局MPLS和MPLS LDP

    # 配置LSRA。

    [LSRA] mpls lsr-id 1.1.1.1
    [LSRA] mpls
    [LSRA-mpls] quit
    [LSRA] mpls ldp
    [LSRA-mpls-ldp] quit

    # 配置LSRB。

    [LSRB] mpls lsr-id 2.2.2.2
    [LSRB] mpls
    [LSRB-mpls] quit
    [LSRB] mpls ldp
    [LSRB-mpls-ldp] quit

    # 配置LSRC。

    [LSRC] mpls lsr-id 3.3.3.3
    [LSRC] mpls
    [LSRC-mpls] quit
    [LSRC] mpls ldp
    [LSRC-mpls-ldp] quit
    

  4. 在各LSR的接口上使能MPLS和MPLS LDP

    # 配置LSRA。

    [LSRA] interface vlanif 10 
    [LSRA-Vlanif10] mpls
    [LSRA-Vlanif10] mpls ldp
    [LSRA-Vlanif10] quit
    [LSRA] interface vlanif 30 
    [LSRA-Vlanif30] mpls
    [LSRA-Vlanif30] mpls ldp
    [LSRA-Vlanif30] quit

    # 配置LSRB。

    [LSRB] interface vlanif 30 
    [LSRB-Vlanif30] mpls 
    [LSRB-Vlanif30] mpls ldp
    [LSRB-Vlanif30] quit 
    [LSRB] interface vlanif 20 
    [LSRB-Vlanif20] mpls
    [LSRB-Vlanif20] mpls ldp
    [LSRB-Vlanif20] quit
    

    # 配置LSRC。

    [LSRC] interface vlanif 10 
    [LSRC-Vlanif10] mpls 
    [LSRC-Vlanif10] mpls ldp
    [LSRC-Vlanif10] quit
    [LSRC] interface vlanif 20 
    [LSRC-Vlanif20] mpls 
    [LSRC-Vlanif20] mpls ldp
    [LSRC-Vlanif20] quit

  5. 在LSRA和LSRC上指定远端对等体及IP地址

    # 配置LSRA。

    [LSRA] mpls ldp remote-peer LSRC
    [LSRA-mpls-ldp-remote-lsrc] remote-ip 3.3.3.3 
    [LSRA-mpls-ldp-remote-lsrc] quit
    

    # 配置LSRC。

    [LSRC] mpls ldp remote-peer LSRA 
    [LSRC-mpls-ldp-remote-lsra] remote-ip 1.1.1.1
    [LSRC-mpls-ldp-remote-lsra] quit

  6. 在各LSR上去使能STP

    # 配置LSRA。LSRB和LSRC的配置与LSRA类似,不再赘述。

    <LSRA> system-view
    [Quidway] stp disable
    

  7. 检查配置结果

    # 配置完成后,在LSRA和LSRC上执行display mpls ldp adjacency命令,可以看到LSRA和LSRC之间即为本地邻接体又为远端邻接体。

    以LSRA的显示为例:

    [LSRA] display mpls ldp adjacency
    LDP Adjacency Information in Public Network
     Codes: R: Remote Adjacency, L: Local Adjacency
     A '*' before an adjacency means the adjacency is being deleted.
     ------------------------------------------------------------------------------
     SN    SourceAddr      PeerID          VrfID AdjAge(DDDD:HH:MM) RcvdHello Type
     ------------------------------------------------------------------------------
      1    10.1.1.2        3.3.3.3         0     0000:00:16         195       L
      2    10.3.1.2        2.2.2.2         0     0000:00:03         40        L
      3    3.3.3.3         3.3.3.3         0     0000:00:03         18        R
     ------------------------------------------------------------------------------
     TOTAL: 3 Record(s) found. 
    
    

    # 在LSRA和LSRC上执行display mpls ldp session statistics命令,可以看到LSRA和LSRC上分别存在一个本远端共存会话,即本地LDP会话和远端LDP会话共存。

    以LSRA的显示为例:

    [LSRA] display mpls ldp session statistics
     LDP Session Statistics Information
     ------------------------------------------------------------
     SessionType         Local   Remote   Local&Remote   Total
     ------------------------------------------------------------
     Not Operational     0       0        0              0       
     Operational         1       0        1              2       
     ------------------------------------------------------------
     SessionStatistics   1       0        1              2       
     ------------------------------------------------------------
    

    在LSRA执行display mpls ldp lsp命令可查看LSRA到LSRC之间的LSP出接口为VLANIF10。

    [LSRA] display mpls ldp lsp
    
     LDP LSP Information
     -------------------------------------------------------------------------------
     Flag after Out IF: (I) - LSP Is Only Iterated by RLFA
     -------------------------------------------------------------------------------
     DestAddress/Mask   In/OutLabel    UpstreamPeer    NextHop         OutInterface
     -------------------------------------------------------------------------------
    
     1.1.1.1/32         3/NULL         3.3.3.3         127.0.0.1       InLoop0
     1.1.1.1/32         3/NULL         2.2.2.2         127.0.0.1       InLoop0
    *1.1.1.1/32         Liberal/1025                   DS/3.3.3.3
    *1.1.1.1/32         Liberal/1025                   DS/2.2.2.2
     2.2.2.2/32         NULL/3         -               10.3.1.2        Vlanif30
     2.2.2.2/32         1025/3         2.2.2.2         10.3.1.2        Vlanif30
     2.2.2.2/32         1025/3         3.3.3.3         10.3.1.2        Vlanif30
    *2.2.2.2/32         Liberal/1024                   DS/3.3.3.3
     3.3.3.3/32         NULL/3         -               10.1.1.2        Vlanif10
     3.3.3.3/32         1024/3         3.3.3.3         10.1.1.2        Vlanif10
     3.3.3.3/32         1024/3         2.2.2.2         10.1.1.2        Vlanif10
    *3.3.3.3/32         Liberal/1024                   DS/2.2.2.2
     -------------------------------------------------------------------------------
     TOTAL: 8 Normal LSP(s) Found.
     TOTAL: 4 Liberal LSP(s) Found.
     TOTAL: 0 Frr LSP(s) Found.
     A '*' before an LSP means the LSP is not established
     A '*' before a Label means the USCB or DSCB is stale
     A '*' before a UpstreamPeer means the session is stale
     A '*' before a DS means the session is stale
     A '*' before a NextHop means the LSP is FRR LSP
    

    模拟LSRA和LSRC直连的物理链路故障(将LSRA的GigabitEthernet1/0/1接口shutdown)后,LSRA和LSRC之间的本地邻接体进入Down状态,但LSRA和LSRC通过LSRB路由仍可达,远端邻接体依然处于Up状态,会话类型发生变化,成为远端会话,但会话依然处于Up状态,L2VPN感知不到会话状态变化,不会主动拆除,这就避免了L2VPN断开邻居并重新恢复的过程,减少业务中断时间。

    以LSRA的显示为例:

    [LSRA] display mpls ldp adjacency
    LDP Adjacency Information in Public Network
     Codes: R: Remote Adjacency, L: Local Adjacency
     A '*' before an adjacency means the adjacency is being deleted.
     ------------------------------------------------------------------------------
     SN    SourceAddr      PeerID          VrfID AdjAge(DDDD:HH:MM) RcvdHello Type
     ------------------------------------------------------------------------------
      1    10.3.1.2        2.2.2.2         0     0000:00:03         43        L
      2    3.3.3.3         3.3.3.3         0     0000:00:02         11        R
     ------------------------------------------------------------------------------
     TOTAL: 2 Record(s) found. 
    
    
    [LSRA] display mpls ldp session statistics
    LDP Session Statistics Information
     ------------------------------------------------------------
     SessionType         Local   Remote   Local&Remote   Total
     ------------------------------------------------------------
     Not Operational     0       0        0              0       
     Operational         1       1        0              2       
     ------------------------------------------------------------
     SessionStatistics   1       1        0              2       
     ------------------------------------------------------------
    

    在LSRA执行display mpls ldp lsp命令可查看LSRA到LSRC之间的LSP出接口切换为VLANIF30。

    [LSRA] display mpls ldp lsp
    
     LDP LSP Information
     -------------------------------------------------------------------------------
     Flag after Out IF: (I) - LSP Is Only Iterated by RLFA
     -------------------------------------------------------------------------------
     DestAddress/Mask   In/OutLabel    UpstreamPeer    NextHop         OutInterface
     -------------------------------------------------------------------------------
    
     1.1.1.1/32         3/NULL         3.3.3.3         127.0.0.1       InLoop0
     1.1.1.1/32         3/NULL         2.2.2.2         127.0.0.1       InLoop0
    *1.1.1.1/32         Liberal/1025                   DS/3.3.3.3
    *1.1.1.1/32         Liberal/1025                   DS/2.2.2.2
     2.2.2.2/32         NULL/3         -               10.3.1.2        Vlanif30
     2.2.2.2/32         1025/3         2.2.2.2         10.3.1.2        Vlanif30
     2.2.2.2/32         1025/3         3.3.3.3         10.3.1.2        Vlanif30
    *2.2.2.2/32         Liberal/1024                   DS/3.3.3.3
     3.3.3.3/32         NULL/1024      -               10.3.1.2        Vlanif30
     3.3.3.3/32         1024/1024      3.3.3.3         10.3.1.2        Vlanif30
     3.3.3.3/32         1024/1024      2.2.2.2         10.3.1.2        Vlanif30
    *3.3.3.3/32         Liberal/3                      DS/3.3.3.3
     -------------------------------------------------------------------------------
     TOTAL: 8 Normal LSP(s) Found.
     TOTAL: 4 Liberal LSP(s) Found.
     TOTAL: 0 Frr LSP(s) Found.
     A '*' before an LSP means the LSP is not established
     A '*' before a Label means the USCB or DSCB is stale
     A '*' before a UpstreamPeer means the session is stale
     A '*' before a DS means the session is stale
     A '*' before a NextHop means the LSP is FRR LSP
    

    LSRA和LSRC直连的物理链路故障恢复后(将LSRA的GigabitEthernet1/0/1接口undo shutdown),在LSRA执行display mpls ldp lsp命令可查看LSRA到LSRC之间的LSP出接口切换回VLANIF10。

    [LSRA] display mpls ldp lsp
    
     LDP LSP Information
     -------------------------------------------------------------------------------
     Flag after Out IF: (I) - LSP Is Only Iterated by RLFA
     -------------------------------------------------------------------------------
     DestAddress/Mask   In/OutLabel    UpstreamPeer    NextHop         OutInterface
     -------------------------------------------------------------------------------
    
     1.1.1.1/32         3/NULL         3.3.3.3         127.0.0.1       InLoop0
     1.1.1.1/32         3/NULL         2.2.2.2         127.0.0.1       InLoop0
    *1.1.1.1/32         Liberal/1025                   DS/3.3.3.3
    *1.1.1.1/32         Liberal/1025                   DS/2.2.2.2
     2.2.2.2/32         NULL/3         -               10.3.1.2        Vlanif30
     2.2.2.2/32         1025/3         2.2.2.2         10.3.1.2        Vlanif30
     2.2.2.2/32         1025/3         3.3.3.3         10.3.1.2        Vlanif30
    *2.2.2.2/32         Liberal/1024                   DS/3.3.3.3
     3.3.3.3/32         NULL/3         -               10.1.1.2        Vlanif10
     3.3.3.3/32         1024/3         3.3.3.3         10.1.1.2        Vlanif10
     3.3.3.3/32         1024/3         2.2.2.2         10.1.1.2        Vlanif10
    *3.3.3.3/32         Liberal/1024                   DS/2.2.2.2
     -------------------------------------------------------------------------------
     TOTAL: 8 Normal LSP(s) Found.
     TOTAL: 4 Liberal LSP(s) Found.
     TOTAL: 0 Frr LSP(s) Found.
     A '*' before an LSP means the LSP is not established
     A '*' before a Label means the USCB or DSCB is stale
     A '*' before a UpstreamPeer means the session is stale
     A '*' before a DS means the session is stale
     A '*' before a NextHop means the LSP is FRR LSP
    

配置文件

  • LSRA的配置文件

    #
    sysname LSRA
    #
    vlan batch 10 30
    #
    stp disable
    #
    mpls lsr-id 1.1.1.1
    mpls
    #
    mpls ldp
    #
    mpls ldp remote-peer lsrc
     remote-ip 3.3.3.3
    #
    interface Vlanif10
     ip address 10.1.1.1 255.255.255.0 
     mpls
     mpls ldp
    #
    interface Vlanif30
     ip address 10.3.1.1 255.255.255.0 
     mpls
     mpls ldp
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    interface LoopBack0
     ip address 1.1.1.1 255.255.255.255 
    #
    ospf 1 
     area 0.0.0.0 
      network 1.1.1.1 0.0.0.0 
      network 10.3.1.0 0.0.0.255 
      network 10.1.1.0 0.0.0.255 
    #
    return
  • LSRB的配置文件

    #
    sysname LSRB
    #
    vlan batch 20 30
    #
    stp disable
    #
    mpls lsr-id 2.2.2.2
    mpls
    #
    mpls ldp
    #
    interface Vlanif20
     ip address 10.2.1.1 255.255.255.0 
     mpls
     mpls ldp
    #
    interface Vlanif30
     ip address 10.3.1.2 255.255.255.0 
     mpls
     mpls ldp
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    interface LoopBack0
     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.3.1.0 0.0.0.255 
      network 10.2.1.0 0.0.0.255 
    #
    return
  • LSRC的配置文件

    #
    sysname LSRC
    #
    vlan batch 10 20
    #
    stp disable
    #
    mpls lsr-id 3.3.3.3
    mpls
    #
    mpls ldp
    #
    mpls ldp remote-peer lsra
     remote-ip 1.1.1.1
    #
    interface Vlanif10
     ip address 10.1.1.2 255.255.255.0 
     mpls
     mpls ldp
    #
    interface Vlanif20
     ip address 10.2.1.2 255.255.255.0 
     mpls
     mpls ldp
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    interface LoopBack0
     ip address 3.3.3.3 255.255.255.255 
    #
    ospf 1 
     area 0.0.0.0 
      network 3.3.3.3 0.0.0.0 
      network 10.1.1.0 0.0.0.255 
      network 10.2.1.0 0.0.0.255 
    #
    return
翻译
下载文档
更新时间:2019-08-20

文档编号:EDOC1000141521

浏览量:8036

下载量:343

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