• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

H3C MSR系列路由器典型配置举例(V5)-6W100

目录

32-MSR系列路由器MPLS L3VPN CE-nPE功能的典型配置举例

本章节下载 32-MSR系列路由器MPLS L3VPN CE-nPE功能的典型配置举例  (155.1 KB)

docurl=/cn/Service/Document_Software/Document_Center/Routers/Catalog/MSR/MSR_50/Configure/Typical_Configuration_Example/H3C_MSR_(V5)-6W100/201401/812743_30005_0.htm

32-MSR系列路由器MPLS L3VPN CE-nPE功能的典型配置举例

MSR系列路由器MPLS L3VPN CE-nPE功能的典型配置举例

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright © 2014 杭州华三通信技术有限公司 版权所有,保留一切权利。

非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部,

并不得以任何形式传播。本文档中的信息可能变动,恕不另行通知。

H3C_彩色.emf

目  录

1 简介

2 配置前提

3 配置举例

3.1 组网需求

3.2 配置思路

3.3 使用版本

3.4 配置步骤

3.4.1 设备PE A配置

3.4.2 设备PE B配置

3.4.3 设备CE配置

3.5 验证配置

3.6 配置文件

4 相关资料


1  简介

本文档介绍使用CE连接多个PE进行MPLS-VPN站点间冗余多链路访问的典型案例。

2  配置前提

本文档不严格与具体软、硬件版本对应,如果使用过程中与产品实际情况有差异,请参考相关产品手册,或以设备实际情况为准。

本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。

本文档假设您已了解MPLS-VPN冗余多链路的特性。

3  配置举例

3.1  组网需求

图1所示,PE APE B是VPN站点接入路由器,CE与PE A和PE B为MP-EBGP连接,PE A和PE B为MP-IBGP连接;从Site 1到Site 2有CE-PE B和CE-PE A-PE B两条路径。现要求:

·     从Site 1到Site 2的报文优先通过CE-PE B路径进行转发。

·     当CE-PE B路径出现故障时,报文转发路径能快速切换到CE-PE A-PE B路径上去。

图1 MSR系列路由器MPLS L3VPN CE-nPE功能的典型配置举例

设备

接口

IP地址

设备

接口

IP地址

PE A

Loop0

1.1.1.1/32

PE B

Loop0

2.2.2.2/32

 

Eth0/0

1.2.0.1/24

 

Eth0/0

1.2.0.2/24

 

Eth0/1

192.168.0.1/24

 

Eth0/1

172.32.0.1/24

CE

Eth0/0

192.168.0.2/24

 

Eth1/0

192.168.1.2/24

 

Eth0/1

192.168.2.1/24

Site 1

-

192.168.2.2/24

 

Eth1/0

192.168.1.2/24

Site 2

-

172.32.0.2/24

 

3.2  配置思路

由于PE B和CE没有EBGP邻接关系,为了让报文通过CE-PE B路径,需要在PE B上启动OSPF多实例,将OSPF多实例路由引入到VPN实例的路由表中,实现与CE正常访问。

3.3  使用版本

本举例是在Release 2311版本上进行配置和验证的。

3.4  配置步骤

3.4.1  设备PE A配置

# 配置接口IP地址。

<PEA> system-view

[PEA] interface loopback 0

[PEA-LoopBack0] ip address 1.1.1.1 255.255.255.255

[PEA-LoopBack0] quit

[PEA] interface ethernet 0/0

[PEA-Ethernet0/0] ip address 1.2.0.1 255.255.255.0

[PEA-Ethernet0/0] quit

[PEA] interface ethernet 0/1

[PEA-Ethernet0/1] ip address 192.168.0.1 255.255.255.0

[PEA-Ethernet0/1] quit

# 配置OSPF协议使网络互通。

[PEA] ospf 1

[PEA-ospf-1] area 0.0.0.0

