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

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

提示

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

升级

CloudEngine 12800 V200R003C00 配置指南-MPLS

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

配置禁止向远端对等体分配标签示例

组网需求

图2-20所示,PE1、PE2和PE3由MPLS骨干网P设备连接,各设备间运行IS-IS路由协议。使用公网LSP隧道来承载L2VPN业务,PE1分别与PE2、PE3建立远端LDP会话来传递私网标签信息,在PE1和PE2之间、PE1和PE3之间建立动态PW(Pseudo Wire)。

在MPLS网络中,LDP不但会传递私网标签信息,还会为其远端对等体分配普通的LDP标签。如果网络中存在多个LDP远端对等体的时候,会导致很多空闲标签存在,大量占用系统资源。要求能够控制LDP向远端对等体分标签,以节约系统资源。

图2-20 配置禁止向远端对等体分配标签组网图

配置思路

配置禁止向远端对等体分配标签,可以实现此需求。采用如下配置思路:

  1. 在PE、P上配置IS-IS,实现骨干网的IP连通性。

  2. 在PE、P上配置本地LDP会话,实现创建公网LSP隧道来承载L2VPN业务。

  3. 在PE上配置远端LDP会话,实现传递私网标签信息来建立动态PW。

  4. 在PE上配置禁止向远端对等体分配标签,实现禁止PE1与PE2、PE3间分配普通的LDP标签,以节约系统资源。

