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

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

提示

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

升级

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

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

配置MPLS QoS模式示例(L3VPN)

组网需求

企业A和企业B通过部署BGP/MPLS IP VPN,实现总部和分支机构的互联。如图4-9,CE1、CE3连接企业A的总部和分支,CE2、CE4连接企业B的总部和分支。企业A使用vpna,企业B使用vpnb。

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

图4-9  MPLS QoS模式组网

配置思路

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

操作步骤

  1. 在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路由。

  2. 在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   Active   0000:00:01  6/6
     ------------------------------------------------------------------------------
     TOTAL: 1 session(s) Found.
    

  3. 在PE设备上配置VPN实例,将CE接入PE

    # 配置PE1。

    [PE1] ip vpn-instance vpna
    [PE1-vpn-instance-vpna] ipv4-family
    [PE1-vpn-instance-vpna-af-ipv4] route-distinguisher 100:1
    [PE1-vpn-instance-vpna-af-ipv4] vpn-target 111:1 both
    [PE1-vpn-instance-vpna-af-ipv4] quit
    [PE1-vpn-instance-vpna] quit
    [PE1] ip vpn-instance vpnb
    [PE1-vpn-instance-vpnb] ipv4-family
    [PE1-vpn-instance-vpnb-af-ipv4] route-distinguisher 100:2
    [PE1-vpn-instance-vpnb-af-ipv4] vpn-target 222:2 both
    [PE1-vpn-instance-vpnb-af-ipv4] quit
    [PE1-vpn-instance-vpnb] quit
    [PE1] interface vlanif 10
    [PE1-Vlanif10] ip binding vpn-instance vpna
    [PE1-Vlanif10] ip address 10.1.1.2 24
    [PE1-Vlanif10] quit
    [PE1] interface vlanif 20
    [PE1-Vlanif20] ip binding vpn-instance vpnb
    [PE1-Vlanif20] ip address 10.2.1.2 24
    [PE1-Vlanif20] quit
    

    # 配置PE2。

    [PE2] ip vpn-instance vpna
    [PE2-vpn-instance-vpna] ipv4-family
    [PE2-vpn-instance-vpna-af-ipv4] route-distinguisher 200:1
    [PE2-vpn-instance-vpna-af-ipv4] vpn-target 111:1 both
    [PE2-vpn-instance-vpna-af-ipv4] quit
    [PE2-vpn-instance-vpna] quit
    [PE2] ip vpn-instance vpnb
    [PE2-vpn-instance-vpnb] ipv4-family
    [PE2-vpn-instance-vpnb-af-ipv4] route-distinguisher 200:2
    [PE2-vpn-instance-vpnb-af-ipv4] vpn-target 222:2 both
    [PE2-vpn-instance-vpnb-af-ipv4] quit
    [PE2-vpn-instance-vpnb] quit
    [PE2] interface vlanif 40
    [PE2-Vlanif40] ip binding vpn-instance vpna
    [PE2-Vlanif40] ip address 10.3.1.2 24
    [PE2-Vlanif40] quit
    [PE2] interface vlanif 50
    [PE2-Vlanif50] ip binding vpn-instance vpnb
    [PE2-Vlanif50] ip address 10.4.1.2 24
    [PE2-Vlanif50] quit

    # 按图4-9配置各CE的接口IP地址,配置过程略。

    配置完成后,各PE能Ping通自己接入的CE。

    说明:

    当PE上有多个接口绑定了同一个VPN,则使用ping -vpn-instance命令Ping对端PE接入的CE时,要指定源IP地址,即要指定ping -vpn-instance vpn-instance-name -a source-ip-address dest-ip-address命令中的参数-a source-ip-address,否则可能Ping不通。

    以PE1和CE1为例:

    [PE1] ping -vpn-instance vpna 10.1.1.1
      PING 10.1.1.1: 56  data bytes, press CTRL_C to break
        Reply from 10.1.1.1: bytes=56 Sequence=1 ttl=255 time=5 ms
        Reply from 10.1.1.1: bytes=56 Sequence=2 ttl=255 time=3 ms
        Reply from 10.1.1.1: bytes=56 Sequence=3 ttl=255 time=3 ms
        Reply from 10.1.1.1: bytes=56 Sequence=4 ttl=255 time=3 ms
        Reply from 10.1.1.1: bytes=56 Sequence=5 ttl=255 time=16 ms
    
      --- 10.1.1.1 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 3/6/16 ms 

  4. 在PE之间建立MP-IBGP对等体关系

    # 配置PE1。

    [PE1] bgp 100
    [PE1-bgp] peer 3.3.3.9 as-number 100
    [PE1-bgp] peer 3.3.3.9 connect-interface loopback 1
    [PE1-bgp] ipv4-family vpnv4
    [PE1-bgp-af-vpnv4] peer 3.3.3.9 enable
    [PE1-bgp-af-vpnv4] quit
    [PE1-bgp] quit

    # 配置PE2。

    [PE2] bgp 100
    [PE2-bgp] peer 1.1.1.9 as-number 100
    [PE2-bgp] peer 1.1.1.9 connect-interface loopback 1
    [PE2-bgp] ipv4-family vpnv4
    [PE2-bgp-af-vpnv4] peer 1.1.1.9 enable
    [PE2-bgp-af-vpnv4] quit
    [PE2-bgp] quit

    配置完成后,在PE设备上执行display bgp peer命令,可以看到PE之间的BGP对等体关系已建立,并达到Established状态。

    [PE1] display bgp peer
    
     BGP local router ID : 1.1.1.9
     Local AS number : 100
     Total number of peers : 1                 Peers in established state : 1
    
      Peer            V    AS  MsgRcvd  MsgSent  OutQ  Up/Down       State              PrefRcv
    
      3.3.3.9         4   100       12        6     0 00:02:21        Established       0
    

  5. 在PE与CE之间建立EBGP对等体关系,引入VPN路由

    # 配置CE1。

    [CE1] bgp 65410
    [CE1-bgp] peer 10.1.1.2 as-number 100
    [CE1-bgp] import-route direct
    

    CE2、CE3、CE4配置与CE1设备配置类似,配置过程省略。

    # 配置PE1。

    [PE1] bgp 100
    [PE1-bgp] ipv4-family vpn-instance vpna
    [PE1-bgp-vpna] peer 10.1.1.1 as-number 65410
    [PE1-bgp-vpna] import-route direct
    [PE1-bgp-vpna] quit
    [PE1-bgp] ipv4-family vpn-instance vpnb
    [PE1-bgp-vpnb] peer 10.2.1.1 as-number 65420
    [PE1-bgp-vpnb] import-route direct
    [PE1-bgp-vpnb] quit
    [PE1-bgp] quit

    PE2的配置与PE1类似,配置过程省略。

    配置完成后,在PE设备上执行display bgp vpnv4 vpn-instance peer命令,可以看到PE与CE之间的BGP对等体关系已建立,并达到Established状态。

    以PE1与CE1的对等体关系为例:

    [PE1] display bgp vpnv4 vpn-instance vpna peer
    
     BGP local router ID : 1.1.1.9
     Local AS number : 100
     Total number of peers : 1                 Peers in established state : 1
    
      Peer            V    AS  MsgRcvd  MsgSent  OutQ  Up/Down       State      PrefRcv
    
      10.1.1.1        4 65410       11        9     0 00:07:25      Established       1
    

  6. 配置MPLS QoS

    #配置PE1。

    [PE1] mpls-qos ingress use vpn-label-exp
    [PE1] ip vpn-instance vpna
    [PE1-vpn-instance-vpna] diffserv-mode pipe mpls-exp 4
    [PE1-vpn-instance-vpna] quit
    [PE1] ip vpn-instance vpnb
    [PE1-vpn-instance-vpnb] diffserv-mode pipe mpls-exp 3
    [PE1-vpn-instance-vpnb] quit

    #配置PE2。

    [PE2] mpls-qos ingress use vpn-label-exp
    [PE2] ip vpn-instance vpna
    [PE2-vpn-instance-vpna] diffserv-mode pipe mpls-exp 4
    [PE2-vpn-instance-vpna] quit
    [PE2] ip vpn-instance vpnb
    [PE2-vpn-instance-vpnb] diffserv-mode pipe mpls-exp 3
    [PE2-vpn-instance-vpnb] quit

    说明:

    配置完成后,需重启MPLS LDP和复位BGP连接,配置方能生效。

