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

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

提示

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

升级

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

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

配置MPLS QoS模式示例(L2VPN)

组网需求

图4-10,CE1、CE3分别连接企业A的总部和分支,CE2、CE4分别连接企业B的总部和分支。通过在PE1和PE2上部署Martini方式VLL,实现企业A总部和分支机构的互联,以及企业B总部和分支机构的互联。

由于企业A的服务等级高,要求给企业A提供更好的QoS保证。

图4-10  MPLS QoS模式组网

配置思路

  1. 在CE上配置各接口所属VLAN和VLANIF接口的IP地址。

  2. 在PE1、P、PE2上配置IGP路由协议实现互通。

  3. 在PE1、P、PE2上配置MPLS基本能力和MPLS LDP,建立LDP LSP。

  4. 在PE1和PE2上配置远端LDP会话,用于将本端VC标签传递给对端。

  5. 在PE1和PE2上配置MPLS QoS,配置Pipe模式,企业A和企业B的mpls-exp值分别设置为4和3,实现对企业A的业务提供更好的QoS保证。

  6. 在PE1和PE2上配置Martini方式VLL。

操作步骤

  1. 在CE上配置各接口所属VLAN和VLANIF接口的IP地址

    # 配置CE1。CE2、CE3和CE4与CE1类似,此处不再赘述。

    <Quidway> system-view
    [Quidway] sysname CE1
    [CE1] vlan batch 10
    [CE1] interface vlanif 10
    [CE1-Vlanif10] ip address 10.1.1.1 255.255.255.0
    [CE1-Vlanif10] quit
    [CE1] interface gigabitethernet 1/0/1
    [CE1-GigabitEthernet1/0/1] port link-type trunk
    [CE1-GigabitEthernet1/0/1] port trunk allow-pass vlan 10
    [CE1-GigabitEthernet1/0/1] quit

  2. 在MPLS骨干网上配置OSPF协议,实现骨干网PE和P的互通

    # 配置PE1。

    <Quidway> system-view
    [Quidway] sysname PE1
    [PE1] interface loopback 1
    [PE1-LoopBack1] ip address 1.1.1.9 32
    [PE1-LoopBack1] quit
    [PE1] vlan batch 10 20 30
    [PE1] interface gigabitethernet 1/0/1
    [PE1-GigabitEthernet1/0/1] port link-type trunk
    [PE1-GigabitEthernet1/0/1] port trunk allow-pass vlan 10
    [PE1-GigabitEthernet1/0/1] quit
    [PE1] interface gigabitethernet 2/0/2
    [PE1-GigabitEthernet2/0/2] port link-type trunk
    [PE1-GigabitEthernet2/0/2] port trunk allow-pass vlan 20
    [PE1-GigabitEthernet2/0/2] quit
    [PE1] interface gigabitethernet 3/0/3
    [PE1-GigabitEthernet3/0/3] port link-type trunk
    [PE1-GigabitEthernet3/0/3] port trunk allow-pass vlan 30 
    [PE1-GigabitEthernet3/0/3] quit
    [PE1] interface vlanif 30
    [PE1-Vlanif30] ip address 172.1.1.1 24
    [PE1-Vlanif30] quit
    [PE1] ospf 1
    [PE1-ospf-1] area 0
    [PE1-ospf-1-area-0.0.0.0] network 172.1.1.0 0.0.0.255
    [PE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0
    [PE1-ospf-1-area-0.0.0.0] quit
    [PE1-ospf-1] quit

    # 配置P。

    <Quidway> system-view
    [Quidway] sysname P
    [P] interface loopback 1
    [P-LoopBack1] ip address 2.2.2.9 32
    [P-LoopBack1] quit
    [P] vlan batch 30 60
    [P] interface gigabitethernet 1/0/1 
    [P-GigabitEthernet1/0/1] port link-type trunk
    [P-GigabitEthernet1/0/1] port trunk allow-pass vlan 30
    [P-GigabitEthernet1/0/1] quit
    [P] interface gigabitethernet 2/0/2
    [P-GigabitEthernet2/0/2] port link-type trunk
    [P-GigabitEthernet2/0/2] port trunk allow-pass vlan 60
    [P-GigabitEthernet2/0/2] quit
    [P] interface vlanif 30
    [P-Vlanif30] ip address 172.1.1.2 24
    [P-Vlanif30] quit
    [P] interface vlanif 60
    [P-Vlanif60] ip address 172.2.1.1 24
    [P-Vlanif60] quit
    [P] ospf
    [P-ospf-1] area 0
    [P-ospf-1-area-0.0.0.0] network 172.1.1.0 0.0.0.255
    [P-ospf-1-area-0.0.0.0] network 172.2.1.0 0.0.0.255
    [P-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0
    [P-ospf-1-area-0.0.0.0] quit
    [P-ospf-1] quit

    # 配置PE2。

    <Quidway> system-view
    [Quidway] sysname PE2
    [PE2] interface loopback 1
    [PE2-LoopBack1] ip address 3.3.3.9 32
    [PE2-LoopBack1] quit
    [PE2] vlan batch 40 50 60
    [PE2] interface gigabitethernet 1/0/1
    [PE2-GigabitEthernet1/0/1] port link-type trunk
    [PE2-GigabitEthernet1/0/1] port trunk allow-pass vlan 40
    [PE2-GigabitEthernet1/0/1] quit
    [PE2] interface gigabitethernet 2/0/2 
    [PE2-GigabitEthernet2/0/2] port link-type trunk
    [PE2-GigabitEthernet2/0/2] port trunk allow-pass vlan 50
    [PE2-GigabitEthernet2/0/2] quit
    [PE2] interface gigabitethernet 3/0/3 
    [PE2-GigabitEthernet3/0/3] port link-type trunk
    [PE2-GigabitEthernet3/0/3] port trunk allow-pass vlan 60
    [PE2-GigabitEthernet3/0/3] quit
    [PE2] interface vlanif 60
    [PE2-Vlanif60] ip address 172.2.1.2 24
    [PE2-Vlanif60] quit
    [PE2] ospf
    [PE2-ospf-1] area 0
    [PE2-ospf-1-area-0.0.0.0] network 172.2.1.0 0.0.0.255
    [PE2-ospf-1-area-0.0.0.0] network 3.3.3.9 0.0.0.0
    [PE2-ospf-1-area-0.0.0.0] quit
    [PE2-ospf-1] quit

    配置完成后,PE1、P、PE2之间应能建立OSPF邻居关系,执行display ip routing-table命令可以看到PE之间学习到对方的Loopback1路由。

  3. 在MPLS骨干网上配置MPLS基本能力和MPLS LDP,建立LDP LSP

    # 配置PE1。

    [PE1] mpls lsr-id 1.1.1.9
    [PE1] mpls
    [PE1-mpls] quit
    [PE1] mpls ldp
    [PE1-mpls-ldp] quit
    [PE1] interface vlanif 30
    [PE1-Vlanif30] mpls
    [PE1-Vlanif30] mpls ldp
    [PE1-Vlanif30] quit

    # 配置P。

    [P] mpls lsr-id 2.2.2.9
    [P] mpls
    [P-mpls] quit
    [P] mpls ldp
    [P-mpls-ldp] quit
    [P] interface vlanif 30
    [P-Vlanif30] mpls
    [P-Vlanif30] mpls ldp
    [P-Vlanif30] quit
    [P] interface vlanif 60
    [P-Vlanif60] mpls
    [P-Vlanif60] mpls ldp
    [P-Vlanif60] quit

    # 配置PE2。

    [PE2] mpls lsr-id 3.3.3.9
    [PE2] mpls
    [PE2-mpls] quit
    [PE2] mpls ldp
    [PE2-mpls-ldp] quit
    [PE2] interface vlanif 60
    [PE2-Vlanif60] mpls
    [PE2-Vlanif60] mpls ldp
    [PE2-Vlanif60] quit

    上述配置完成后,PE1与P、P与PE2之间应能建立LDP会话,执行display mpls ldp session命令可以看到显示结果中Status项为“Operational”。以PE1的显示为例。

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

  4. 在PE之间建立远端LDP会话

    # 配置PE1。

    [PE1] mpls ldp remote-peer 3.3.3.9
    [PE1-mpls-ldp-remote-3.3.3.9] remote-ip 3.3.3.9
    [PE1-mpls-ldp-remote-3.3.3.9] quit

    # 配置PE2。

    [PE2] mpls ldp remote-peer 1.1.1.9
    [PE2-mpls-ldp-remote-1.1.1.9] remote-ip 1.1.1.9
    [PE2-mpls-ldp-remote-1.1.1.9] quit

    上述配置完成后,在PE1上执行display mpls ldp session命令查看LDP会话的建立情况,可以看到增加了与PE2的远端LDP会话。以PE1的显示为例。

    [PE1] display mpls ldp session
    
     LDP Session(s) in Public Network
     Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM)
     A '*' before a session means the session is being deleted.
     ------------------------------------------------------------------------------
     PeerID             Status      LAM  SsnRole  SsnAge      KASent/Rcv
     ------------------------------------------------------------------------------
     2.2.2.9:0          Operational DU   Passive  0000:00:09  40/40
     3.3.3.9:0          Operational DU   Passive  0000:00:09  37/37
     ------------------------------------------------------------------------------
     TOTAL: 2 session(s) Found.
    
    

  5. 配置MPLS QoS

    # 配置PE1。

    [PE1] mpls-qos ingress use vpn-label-exp
    [PE1] interface vlanif 10
    [PE1-Vlanif10] diffserv-mode pipe mpls-exp 4
    [PE1-Vlanif10] quit
    [PE1] interface vlanif 20
    [PE1-Vlanif20] diffserv-mode pipe mpls-exp 3
    [PE1-Vlanif20] quit

    # 配置PE2。

    [PE2] mpls-qos ingress use vpn-label-exp
    [PE2] interface vlanif 40
    [PE2-Vlanif40] diffserv-mode pipe mpls-exp 4
    [PE2-Vlanif40] quit
    [PE2] interface vlanif 50
    [PE2-Vlanif50] diffserv-mode pipe mpls-exp 3
    [PE2-Vlanif50] quit

    说明:

    配置完成后,在用户视图下执行命令reset mpls ldp重启MPLS LDP,使配置生效。

  6. 在PE上配置Martini方式VLL,并创建VC连接

    # 在PE1上接入CE1的接口VLANIF10和接入CE2的接口VLANIF20上创建VC。

    [PE1] mpls l2vpn
    [PE1-l2vpn] quit
    [PE1] interface vlanif 10
    [PE1-Vlanif10] mpls l2vc 3.3.3.9 101
    [PE1-Vlanif10] quit
    [PE1] interface vlanif 20
    [PE1-Vlanif20] mpls l2vc 3.3.3.9 102
    [PE1-Vlanif20] quit

    # 在PE2上接入CE3的接口VLANIF40和接入CE4的接口VLANIF50上创建VC。

    [PE2] mpls l2vpn
    [PE2-l2vpn] quit
    [PE2] interface vlanif 40
    [PE2-Vlanif40] mpls l2vc 1.1.1.9 101
    [PE2-Vlanif40] quit
    [PE2] interface vlanif 50
    [PE2-Vlanif50] mpls l2vc 1.1.1.9 102
    [PE2-Vlanif50] quit

  7. 检查配置结果

    # 在PE设备上执行display mpls l2vc命令,可以看到建立了两条L2 VC,状态为UP,并且DiffServ模式为pipe。以PE1的显示为例。

    [PE1] display mpls l2vc
     Total LDP VC : 2     2 up       0 down
    
     *client interface       : Vlanif10 is up
      Administrator PW       : no
      session state          : up
      AC status              : up
      Ignore AC state        : disable
      VC state               : up
      Label state            : 0
      Token state            : 0
      VC ID                  : 101
      VC type                : VLAN
      destination            : 3.3.3.9
      local VC label         : 1031         remote VC label      : 1030
      control word           : disable
      remote control word    : disable
      forwarding entry       : exist
      local group ID         : 0
      remote group ID        : 0
      local AC OAM State     : up
      local PSN OAM State    : up
      local forwarding state : forwarding
      local status code      : 0x0
      remote AC OAM state    : up
      remote PSN OAM state   : up
      remote forwarding state: forwarding
      remote status code     : 0x0
      ignore standby state   : no
      BFD for PW             : unavailable
      VCCV State             : up
      manual fault           : not set
      active state           : active
      link state             : up
      local VC MTU           : 1500         remote VC MTU        : 1500
      local VCCV             : alert ttl lsp-ping bfd
      remote VCCV            : alert ttl lsp-ping bfd
      tunnel policy name     : --
      PW template name       : --
      primary or secondary   : primary
      load balance type      : flow
      Access-port            : false
      Switchover Flag        : false
      VC tunnel/token info   : 1 tunnels/tokens
        NO.0  TNL type       : lsp   , TNL ID : 0x48000029
        Backup TNL type      : lsp   , TNL ID : 0x0
      create time            : 0 days, 3 hours, 26 minutes, 17 seconds
      up time                : 0 days, 0 hours, 26 minutes, 12 seconds
      last change time       : 0 days, 0 hours, 26 minutes, 12 seconds
      VC last up time        : 2017/10/17 19:02:05
      VC total up time       : 0 days, 3 hours, 23 minutes, 8 seconds
      CKey                   : 2
      NKey                   : 1
      PW redundancy mode     : frr
      AdminPw interface      : --
      AdminPw link state     : --
      Diffserv Mode          : pipe
      Service Class          : af4
      Color                  : --
      DomainId               : --
      Domain Name            : --
    
     *client interface       : Vlanif20 is up
      Administrator PW       : no
      session state          : up
      AC status              : up
      Ignore AC state        : disable
      VC state               : up
      Label state            : 0
      Token state            : 0
      VC ID                  : 102
      VC type                : VLAN
      destination            : 3.3.3.9
      local VC label         : 1032         remote VC label      : 1031
      control word           : disable
      remote control word    : disable
      forwarding entry       : exist
      local group ID         : 0
      remote group ID        : 0
      local AC OAM State     : up
      local PSN OAM State    : up
      local forwarding state : forwarding
      local status code      : 0x0
      remote AC OAM state    : up
      remote PSN OAM state   : up
      remote forwarding state: forwarding
      remote status code     : 0x0
      ignore standby state   : no
      BFD for PW             : unavailable
      VCCV State             : up
      manual fault           : not set
      active state           : active
      link state             : up
      local VC MTU           : 1500         remote VC MTU        : 1500
      local VCCV             : alert ttl lsp-ping bfd
      remote VCCV            : alert ttl lsp-ping bfd
      tunnel policy name     : --
      PW template name       : --
      primary or secondary   : primary
      load balance type      : flow
      Access-port            : false
      Switchover Flag        : false
      VC tunnel/token info   : 1 tunnels/tokens
        NO.0  TNL type       : lsp   , TNL ID : 0x48000029
        Backup TNL type      : lsp   , TNL ID : 0x0
      create time            : 0 days, 3 hours, 26 minutes, 0 seconds
      up time                : 0 days, 0 hours, 26 minutes, 16 seconds
      last change time       : 0 days, 0 hours, 26 minutes, 16 seconds
      VC last up time        : 2017/10/17 19:02:05
      VC total up time       : 0 days, 3 hours, 22 minutes, 48 seconds
      CKey                   : 3
      NKey                   : 1
      PW redundancy mode     : frr
      AdminPw interface      : --
      AdminPw link state     : --
      Diffserv Mode          : pipe
      Service Class          : af3
      Color                  : --
      DomainId               : --
      Domain Name            : --

    # CE1和CE3能够互相Ping通,CE2和CE4能够互相Ping通。以CE1的显示为例。

    [CE1] ping 10.1.1.2
      PING 10.1.1.2: 56  data bytes, press CTRL_C to break
        Reply from 10.1.1.2: bytes=56 Sequence=1 ttl=254 time=1 ms
        Reply from 10.1.1.2: bytes=56 Sequence=2 ttl=254 time=1 ms
        Reply from 10.1.1.2: bytes=56 Sequence=3 ttl=254 time=1 ms
        Reply from 10.1.1.2: bytes=56 Sequence=4 ttl=254 time=1 ms
        Reply from 10.1.1.2: bytes=56 Sequence=5 ttl=254 time=1 ms
    
      --- 10.1.1.2 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 1/1/1 ms

配置文件

  • PE1的配置文件

    #
    sysname PE1
    #
    vlan batch 10 20 30
    #
    mpls lsr-id 1.1.1.9
    mpls
    #
    mpls l2vpn
    #
    mpls ldp
    #
    mpls ldp remote-peer 3.3.3.9
     remote-ip 3.3.3.9
    #
    interface Vlanif10
     mpls l2vc 3.3.3.9 101
     diffserv-mode pipe mpls-exp 4
    #
    interface Vlanif20
     mpls l2vc 3.3.3.9 102
     diffserv-mode pipe mpls-exp 3
    #
    interface Vlanif30
     ip address 172.1.1.1 255.255.255.0
     mpls
     mpls ldp
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    # 
    interface GigabitEthernet2/0/2
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    interface GigabitEthernet3/0/3
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    interface LoopBack1
     ip address 1.1.1.9 255.255.255.255
    #
    ospf 1
     area 0.0.0.0
      network 1.1.1.9 0.0.0.0
      network 172.1.1.0 0.0.0.255
    #
    mpls-qos ingress use vpn-label-exp
    #
    return
  • P的配置文件

    #
    sysname P
    #
    vlan batch 30 60
    #
    mpls lsr-id 2.2.2.9
    mpls
    #
    mpls ldp
    # 
    interface Vlanif30
     ip address 172.1.1.2 255.255.255.0
     mpls
     mpls ldp
    #
    interface Vlanif60
     ip address 172.2.1.1 255.255.255.0
     mpls
     mpls ldp
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 30
    # 
    interface GigabitEthernet2/0/2
     port link-type trunk
     port trunk allow-pass vlan 60
    # 
    interface LoopBack1
     ip address 2.2.2.9 255.255.255.255
    #
    ospf 1
     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
    #
    return
  • PE2的配置文件

    #
    sysname PE2
    #
    vlan batch 40 50 60
    #
    mpls lsr-id 3.3.3.9
    mpls
    #
    mpls l2vpn
    #
    mpls ldp
    #
    mpls ldp remote-peer 1.1.1.9
     remote-ip 1.1.1.9
    #
    interface Vlanif40
     mpls l2vc 1.1.1.9 101
     diffserv-mode pipe mpls-exp 4
    #
    interface Vlanif50
     mpls l2vc 1.1.1.9 102
     diffserv-mode pipe mpls-exp 3
    #
    interface Vlanif60
     ip address 172.2.1.2 255.255.255.0
     mpls
     mpls ldp
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 40
    # 
    interface GigabitEthernet2/0/2
     port link-type trunk
     port trunk allow-pass vlan 50
    # 
    interface GigabitEthernet3/0/3
     port link-type trunk
     port trunk allow-pass vlan 60
    # 
    interface LoopBack1
     ip address 3.3.3.9 255.255.255.255
    #
    ospf 1
     area 0.0.0.0
      network 3.3.3.9 0.0.0.0
      network 172.2.1.0 0.0.0.255
    #
    mpls-qos ingress use vpn-label-exp
    #
    return
  • CE1的配置文件

    #
    sysname CE1
    #
    vlan batch 10
    #
    interface Vlanif10
     ip address 10.1.1.1 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    return
  • CE2的配置文件

    #
    sysname CE2
    #
    vlan batch 20
    #
    interface Vlanif20
     ip address 10.2.1.1 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    return
  • CE3的配置文件

    #
    sysname CE3
    #
    vlan batch 40
    #
    interface Vlanif40
     ip address 10.1.1.2 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 40
    #
    return
  • CE4的配置文件

    #
    sysname CE4
    #
    vlan batch 50
    #
    interface Vlanif50
     ip address 10.2.1.2 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 50
    #
    return
翻译
下载文档
更新时间:2019-08-20

文档编号:EDOC1000141521

浏览量:8791

下载量:344

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