操作步骤

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

    # 配置PE1。P、PE2和PE3的配置与PE1类似,不再赘述。

    <HUAWEI> system-view
    [~HUAWEI] sysname PE1
    [*PE1] commit
    [~PE1] interface loopback 0
    [*PE1-LoopBack0] ip address 1.1.1.1 32
    [*PE1-LoopBack0] quit
    [*PE1] vlan batch 10
    [*PE1] interface vlanif 10
    [*PE1-Vlanif10] ip address 40.1.1.1 24
    [*PE1-Vlanif10] quit
    [*PE1] interface 10ge 1/0/1
    [*PE1-10GE1/0/1] port link-type trunk
    [*PE1-10GE1/0/1] port trunk allow-pass vlan 10
    [*PE1-10GE1/0/1] quit
    [*PE1] commit
    

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

    # 配置PE1。

    [~PE1] isis 1
    [*PE1-isis-1] is-level level-2
    [*PE1-isis-1] network-entity 86.4501.0010.0100.0001.00
    [*PE1-isis-1] quit
    [*PE1] interface vlanif 10
    [*PE1-Vlanif10] isis enable 1
    [*PE1-Vlanif10] quit
    [*PE1] interface loopback 0
    [*PE1-LoopBack0] isis enable 1
    [*PE1-LoopBack0] quit
    [*PE1] commit
    

    # 配置P。

    [~P] isis 1
    [*P-isis-1] is-level level-2
    [*P-isis-1] network-entity 86.4501.0030.0300.0003.00
    [*P-isis-1] quit
    [*P] interface vlanif 10
    [*P-Vlanif10] isis enable 1
    [*P-Vlanif10] quit
    [*P] interface vlanif 20
    [*P-Vlanif20] isis enable 1
    [*P-Vlanif20] quit
    [*P] interface vlanif 30
    [*P-Vlanif30] isis enable 1
    [*P-Vlanif30] quit
    [*P] interface loopback 0
    [*P-LoopBack0] isis enable 1
    [*P-LoopBack0] quit
    [*P] commit
    

    # 配置PE2。

    [~PE2] isis 1
    [*PE2-isis-1] is-level level-2
    [*PE2-isis-1] network-entity 86.4501.0050.0500.0005.00
    [*PE2-isis-1] quit
    [*PE2] interface vlanif 20
    [*PE2-Vlanif20] isis enable 1
    [*PE2-Vlanif20] quit
    [*PE2] interface loopback 0
    [*PE2-LoopBack0] isis enable 1
    [*PE2-LoopBack0] quit
    [*PE2] commit
    

    # 配置PE3。

    [~PE3] isis 1
    [*PE3-isis-1] is-level level-2
    [*PE3-isis-1] network-entity 86.4501.0040.0400.0004.00
    [*PE3-isis-1] quit
    [*PE3] interface vlanif 30
    [*PE3-Vlanif30] isis enable 1
    [*PE3-Vlanif30] quit
    [*PE3] interface loopback 0
    [*PE3-LoopBack0] isis enable 1
    [*PE3-LoopBack0] quit
    [*PE3] commit
    

  3. 配置本地LDP会话

    # 配置PE1。

    [~PE1] mpls lsr-id 1.1.1.1
    [*PE1] mpls
    [*PE1-mpls] quit
    [*PE1] mpls ldp
    [*PE1-mpls-ldp] quit
    [*PE1] interface vlanif 10
    [*PE1-Vlanif10] mpls
    [*PE1-Vlanif10] mpls ldp
    [*PE1-Vlanif10] quit
    [*PE1] commit
    

    # 配置P。

    [~P] mpls lsr-id 2.2.2.2
    [*P] mpls
    [*P-mpls] quit
    [*P] mpls ldp
    [*P-mpls-ldp] quit
    [*P] interface vlanif 10
    [*P-Vlanif10] mpls
    [*P-Vlanif10] mpls ldp
    [*P-Vlanif10] quit
    [*P] interface vlanif 20
    [*P-Vlanif20] mpls
    [*P-Vlanif20] mpls ldp
    [*P-Vlanif20] quit
    [*P] interface vlanif 30
    [*P-Vlanif30] mpls
    [*P-Vlanif30] mpls ldp
    [*P-Vlanif30] quit
    [*P] commit
    

    # 配置PE2。

    [~PE2] mpls lsr-id 5.5.5.5
    [*PE2] mpls
    [*PE2-mpls] quit
    [*PE2] mpls ldp
    [*PE2-mpls-ldp] quit
    [*PE2] interface vlanif 20
    [*PE2-Vlanif20] mpls
    [*PE2-Vlanif20] mpls ldp
    [*PE2-Vlanif20] quit
    [*PE2] commit
    

    # 配置PE3。

    [~PE3] mpls lsr-id 4.4.4.4
    [*PE3] mpls
    [*PE3-mpls] quit
    [*PE3] mpls ldp
    [*PE3-mpls-ldp] quit
    [*PE3] interface vlanif 30
    [*PE3-Vlanif30] mpls
    [*PE3-Vlanif30] mpls ldp
    [*PE3-Vlanif30] quit
    [*PE3] commit
    

    上述配置完成后,相邻节点之间应该建立起LDP会话以及公网LSP。在各节点上执行display mpls ldp session命令可以看到显示结果中Status项为“Operational”。以PE1的显示为例:

    [~PE1] display mpls ldp session
     LDP Session(s) in Public Network
     LAM: Label Advertisement Mode,  KA: KeepAlive
     SsnAge: Session Age, Unit(DDDD:HH:MM)
     An asterisk (*) before a session means the session is being deleted.
     ------------------------------------------------------------------------------
     PeerID             Status      LAM  SsnRole  SsnAge      KASent/Rcv
     ------------------------------------------------------------------------------
     2.2.2.2:0          Operational DU   Passive  0000:00:01  6/6
     ------------------------------------------------------------------------------
     TOTAL: 1 Session(s) Found.

    执行display mpls ldp lsp命令可以看到建立的LSP情况和标签的分配情况。

    [~PE1] display mpls ldp lsp
     LDP LSP Information
     An asterisk (*) before an LSP means the LSP is not established
     An asterisk (*) before a Label means the USCB or DSCB is stale
     An asterisk (*) before a UpstreamPeer means the session is in GR state
     An asterisk (*) before a DS means the session is in GR state
     An asterisk (*) before a NextHop means the LSP is FRR LSP
     -------------------------------------------------------------------------------
     DestAddress/Mask   In/OutLabel    UpstreamPeer    NextHop          OutInterface
     -------------------------------------------------------------------------------
            1.1.1.1/32   3/NULL         2.2.2.2         127.0.0.1        Loop0
            2.2.2.2/32   NULL/3         -               40.1.1.2         Vlanif10
            4.4.4.4/32   NULL/1024      -               40.1.1.2         Vlanif10
            5.5.5.5/32   NULL/1026      -               40.1.1.2         Vlanif10
     -------------------------------------------------------------------------------
     TOTAL: 4 Normal LSP(s) Found, 0 Liberal LSP(s) Found
            0 FRR LSP(s) Found.

  4. 在PW两端的PE之间要建立MPLS LDP远端对等体关系

    # 配置PE1。

    [~PE1] mpls ldp remote-peer pe2
    [*PE1-mpls-ldp-remote-pe2] remote-ip 5.5.5.5
    [*PE1-mpls-ldp-remote-pe2] quit
    [*PE1] mpls ldp remote-peer pe3
    [*PE1-mpls-ldp-remote-pe3] remote-ip 4.4.4.4
    [*PE1-mpls-ldp-remote-pe3] quit
    [*PE1] commit
    

    # 配置PE2。

    [~PE2] mpls ldp remote-peer pe1
    [*PE2-mpls-ldp-remote-pe1] remote-ip 1.1.1.1
    [*PE2-mpls-ldp-remote-pe1] quit
    [*PE2] commit
    

    # 配置PE3。

    [~PE3] mpls ldp remote-peer pe1
    [*PE3-mpls-ldp-remote-pe1] remote-ip 1.1.1.1
    [*PE3-mpls-ldp-remote-pe1] quit
    [*PE3] commit
    

    上述配置完成后,各PE节点之间应该建立起远端LDP会话。在各节点上执行display mpls ldp session命令可以看到显示结果中Status项为“Operational”。以PE1的显示为例:

    [~PE1] display mpls ldp session
     LDP Session(s) in Public Network
     LAM: Label Advertisement Mode,  KA: KeepAlive
     SsnAge: Session Age, Unit(DDDD:HH:MM)
     An asterisk (*) before a session means the session is being deleted.
     ------------------------------------------------------------------------------
     PeerID             Status      LAM  SsnRole  SsnAge      KASent/Rcv
     ------------------------------------------------------------------------------
     2.2.2.2:0          Operational DU   Passive  0000:00:18  75/75
     4.4.4.4:0          Operational DU   Passive  0000:00:10  43/43
     5.5.5.5:0          Operational DU   Passive  0000:00:12  50/50
     ------------------------------------------------------------------------------
     TOTAL: 3 Session(s) Found.

    执行display mpls ldp lsp命令可以看到各PE设备都给自己的远端邻居分配了Liberal标签,但实际上这些标签在PWE3方式的MPLS L2VPN应用中是空闲无用的,且占用了大量系统资源。

    [~PE1] display mpls ldp lsp
     LDP LSP Information
     An asterisk (*) before an LSP means the LSP is not established
     An asterisk (*) before a Label means the USCB or DSCB is stale
     An asterisk (*) before a UpstreamPeer means the session is in GR state
     An asterisk (*) before a DS means the session is in GR state
     An asterisk (*) before a NextHop means the LSP is FRR LSP
     -------------------------------------------------------------------------------
     DestAddress/Mask   In/OutLabel    UpstreamPeer    NextHop          OutInterface
     -------------------------------------------------------------------------------
            1.1.1.1/32   3/NULL         2.2.2.2         127.0.0.1        Loop0
            1.1.1.1/32   3/NULL         5.5.5.5         127.0.0.1        Loop0
            1.1.1.1/32   3/NULL         4.4.4.4         127.0.0.1        Loop0
           *1.1.1.1/32   Liberal/1024                   DS/5.5.5.5
           *1.1.1.1/32   Liberal/1025                   DS/4.4.4.4
            2.2.2.2/32   NULL/3         -               40.1.1.2         Vlanif10
            2.2.2.2/32   1024/3         5.5.5.5         40.1.1.2         Vlanif10
            2.2.2.2/32   1024/3         4.4.4.4         40.1.1.2         Vlanif10
           *2.2.2.2/32   Liberal/1025                   DS/5.5.5.5
           *2.2.2.2/32   Liberal/1024                   DS/4.4.4.4
            4.4.4.4/32   NULL/1024      -               40.1.1.2         Vlanif10
            4.4.4.4/32   1025/1024      5.5.5.5         40.1.1.2         Vlanif10
            4.4.4.4/32   1025/1024      4.4.4.4         40.1.1.2         Vlanif10
           *4.4.4.4/32   Liberal/1026                   DS/5.5.5.5
           *4.4.4.4/32   Liberal/3                      DS/4.4.4.4
            5.5.5.5/32   NULL/1026      -               40.1.1.2         Vlanif10
            5.5.5.5/32   1022/1026      5.5.5.5         40.1.1.2         Vlanif10
            5.5.5.5/32   1022/1026      4.4.4.4         40.1.1.2         Vlanif10
           *5.5.5.5/32   Liberal/3                      DS/5.5.5.5
           *5.5.5.5/32   Liberal/1026                   DS/4.4.4.4
     -------------------------------------------------------------------------------
     TOTAL: 12 Normal LSP(s) Found, 8 Liberal LSP(s) Found
            0 FRR LSP(s) Found.

  5. 在PW两端的PE之间配置禁止向远端对等体分配标签

    # 配置PE1。

    [~PE1] mpls ldp remote-peer pe2
    [~PE1-mpls-ldp-remote-pe2] remote-ip 5.5.5.5 pwe3
    [*PE1-mpls-ldp-remote-pe2] quit
    [*PE1] mpls ldp remote-peer pe3
    [*PE1-mpls-ldp-remote-pe3] remote-ip 4.4.4.4 pwe3
    [*PE1-mpls-ldp-remote-pe3] quit
    [*PE1] commit
    

    # 配置PE2。

    [~PE2] mpls ldp remote-peer pe1
    [~PE2-mpls-ldp-remote-pe1] remote-ip 1.1.1.1 pwe3
    [*PE2-mpls-ldp-remote-pe1] quit
    [*PE2] commit
    

    # 配置PE3。

    [~PE3] mpls ldp remote-peer pe1
    [~PE3-mpls-ldp-remote-pe1] remote-ip 1.1.1.1 pwe3
    [*PE3-mpls-ldp-remote-pe1] quit
    [*PE3] commit
    

    上述配置完成后,相邻节点之间应该LDP远端会话所分配的标签将会被禁止。在各节点上执行display mpls ldp lsp命令可以看到配置禁止向远端对等体分配标签后的LSP建立情况。以PE1的显示为例:

    [~PE1] display mpls ldp lsp
     LDP LSP Information
     An asterisk (*) before an LSP means the LSP is not established
     An asterisk (*) before a Label means the USCB or DSCB is stale
     An asterisk (*) before a UpstreamPeer means the session is in GR state
     An asterisk (*) before a DS means the session is in GR state
     An asterisk (*) before a NextHop means the LSP is FRR LSP
     -------------------------------------------------------------------------------
     DestAddress/Mask   In/OutLabel    UpstreamPeer    NextHop          OutInterface
     -------------------------------------------------------------------------------
            1.1.1.1/32   3/NULL         2.2.2.2         127.0.0.1        Loop0
           *1.1.1.1/32   Liberal/1025                   DS/2.2.2.2
            2.2.2.2/32   NULL/3         -               40.1.1.2         Vlanif10
            2.2.2.2/32   1024/3         2.2.2.2         40.1.1.2         Vlanif10
           *2.2.2.2/32   Liberal/1025                   DS/5.5.5.5
            4.4.4.4/32   NULL/1024      -               40.1.1.2         Vlanif10
            4.4.4.4/32   1025/1024      2.2.2.2         40.1.1.2         Vlanif10
           *4.4.4.4/32   Liberal/1026                   DS/5.5.5.5
            5.5.5.5/32   NULL/1026      -               40.1.1.2         Vlanif10
            5.5.5.5/32   1022/1026      2.2.2.2         40.1.1.2         Vlanif10
           *5.5.5.5/32   Liberal/3                      DS/5.5.5.5
     -------------------------------------------------------------------------------
     TOTAL: 7 Normal LSP(s) Found, 4 Liberal LSP(s) Found
            0 FRR LSP(s) Found.

    大量空闲的远端标签及LSP已经撤销,LSP的建立情况又恢复到了只有本地会话的情况。