配置文件

  • PE1的配置文件

    #
    sysname PE1
    #
    vlan batch 10 20 30
    #
    mpls-qos ingress use vpn-label-exp
    #
    ip vpn-instance vpna
     ipv4-family
      route-distinguisher 100:1
      vpn-target 111:1 export-extcommunity
      vpn-target 111:1 import-extcommunity
      diffserv-mode pipe mpls-exp 4
    #
    ip vpn-instance vpnb
     ipv4-family
      route-distinguisher 100:2
      vpn-target 222:2 export-extcommunity
      vpn-target 222:2 import-extcommunity
      diffserv-mode pipe mpls-exp 3
    # 
    mpls lsr-id 1.1.1.9
    mpls
    #
    mpls ldp
    #
    interface Vlanif10
     ip binding vpn-instance vpna
     ip address 10.1.1.2 255.255.255.0
    # 
    interface Vlanif20
     ip binding vpn-instance vpnb
     ip address 10.2.1.2 255.255.255.0
    #
    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
    # 
    bgp 100
     peer 3.3.3.9 as-number 100
     peer 3.3.3.9 connect-interface LoopBack1
     #
     ipv4-family unicast
      undo synchronization
      peer 3.3.3.9 enable
     #
     ipv4-family vpnv4
      policy vpn-target
      peer 3.3.3.9 enable
     #
     ipv4-family vpn-instance vpna
      import-route direct
      peer 10.1.1.1 as-number 65410
     #
     ipv4-family vpn-instance vpnb
      import-route direct
      peer 10.2.1.1 as-number 65420
    #
    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
    #
    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-qos ingress use vpn-label-exp
    #
    ip vpn-instance vpna                                                            
     ipv4-family  
      route-distinguisher 200:1
      vpn-target 111:1 export-extcommunity
      vpn-target 111:1 import-extcommunity
      diffserv-mode pipe mpls-exp 4
    #
    ip vpn-instance vpnb                                                            
     ipv4-family           
      route-distinguisher 200:2
      vpn-target 222:2 export-extcommunity
      vpn-target 222:2 import-extcommunity
      diffserv-mode pipe mpls-exp 3
    #
    mpls lsr-id 3.3.3.9
    mpls
    #
    mpls ldp
    #
    interface Vlanif40
     ip binding vpn-instance vpna
     ip address 10.3.1.2 255.255.255.0
    #
    interface Vlanif50
     ip binding vpn-instance vpnb
     ip address 10.4.1.2 255.255.255.0
    #
    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
    #
    bgp 100
     peer 1.1.1.9 as-number 100
     peer 1.1.1.9 connect-interface LoopBack1
     #
     ipv4-family unicast
      undo synchronization
      peer 1.1.1.9 enable
     #
     ipv4-family vpnv4
      policy vpn-target
      peer 1.1.1.9 enable 
     #
     ipv4-family vpn-instance vpna
      import-route direct
      peer 10.3.1.1 as-number 65430
     #
     ipv4-family vpn-instance vpnb
      import-route direct
      peer 10.4.1.1 as-number 65440
    #
    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
    # 
    return
  • 企业A总部出口处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
    #
    bgp 65410
     peer 10.1.1.2 as-number 100
     #
     ipv4-family unicast
      undo synchronization
      import-route direct
      peer 10.1.1.2 enable
    #
    return
  • 企业B总部出口处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
    #
    bgp 65420
     peer 10.2.1.2 as-number 100
     #
     ipv4-family unicast
      undo synchronization
      import-route direct
      peer 10.2.1.2 enable
    #
    return
  • 企业A分支出口处CE3的配置文件

    #
    sysname CE3
    #
    vlan batch 40
    #
    interface Vlanif40
     ip address 10.3.1.1 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 40
    #
    bgp 65430
     peer 10.3.1.2 as-number 100
     #
     ipv4-family unicast
      undo synchronization
      import-route direct
      peer 10.3.1.2 enable
    #
    return
  • 企业B分支出口处CE4的配置文件

    #
    sysname CE4
    #
    vlan batch 50
    #
    interface Vlanif50
     ip address 10.4.1.1 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 50
    #
    bgp 65440
     peer 10.4.1.2 as-number 100
     #
     ipv4-family unicast
      undo synchronization
      import-route direct
      peer 10.4.1.2 enable
    #
    return
翻译
下载文档
更新时间:2019-08-20

文档编号:EDOC1000141521

浏览量:8294

下载量:343

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