[PEA-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0

[PEA-ospf-1-area-0.0.0.0] network 1.2.0.0 0.0.0.255

[PEA-ospf-1-area-0.0.0.0] quit

[PEA-ospf-1] quit

# 配置PE A的Router ID。

[PEA] router id 1.1.1.1

# 在PE A上开启ICMP超时报文发送功能和ICMP携带扩展信息功能,使能进行tracert配置。

[PEA] ip ttl-expires enable

[PEA] ip icmp-extensions compliant

# 在PE A配置MPLS和MPLS LDP功能。

[PEA] mpls lsr-id 1.1.1.1

[PEA] mpls

[PEA-mpls] quit

[PEA] mpls ldp

[PEA-mpls-ldp] quit

# 在接口Ethernet0/0配置MPLS和MPLS LDP功能。

[PEA] interface ethernet 0/0

[PEA-Ethernet0/0] mpls

[PEA-Ethernet0/0] mpls ldp

[PEA-Ethernet0/0] quit

# 在PE A上创建VPN实例vpna,并配置RD和VPN Target属性。

[PEA] ip vpn-instance vpna

[PEA-vpn-instance-vpna] route-distinguisher 1:1

[PEA-vpn-instance-vpna] vpn-target 1:1 export-extcommunity

[PEA-vpn-instance-vpna] vpn-target 1:1 import-extcommunity

[PEA-vpn-instance-vpna] quit

# 将接口Ethernet0/1绑定到vpna上。

[PEA] interface ethernet 0/1

[PEA-Ethernet0/1] ip binding vpn-instance vpna

[PEA-Ethernet0/1] ip address 192.168.0.1 255.255.255.0

[PEA-Ethernet0/1] quit

# 进入BGP视图,在PE间建立MP-BGP对等体。

[PEA] bgp 1

[PEA-bgp] undo synchronization

[PEA-bgp] peer 2.2.2.2 as-number 1

[PEA-bgp] peer 2.2.2.2 connect-interface loopback 0

# 进入BGP-VPNv4子地址族视图,配置VPNv4对等体2.2.2.2。

[PEA-bgp] ipv4-family vpnv4

[PEA-bgp-af-vpnv4] peer 2.2.2.2 enable

[PEA-bgp-af-vpnv4] quit

# 进入BGP-VPN实例视图,建立与CE的EBGP连接。

[PEA-bgp] ipv4-family vpn-instance vpna

[PEA-bgp-ipv4-vpna] peer 192.168.0.2 as-number 3

[PEA-bgp-ipv4-vpna] network 192.168.0.0

[PEA-bgp-ipv4-vpna] quit

[PEA-bgp] quit

3.4.2  设备PE B配置

# 配置接口IP地址。

<PEB> system-view

[PEB] interface loopback 0

[PEB-LoopBack0] ip address 2.2.2.2 255.255.255.255

[PEB-LoopBack0] quit

[PEB] interface ethernet 0/0

[PEB-Ethernet0/0] port link-mode route

[PEB-Ethernet0/0] ip address 1.2.0.2 255.255.255.0

[PEB-Ethernet0/0] quit

[PEB] interface ethernet 0/1

[PEB-Ethernet0/1] port link-mode route

[PEB-Ethernet0/1] ip address 192.168.1.1 255.255.255.0

[PEB-Ethernet0/1] quit

[PEB] interface ethernet 1/0

[PEB-Ethernet1/0] port link-mode route

[PEB-Ethernet1/0] ip address 192.168.1.1 255.255.255.0

[PEB-Ethernet1/0] quit

# 启动OSPF协议使网络互通。

[PEB] ospf 1

[PEB-ospf-1] area 0.0.0.0

[PEB-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0

[PEB-ospf-1-area-0.0.0.0] network 1.2.0.0 0.0.0.255

[PEB-ospf-1-area-0.0.0.0] quit

# 配置PE B的Router ID。

[PEB] router id 2.2.2.2

# 在PE B上开启ICMP超时报文发送功能和ICMP携带扩展信息功能,使能进行tracert配置。

[PEB] ip ttl-expires enable

[PEB] ip icmp-extensions compliant

# 在PE B配置MPLS和MPLS LDP功能。

[PEB] mpls lsr-id 2.2.2.2

[PEB] mpls

[PEB-mpls] quit

[PEB] mpls ldp

[PEB-mpls-ldp] quit

# 在接口Ethernet0/0配置MPLS和MPLS LDP功能。

[PEB] interface ethernet0/0

[PEB-Ethernet0/0] mpls

[PEB-Ethernet0/0] mpls ldp

[PEB-Ethernet0/0] quit

# 在PE B上创建VPN实例vpna,并配置RD和VPN Target属性。

[PEB] ip vpn-instance vpna

[PEB-vpn-instance-vpna] route-distinguisher 2:1

[PEB-vpn-instance-vpna] vpn-target 1:1 export-extcommunity

[PEB-vpn-instance-vpna] vpn-target 1:1 import-extcommunity

[PEB-vpn-instance-vpna] quit

# 将接口Ethernet0/1和Ethernet1/0绑定到vpna上

[PEB] interface ethernet 0/1

[PEB-Ethernet0/1] ip binding vpn-instance vpna

[PEB-Ethernet0/1] ip address 192.168.1.1 255.255.255.0

[PEB-Ethernet0/1] quit

[PEB] interface ethernet 1/0

[PEB-Ethernet1/0] ip binding vpn-instance vpna

[PEB-Ethernet1/0] ip address 192.168.1.1 255.255.255.0

[PEB-Ethernet1/0] quit

# 启动PE B的OSPF进程2,实例vpna的Router ID为192.168.1.1。

[PEB] ospf 2 router-id 192.168.1.1 vpn-instance vpna

[PEB-ospf-2] import-route bgp

[PEB-ospf-2] area 0.0.0.0

[PEB-ospf-2-area-0.0.0.0] network 172.32.0.0 0.0.0.255

[PEB-ospf-2-area-0.0.0.0] network 192.168.1.0 0.0.0.255

[PEB-ospf-2-area-0.0.0.0] quit

[PEB-ospf-2] quit

# 进入BGP视图,在PE间建立MP-BGP对等体。

[PEB] bgp 1

[PEB-bgp] undo synchronization

[PEB-bgp] peer 1.1.1.1 as-number 1

[PEB-bgp] peer 1.1.1.1 connect-interface loopback0

[PEB-bgp] quit

# 进入BGP-VPNv4子地址族视图,配置VPNv4对等体1.1.1.1。

[PEB] bgp 1

[PEB-bgp] ipv4-family vpnv4

[PEB-bgp-af-vpnv4] peer 1.1.1.1 enable

[PEB-bgp-af-vpnv4] quit

# 进入BGP-VPN实例视图,将直连路由和OSPF 2路由引入到vpna的路由表。

[PEB] bgp 1

[PEB-bgp] ipv4-family vpn-instance vpna

[PEB-bgp-ipv4-vpna] import-route direct

[PEB-bgp-ipv4-vpna] import-route ospf 2

[PEB-bgp-ipv4-vpna] quit

[PEB-bgp] quit

3.4.3  设备CE配置

# 配置接口IP地址。

<CE> system-view

[CE] interface ethernet 0/0

[CE-Ethernet0/0] ip address 192.168.0.2 255.255.255.0

[CE-Ethernet0/0] quit

[CE] interface ethernet 0/1

[CE-Ethernet0/1] ip address 192.168.2.1 255.255.255.0

[CE-Ethernet0/1] quit

[CE] interface ethernet 1/0

[CE-Ethernet1/0] ip address 192.168.1.2 255.255.255.0

[CE-Ethernet1/0] quit

# 启动OSPF协议使网络互通。

[CE] ospf 1

[CE-ospf-1] area 0.0.0.0

[CE-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255

[CE-ospf-1-area-0.0.0.0] network 192.168.2.0 0.0.0.255

[CE-ospf-1-area-0.0.0.0] quit

[CE-ospf-1] quit

# 在CE上开启ICMP超时报文发送功能和ICMP携带扩展信息功能,使能进行tracert配置。

[CE] ip ttl-expires enable

[CE] ip icmp-extensions compliant

# 配置BGP协议,与PE A建立EBGP连接。

[CE] bgp 3

[CE-bgp] undo synchronization

[CE-bgp] network 192.168.2.0

[CE-bgp] peer 192.168.0.1 as-number 1

[CE-bgp] quit

3.5  验证配置

(1)     设备和链路都正常工作时,验证从Site 1到Site 2的报文传播路径。

# 在Site 1主机ping Site 2主机IP地址172.32.0.2/24,能够ping通。

C:\Documents and Settings\Administrator> ping 172.32.0.2

 

Pinging 172.32.0.2 with 32 bytes of data:

 Reply from  172.32.0.2: bytes=32  time=7 ms  ttl=126

 Reply from  172.32.0.2: bytes=32  time=1 ms  ttl=126

 Reply from  172.32.0.2: bytes=32  time=1 ms  ttl=126

 Reply from  172.32.0.2: bytes=32  time=1 ms  ttl=126

 

Ping statistics for 172.32.0.2:

    Packets: Sent =4, Received = 4,Lost = 0 (0% loss)

Approximate round trip times in milli-seconds:

    Minimum = 0ms, Maximum = 7ms, Average = 1ms

# 在Site 1主机tracert Site 2主机IP地址172.32.0.2/24,可以看出,报文经过CE-PE B路径。

C:\Documents and Settings\Administrator> tracert 172.32.0.2

 

Tracing route to 172.32.0.2 over a maximum of 30 hops

  1     7 ms    <1 ms    <1 ms  192.168.2.1

  2    <1 ms    <1 ms    <1 ms  192.168.1.1

  3    <1 ms    <1 ms    <1 ms  172.32.0.2

 

Trace complete.

(2)     当CE到PE B的链路断开后,验证从Site 1到Site 2的报文传播路径。

# 在Site 1主机tracert Site 2主机IP地址172.32.0.2/24,可以看出,报文经过CE-PE A-PE B路径。

C:\Documents and Settings\Administrator> tracert 172.32.0.2

 

Tracing route to 172.32.0.2 over a maximum of 30 hops

 

  1     8 ms    <1 ms    <1 ms  192.168.2.1

  2    <1 ms    <1 ms    <1 ms  192.168.0.1

  3    <1 ms    <1 ms     1 ms  172.32.0.1

  4    <1 ms    <1 ms    <1 ms  172.32.0.2

 

Trace complete.

(3)     当CE到PE B的链路恢复后,在路由收敛完毕后,验证从Site 1到Site 2的报文传播路径。

# 在Site 1主机tracert Site 2主机IP地址172.32.0.2/24,可以看到,报文又恢复到CE-PE B路径。

C:\Documents and Settings\Administrator> tracert 172.32.0.2

 

Tracing route to 172.32.0.2 over a maximum of 30 hops

 

  1     8 ms    <1 ms    <1 ms  192.168.2.1

  2    <1 ms    <1 ms    <1 ms  192.168.1.1

  3    <1 ms    <1 ms    <1 ms  172.32.0.2

 

Trace complete.

3.6  配置文件

·     PE A配置:

#

 router id 1.1.1.1

#

 ip ttl-expires enable

 ip icmp-extensions compliant

#

 mpls lsr-id 1.1.1.1

#

ip vpn-instance vpna

 route-distinguisher 1:1

 vpn-target 1:1 export-extcommunity

 vpn-target 1:1 import-extcommunity

#

mpls

#

mpls ldp

#

interface Ethernet0/0

 port link-mode route

 ip address 1.2.0.1 255.255.255.0

 mpls

 mpls ldp

#

interface Ethernet0/1

 port link-mode route

 ip binding vpn-instance vpna

 ip address 192.168.0.1 255.255.255.0

#

interface LoopBack0

 ip address 1.1.1.1 255.255.255.255

#

bgp 1

 undo synchronization

 peer 2.2.2.2 as-number 1

 peer 2.2.2.2 connect-interface LoopBack0

 #

 ipv4-family vpn-instance vpna

  peer 192.168.0.2 as-number 3

  network 192.168.0.0

#

 ipv4-family vpnv4

  peer 2.2.2.2 enable

#

ospf 1

 area 0.0.0.0

  network 1.1.1.1 0.0.0.0

  network 1.2.0.0 0.0.0.255

#

·     PE B配置:

#

 router id 2.2.2.2

#

 ip ttl-expires enable

 ip icmp-extensions compliant

#

 mpls lsr-id 2.2.2.2

#

ip vpn-instance vpna

 route-distinguisher 2:1

 vpn-target 1:1 export-extcommunity

 vpn-target 1:1 import-extcommunity

#

mpls

#

mpls ldp

#

interface Ethernet0/0

 port link-mode route

 ip address 1.2.0.2 255.255.255.0

 mpls

 mpls ldp

#

interface Ethernet0/1

 port link-mode route

 ip binding vpn-instance vpna

 ip address 172.32.0.1 255.255.255.0

#

interface Ethernet1/0

 port link-mode route

 ip binding vpn-instance vpna

 ip address 192.168.1.1 255.255.255.0

#

interface LoopBack0

 ip address 2.2.2.2 255.255.255.255

#

bgp 1

 undo synchronization

 peer 1.1.1.1 as-number 1

 peer 1.1.1.1 connect-interface LoopBack0

 #

 ipv4-family vpn-instance vpna

  import-route direct

  import-route ospf 2

 #

 ipv4-family vpnv4

  peer 1.1.1.1 enable

#

ospf 1

 area 0.0.0.0

  network 2.2.2.2 0.0.0.0

  network 1.2.0.0 0.0.0.255

#

ospf 2 router-id 192.168.1.1 vpn-instance vpna

 import-route bgp

 area 0.0.0.0

  network 172.32.0.0 0.0.0.255

  network 192.168.1.0 0.0.0.255

#

·     CE配置:

#

 ip ttl-expires enable

 ip icmp-extensions compliant

#

interface GigabitEthernet0/1

 ip address 192.168.2.1 255.255.255.0

#

interface GigabitEthernet1/0

 ip address 192.168.1.2 255.255.255.0

#

interface GigabitEthernet0/0

 ip address 192.168.0.2 255.255.255.0

#

bgp 3

 network 192.168.2.0

 undo synchronization

 peer 192.168.0.1 as-number 1

#

ospf 1

 area 0.0.0.0

  network 192.168.1.0 0.0.0.255

  network 192.168.2.0 0.0.0.255

#

4  相关资料

·     H3C MSR 系列路由器 命令参考(V5)-R2311

·     H3C MSR 系列路由器 配置指导(V5)-R2311

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们