配置文件

  • PE1的配置文件

    #
    sysname PE1
    #
    vlan batch 10
    #
    mpls lsr-id 1.1.1.1
    mpls
    #
    mpls ldp
     #
     ipv4-family
    #
    mpls ldp remote-peer pe2
     remote-ip 5.5.5.5 pwe3
    #
    mpls ldp remote-peer pe3
     remote-ip 4.4.4.4 pwe3
    #
    isis 1
     is-level level-2
     network-entity 86.4501.0010.0100.0001.00
    #
    interface Vlanif10
     ip address 40.1.1.1 255.255.255.0
     isis enable 1
     mpls
     mpls ldp
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface LoopBack0
     ip address 1.1.1.1 255.255.255.255
     isis enable 1
    #
    return
    
  • P的配置文件

    #
    sysname P
    #
    vlan batch 10 20 30
    #
    mpls lsr-id 2.2.2.2
    mpls
    #
    mpls ldp
     #
     ipv4-family
    #
    isis 1
     is-level level-2
     network-entity 86.4501.0030.0300.0003.00
    #
    interface Vlanif10
     ip address 40.1.1.2 255.255.255.0
     isis enable 1
     mpls
     mpls ldp
    #
    interface Vlanif20
     ip address 20.1.1.1 255.255.255.0
     isis enable 1
     mpls
     mpls ldp
    #
    interface Vlanif30
     ip address 30.1.1.1 255.255.255.0
     isis enable 1
     mpls
     mpls ldp
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface 10GE1/0/2
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    interface 10GE1/0/3
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    interface LoopBack0
     ip address 2.2.2.2 255.255.255.255
     isis enable 1
    #
    return
    
  • PE2的配置文件

    #
    sysname PE2
    #
    vlan batch 20
    #
    mpls lsr-id 5.5.5.5
    mpls
    #
    mpls ldp
     #
     ipv4-family
    #
    mpls ldp remote-peer pe1
     remote-ip 1.1.1.1 pwe3
    #
    isis 1
     is-level level-2
     network-entity 86.4501.0050.0500.0005.00
    #
    interface Vlanif20
     ip address 20.1.1.2 255.255.255.0
     isis enable 1
     mpls
     mpls ldp
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    interface LoopBack0
     ip address 5.5.5.5 255.255.255.255
     isis enable 1
    #
    return
    
  • PE3的配置文件

    #
    sysname PE3
    #
    vlan batch 30
    #
    mpls lsr-id 4.4.4.4
    mpls
    #
    mpls ldp
     #
     ipv4-family
    #
    mpls ldp remote-peer pe1
     remote-ip 1.1.1.1 pwe3
    #
    isis 1
     is-level level-2
     network-entity 86.4501.0040.0400.0004.00
    #
    interface Vlanif30
     ip address 30.1.1.2 255.255.255.0
     isis enable 1
     mpls
     mpls ldp
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    interface LoopBack0
     ip address 4.4.4.4 255.255.255.255
     isis enable 1
    #
    return
翻译
下载文档
更新时间:2019-05-05

文档编号:EDOC1100004215

浏览量:29356

下载量:486

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