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

08-MPLS配置举例

目录

00-H3C SR8800 MPLS L3VPN典型配置举例

本章节下载 00-H3C SR8800 MPLS L3VPN典型配置举例  (244.88 KB)

docurl=/cn/Service/Document_Software/Document_Center/Routers/Catalog/SR_Router/SR8800/Configure/Typical_Configuration_Example/H3C_SR8800-R3725-6W100/08/201407/834718_30005_0.htm

00-H3C SR8800 MPLS L3VPN典型配置举例

H3C SR8800 MPLS L3VPN典型配置举例

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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

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

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

H3C_彩色.emf

目  录

1 简介

2 配置前提

3 配置举例

3.1 组网需求

3.2 配置思路

3.3 使用版本

3.4 配置注意事项

3.5 配置步骤

3.5.1 PE 1的配置

3.5.2 P的配置

3.5.3 PE 2的配置

3.5.4 CE 1的配置

3.5.5 CE 2的配置

3.5.6 CE 3的配置

3.5.7 CE 4的配置

3.6 验证配置

3.7 配置文件

4 相关资料

 


1  简介

本文介绍了通过MPLS L3VPN技术在MPLS骨干网络中提供VPN服务的典型配置举例。

2  配置前提

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

本文假设您已了解MPLS L3VPN特性。

3  配置举例

3.1  组网需求

图1所示,Customer A和Customer B分别有位于两地的分支机构,现要求通过MPLS L3VPN技术,实现用户分支机构间路由信息的正常交互,且用户数据可以通过VPN方式在各站点间安全传输,不会发送至私网IP地址相同的其它用户站点中。

图1 MPLS L3VPN基本组网图

 

 

3.2  配置思路

·     在MPLS骨干网络中配置路由协议,并根据路由协议和LDP生成公网标签,作为VPN报文的外层标签。

·     为区分两个不同用户的路由信息,需要在PE上分别创建两个VPN实例,并通过配置RD和VPN Target进行区分各实例,在各实例内通过BGP分别引入不同用户的内网路由。

·     在PE设备之间配置MP-BGP协议并建立对等体,用于传输VPN的内网路由信息并生成内层标签。

3.3  使用版本

本举例是在 SR8800-CMW520-R3725版本上进行配置和验证的。

3.4  配置注意事项

由于在配置接口与VPN实例绑定后,接口上的IP地址配置会清除,因此先配置接口与VPN实例的绑定关系,再配置IP地址。

3.5  配置步骤

3.5.1  PE 1的配置

(1)     在MPLS骨干网上配置IGP协议,实现骨干网PE和P的互通

# 配置骨干网侧接口以及环回口地址。

<PE1> system-view

[PE1] interface loopback 0

[PE1-LoopBack0] ip address 1.1.1.9 32

[PE1-LoopBack0] quit

[PE1] interface gigabitethernet 3/0/2

[PE1-GigabitEthernet3/0/2] ip address 10.1.1.1 24

[PE1-GigabitEthernet3/0/2] quit

# 配置OSPF协议发布骨干网侧路由。

[PE1] ospf

[PE1-ospf-1] area 0

[PE1-ospf-1-area-0.0.0.0] network 10.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

(2)     在MPLS骨干网上配置MPLS基本能力和MPLS LDP,建立LDP LSP

[PE1] mpls lsr-id 1.1.1.9

[PE1] mpls

[PE1-mpls] quit

[PE1] mpls ldp

[PE1-mpls-ldp] quit

[PE1] interface gigabitethernet 3/0/2

[PE1-GigabitEthernet3/0/2] mpls

[PE1-GigabitEthernet3/0/2] mpls ldp

[PE1-GigabitEthernet3/0/2] quit

(3)     配置VPN实例,将CE 1和CE 2接入PE 1

# 在PE 1上为Customer A创建VPN实例,名为“customerA”。

[PE1] ip vpn-instance customerA

# 为该实例配置RD为100:1,用于在公网传输该VPN路由时,能够以VPNv4地址进行交互,从而使对方CE能够正确识别。

[PE1-vpn-instance-customerA] route-distinguisher 100:1

# 为该VPN实例配置VPN Target属性,其中接收路由的属性为111:1,发布路由的属性为222:1。(此处为表示接收和发送属性的含义,取值有所不同,为便于管理,用户可以将接收和发送的属性配置为相同的值)

[PE1-vpn-instance-customerA] vpn-target 111:1 import-extcommunity

[PE1-vpn-instance-customerA] vpn-target 222:1 export-extcommunity

[PE1-vpn-instance-customerA] quit

# 按同样方式为Customer B创建VPN实例,名为“customerB”,并为其配置RD为200:1,接收和发送的VPN Target属性分别为333:1和444:1。

[PE1] ip vpn-instance customerB

[PE1-vpn-instance-customerB] route-distinguisher 200:1

[PE1-vpn-instance-customerB] vpn-target 333:1 import-extcommunity

[PE1-vpn-instance-customerB] vpn-target 444:1 export-extcommunity

[PE1-vpn-instance-customerB] quit

# 配置GigabitEthernet 3/0/1与VPN实例customerA进行绑定。

[PE1] interface gigabitethernet 3/0/1

[PE1-GigabitEthernet3/0/1] ip binding vpn-instance customerA

[PE1-GigabitEthernet3/0/1] ip address 100.1.1.2 24

[PE1-GigabitEthernet3/0/1] quit

# 配置GigabitEthernet 3/0/3与VPN实例customerB进行绑定。

[PE1] interface gigabitethernet 3/0/3

[PE1-GigabitEthernet3/0/3] ip binding vpn-instance customerB

[PE1-GigabitEthernet3/0/3] ip address 200.1.1.2 24

[PE1-GigabitEthernet3/0/3] quit

(4)     配置PE 1分别与CE 1、CE 2之间建立EBGP对等体,引入VPN路由

# 在PE 1上创建BGP进程100,将VPN实例customerA与IPv4地址族进行关联。

[PE1] bgp 100

[PE1-bgp] ipv4-family vpn-instance customerA

# 将CE 1指定为对等体,并将CE 1的直连路由引入到BGP-VPN实例路由表中。

[PE1-bgp-ipv4-customerA] peer 100.1.1.1 as-number 65410

[PE1-bgp-ipv4-customerA] import-route direct

[PE1-bgp-ipv4-customerA] quit

# 将VPN实例customerB与IPv4地址族进行关联。

[PE1-bgp] ipv4-family vpn-instance customerB

# 将CE 2指定为对等体,并将CE 2的直连路由引入到BGP-VPN实例路由表中。

[PE1-bgp-ipv4-customerB] peer 200.1.1.1 as-number 65420

[PE1-bgp-ipv4-customerB] import-route direct

[PE1-bgp-ipv4-customerB] quit

(5)     配置PE 1与PE 2建立MP-IBGP对等体

# 在PE 1上配置PE 2为BGP对等体,并指定连接时使用的接口为Loopback0接口。

[PE1-bgp] peer 3.3.3.9 as-number 100

[PE1-bgp] peer 3.3.3.9 connect-interface loopback 0

#进入BGP-VPNv4子地址族视图,指定PE 2为对等体。

[PE1-bgp] ipv4-family vpnv4

[PE1-bgp-af-vpnv4] peer 3.3.3.9 enable

[PE1-bgp-af-vpnv4] quit

[PE1-bgp] quit

3.5.2  P的配置

(1)     在MPLS骨干网上配置IGP协议,实现骨干网PE和P的互通

# 配置骨干网侧接口以及环回口地址。

<P> system-view

[P] interface loopback 0

[P-LoopBack0] ip address 2.2.2.9 32

[P-LoopBack0] quit

[P] interface gigabitethernet 3/0/2

[P-GigabitEthernet3/0/2] ip address 10.1.1.2 24

[P-GigabitEthernet3/0/2] quit

[P] interface gigabitethernet 3/0/1

[P-GigabitEthernet3/0/1] ip address 10.1.4.1 24

[P-GigabitEthernet3/0/1] quit

# 配置OSPF协议发布骨干网侧路由。

[P] ospf

[P-ospf-1] area 0

[P-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255

[P-ospf-1-area-0.0.0.0] network 10.1.4.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

(2)     在MPLS骨干网上配置MPLS基本能力和MPLS LDP,建立LDP LSP

[P] mpls lsr-id 2.2.2.9

[P] mpls

[P-mpls] quit

[P] mpls ldp

[P-mpls-ldp] quit

[P] interface gigabitethernet 3/0/2

[P-GigabitEthernet3/0/2] mpls

[P-GigabitEthernet3/0/2] mpls ldp

[P-GigabitEthernet3/0/2] quit

[P] interface gigabitethernet 3/0/1

[P-GigabitEthernet3/0/1] mpls

[P-GigabitEthernet3/0/1] mpls ldp

[P-GigabitEthernet3/0/1] quit

3.5.3  PE 2的配置

(1)     在MPLS骨干网上配置IGP协议,实现骨干网PE和P的互通

# 配置骨干网侧接口以及环回口地址。

<PE2> system-view

[PE2] interface loopback 0

[PE2-LoopBack0] ip address 3.3.3.9 32

[PE2-LoopBack0] quit

[PE2] interface gigabitethernet 3/0/1

[PE2-GigabitEthernet3/0/1] ip address 10.1.4.2 24

[PE2-GigabitEthernet3/0/1] quit

# 配置OSPF协议发布骨干网侧路由。

[PE2] ospf

[PE2-ospf-1] area 0

[PE2-ospf-1-area-0.0.0.0] network 10.1.4.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

(2)     在MPLS骨干网上配置MPLS基本能力和MPLS LDP,建立LDP LSP

[PE2] mpls lsr-id 3.3.3.9

[PE2] mpls

[PE2-mpls] quit

[PE2] mpls ldp

[PE2-mpls-ldp] quit

[PE2] interface gigabitethernet 3/0/1

[PE2-GigabitEthernet3/0/1] mpls

[PE2-GigabitEthernet3/0/1] mpls ldp

[PE2-GigabitEthernet3/0/1] quit

(3)     配置VPN实例,将CE 3和CE 4接入PE 2

# PE 2上为Customer A创建VPN实例,名为“customerA”。

[PE2] ip vpn-instance customerA

# 为该VPN实例配置RD,为便于识别,建议与PE 1上为该实例配置的RD保持一致。

[PE2-vpn-instance-customerA] route-distinguisher 100:1

# 为该VPN实例配置VPN Target,需要注意的是接收和发送的属性要分别与PE1上配置的发送和接收的属性保持一致。

[PE2-vpn-instance-customerA] vpn-target 222:1 import-extcommunity

[PE2-vpn-instance-customerA] vpn-target 111:1 export-extcommunity

[PE2-vpn-instance-customerA] quit

# 按同样方式配置VPN实例“customerB”,并配置相应的RD和VPN Target。

[PE2] ip vpn-instance customerB

[PE2-vpn-instance-customerB] route-distinguisher 200:1

[PE2-vpn-instance-customerB] vpn-target 444:1 import-extcommunity

[PE2-vpn-instance-customerB] vpn-target 333:1 export-extcommunity

[PE2-vpn-instance-customerB] quit

# 分别将GigabitEthernet3/0/2和GigabitEthernet3/0/3与customerA和customerB实例进行绑定。

[PE2] interface gigabitethernet 3/0/2

[PE2-GigabitEthernet3/0/2] ip binding vpn-instance customerA

[PE2-GigabitEthernet3/0/2] ip address 101.1.1.1 24

[PE2-GigabitEthernet3/0/2] quit

[PE2] interface gigabitethernet 3/0/3

[PE2-GigabitEthernet3/0/3] ip binding vpn-instance customerB

[PE2-GigabitEthernet3/0/3] ip address 202.1.1.2 24

[PE2-GigabitEthernet3/0/3] quit

(4)     配置PE 2分别与CE 3、CE 4之间建立EBGP对等体,引入VPN路由

# 在PE 2上创建BGP进程100,将VPN实例customerA与IPv4地址族进行关联。

[PE2] bgp 100

[PE2-bgp] ipv4-family vpn-instance customerA

# 将CE 3指定为对等体,并将CE 3的直连路由引入到BGP-VPN实例路由表中。

[PE1-bgp-ipv4-customerA] peer 101.1.1.2 as-number 65430

[PE1-bgp-ipv4-customerA] import-route direct

[PE1-bgp-ipv4-customerA] quit

# 将VPN实例customerB与IPv4地址族进行关联。

[PE2-bgp] ipv4-family vpn-instance customerB

# 将CE 4指定为对等体,并将CE 4的直连路由引入到BGP-VPN实例路由表中。

[PE2-bgp-ipv4-customerB] peer 202.1.1.1 as-number 65440

[PE2-bgp-ipv4-customerB] import-route direct

[PE2-bgp-ipv4-customerB] quit

(5)     配置PE 2与PE 1建立MP-IBGP对等体

# 在PE 2上配置PE 1为BGP对等体,并指定连接时使用的接口为Loopback0接口。

[PE2] bgp 100

[PE2-bgp] peer 1.1.1.9 as-number 100

[PE2-bgp] peer 1.1.1.9 connect-interface loopback 0

#进入BGP-VPNv4子地址族视图,指定PE 1为对等体。

[PE2-bgp] ipv4-family vpnv4

[PE2-bgp-af-vpnv4] peer 1.1.1.9 enable

[PE2-bgp-af-vpnv4] quit

[PE2-bgp] quit

3.5.4  CE 1的配置

# 配置各接口地址。

<CE1> system-view

[CE1] interface gigabitethernet 3/0/1

[CE1-GigabitEthernet3/0/1] ip address 100.1.1.1 24

[CE1-GigabitEthernet3/0/1] quit

[CE1] interface gigabitethernet 3/0/3

[CE1-GigabitEthernet3/0/3] ip address 172.16.0.1 24

[CE1-GigabitEthernet3/0/3] quit

# 在CE 1上创建BGP进程65410,并指定PE 1为对等体,对等体自治系统号为100。

[CE1] bgp 65410

[CE1-bgp] peer 100.1.1.2 as-number 100

# CE 1上连接站点的直连接口路由引入EBGP

[CE1-bgp] import-route direct

[CE1-bgp] quit

3.5.5  CE 2的配置

# 配置各接口地址。

<CE2> system-view

[CE2] interface gigabitethernet 3/0/1

[CE2-GigabitEthernet3/0/1] ip address 200.1.1.1 24

[CE2-GigabitEthernet3/0/1] quit

[CE2] interface gigabitethernet 3/0/3

[CE2-GigabitEthernet3/0/3] ip address 172.16.0.1 24

[CE2-GigabitEthernet3/0/3] quit

# 在CE 2上创建BGP进程65420,并指定PE 1为对等体,自治系统号为100

[CE2] bgp 65420

[CE2-bgp] peer 200.1.1.2 as-number 100

# 将CE 2上连接站点的直连接口路由引入EBGP。

[CE2-bgp] import-route direct

[CE2-bgp] quit

3.5.6  CE 3的配置

# 配置各接口地址。

<CE3> system-view

[CE3] interface gigabitethernet 3/0/1

[CE3-GigabitEthernet3/0/1] ip address 101.1.1.2 24

[CE3-GigabitEthernet3/0/1] quit

[CE3] interface gigabitethernet 3/0/3

[CE3-GigabitEthernet3/0/3] ip address 172.16.1.1 24

[CE3-GigabitEthernet3/0/3] quit

# 在CE 3上创建BGP进程65430,并指定PE 2为对等体,对等体自治系统号为100。

[CE3] bgp 65430

[CE3-bgp] peer 101.1.1.1 as-number 100

# CE 3上连接站点的直连接口路由引入EBGP

[CE3-bgp] import-route direct

[CE3-bgp] quit

3.5.7  CE 4的配置

# 配置各接口地址。

<CE4> system-view

[CE4] interface gigabitethernet 3/0/1

[CE4-GigabitEthernet3/0/1] ip address 202.1.1.1 24

[CE4-GigabitEthernet3/0/1] quit

[CE4] interface gigabitethernet 3/0/3

[CE4-GigabitEthernet3/0/3] ip address 172.16.1.1 24

[CE4-GigabitEthernet3/0/3] quit

# 在CE 4上创建BGP进程65440,并指定PE 2为对等体,自治系统号为100

[CE4] bgp 65440

[CE4-bgp] peer 202.1.1.2 as-number 100

# 将CE 4上连接站点的直连接口路由引入EBGP

[CE4-bgp] import-route direct

[CE4-bgp] quit

3.6  验证配置

# 在PE设备上执行display ip routing-table vpn-instance命令。以PE 1为例,可以看到Customer A的VPN实例路由表中去往CE3直连接口的路由,以及Customer B的VPN实例路由表中去往CE4直连接口的路由。

以PE 1为例:

[PE1] display ip routing-table vpn-instance customerA

Routing Tables: customerA

         Destinations : 7        Routes : 7

 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

 

100.1.1.0/24        Direct 0    0            100.1.1.2       GE3/0/1

100.1.1.2/32        Direct 0    0            127.0.0.1       InLoop0

101.1.1.0/24        BGP    255  0            3.3.3.9         NULL0

127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0

127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0

172.16.0.0/24       BGP    255  0            100.1.1.1       GE3/0/1

172.16.1.0/24       BGP    255  0            3.3.3.9         NULL0

[PE1] display ip routing-table vpn-instance customerB

Routing Tables: customerB

         Destinations : 8        Routes : 8

 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

 

127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0

127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0

172.16.0.0/24       BGP    255  0            200.1.1.1       GE3/0/3

172.16.1.0/24       BGP    255  0            3.3.3.9         NULL0

200.1.1.0/24        Direct 0    0            200.1.1.2       GE3/0/3

200.1.1.2/32        Direct 0    0            127.0.0.1       InLoop0

202.1.1.0/24        BGP    255  0            3.3.3.9         NULL0

# 在CE 1上查看路由表,可以看到已经学习到CE 2连接站点直连接口的路由。

[CE1] display ip routing-table

Routing Tables: Public

         Destinations : 10       Routes : 10

 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

 

100.1.1.0/24        Direct 0    0            100.1.1.1       GE3/0/1

100.1.1.1/32        Direct 0    0            127.0.0.1       InLoop0

101.1.1.0/24        BGP    255  0            100.1.1.2       GE3/0/1

127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0

127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0

172.16.0.0/24       Direct 0    0            172.16.0.1      GE3/0/3

172.16.0.1/32       Direct 0    0            127.0.0.1       InLoop0

172.16.1.0/24       BGP    255  0            100.1.1.2       GE3/0/1

# 在CE 1上以CE 3连接站点的直连接口为目的执行ping操作,操作成功。

[CE1] ping 172.16.1.1

  PING 172.16.1.1: 56  data bytes, press CTRL_C to break

    Reply from 172.16.1.1: bytes=56 Sequence=0 ttl=253 time=2 ms

    Reply from 172.16.1.1: bytes=56 Sequence=1 ttl=253 time=2 ms

    Reply from 172.16.1.1: bytes=56 Sequence=2 ttl=253 time=2 ms

    Reply from 172.16.1.1: bytes=56 Sequence=3 ttl=253 time=3 ms

    Reply from 172.16.1.1: bytes=56 Sequence=4 ttl=253 time=2 ms

 

  --- 172.16.1.1 ping statistics ---

    5 packet(s) transmitted

    5 packet(s) received

    0.00% packet loss

    round-trip min/avg/max = 2/2/3 ms

# 在CE 1上以CE 4连接站点的直连接口为目的执行ping操作,无法ping通。

# 在CE 2设备上查看已经学习到CE 4连接站点的直连接口路由,并执行ping操作,操作成功。

# 在CE 1站点内部增加一个新的网段路由,以10.32.10.0/24为例,在CE 1上查看已存在该路由。

[CE1] display ip routing-table

Routing Tables: Public

         Destinations : 9       Routes : 9

 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

 

10.32.10.0/24       BGP    255  0            172.16.0.2      GE3/0/3

100.1.1.0/24        Direct 0    0            100.1.1.1       GE3/0/1

100.1.1.1/32        Direct 0    0            127.0.0.1       InLoop0

101.1.1.0/24        BGP    255  0            100.1.1.2       GE3/0/1

127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0

127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0

172.16.0.0/24       Direct 0    0            172.16.0.1      GE3/0/3

172.16.0.1/32       Direct 0    0            127.0.0.1       InLoop0

172.16.1.0/24       BGP    255  0            100.1.1.2       GE3/0/1

# 在CE 3设备上查看,发现已经学习到该私网路由,表示配置成功。

[CE3] display ip routing-table

Routing Tables: Public

         Destinations : 9       Routes : 9

 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

 

10.32.10.0/24       BGP    255  0            101.1.1.1       GE3/0/1

100.1.1.0/24        BGP    255  0            101.1.1.1       GE3/0/1

101.1.1.0/24        Direct 0    0            101.1.1.2       GE3/0/1

101.1.1.2/32        Direct 0    0            127.0.0.1       InLoop0

127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0

127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0

172.16.0.0/24       BGP    255  0            101.1.1.1       GE3/0/1

172.16.1.0/24       Direct 0    0            172.16.1.1      GE3/0/3

172.16.1.1/32       Direct 0    0            127.0.0.1       InLoop0

3.7  配置文件

·     PE 1:

#

 version 5.20, Release 3725

#

 sysname PE1

#

 mpls lsr-id 1.1.1.9

#

ip vpn-instance customerA

 route-distinguisher 100:1

 vpn-target 222:1 export-extcommunity

 vpn-target 111:1 import-extcommunity

#

ip vpn-instance customerB

 route-distinguisher 200:1

 vpn-target 444:1 export-extcommunity

 vpn-target 333:1 import-extcommunity

#

mpls

#

mpls ldp

interface GigabitEthernet3/0/1

 port link-mode route

 ip binding vpn-instance customerA

 ip address 100.1.1.2 255.255.255.0

#

interface GigabitEthernet3/0/2

 port link-mode route

 ip address 10.1.1.1 255.255.255.0

 mpls

 mpls ldp

#

interface GigabitEthernet3/0/3

 port link-mode route

 ip binding vpn-instance customerB

 ip address 200.1.1.2 255.255.255.0

#

bgp 100

 undo synchronization

 peer 3.3.3.9 as-number 100

 peer 3.3.3.9 connect-interface LoopBack0

 #

 ipv4-family vpn-instance customerA

  peer 100.1.1.1 as-number 65410

  import-route direct

 #

 ipv4-family vpn-instance customerB

  peer 200.1.1.1 as-number 65420

  import-route direct

 #

 ipv4-family vpnv4

  peer 3.3.3.9 enable

#

ospf 1

 area 0.0.0.0

  network 10.1.1.0 0.0.0.255

  network 1.1.1.9 0.0.0.0

#

return

·     P:

#

 version 5.20, Release 3725

#

 sysname P

#

 mpls lsr-id 2.2.2.9

#

mpls

#

mpls ldp

#

interface LoopBack0

 ip address 2.2.2.9 255.255.255.255

#

interface GigabitEthernet3/0/1

 port link-mode route

 ip address 10.1.4.1 255.255.255.0

 mpls

 mpls ldp

#

interface GigabitEthernet3/0/2

 port link-mode route

 ip address 10.1.1.2 255.255.255.0

 mpls

 mpls ldp

#

ospf 1

 area 0.0.0.0

  network 2.2.2.9 0.0.0.0

  network 10.1.1.0 0.0.0.255

  network 10.1.4.0 0.0.0.255

#

return

·     PE 2:

#

 version 5.20, Release 3725

#

 sysname PE2

#

 mpls lsr-id 3.3.3.9

#

ip vpn-instance customerA

 route-distinguisher 100:1

 vpn-target 111:1 export-extcommunity

 vpn-target 222:1 import-extcommunity

#

ip vpn-instance customerB

 route-distinguisher 200:1

 vpn-target 333:1 export-extcommunity

 vpn-target 444:1 import-extcommunity

#

mpls

#

mpls ldp

#

interface GigabitEthernet3/0/1

 port link-mode route

 ip address 10.1.4.2 255.255.255.0

 mpls

 mpls ldp

#

interface GigabitEthernet3/0/2

 port link-mode route

 ip binding vpn-instance customerA

 ip address 101.1.1.1 255.255.255.0

#

interface GigabitEthernet3/0/3

 port link-mode route

 ip binding vpn-instance customerB

 ip address 202.1.1.2 255.255.255.0

#

bgp 100

 undo synchronization

 peer 1.1.1.9 as-number 100

 peer 1.1.1.9 connect-interface LoopBack0

 #

 ipv4-family vpn-instance customerA

  peer 101.1.1.2 as-number 65430

  import-route direct

 #

 ipv4-family vpn-instance customerB

  peer 202.1.1.1 as-number 65440

  import-route direct

 #

 ipv4-family vpnv4

  peer 1.1.1.9 enable

#

ospf 1

 area 0.0.0.0

  network 10.1.4.0 0.0.0.255

  network 1.1.1.9 0.0.0.0

#

return

·     CE 1:

#

 version 5.20, Release 3725

#

 sysname CE1

#

interface GigabitEthernet3/0/1

 port link-mode route

 ip address 100.1.1.1 255.255.255.0

#

interface GigabitEthernet3/0/2

 port link-mode route

 ip address 172.16.0.1 255.255.255.0

#

bgp 65410

 import-route direct

 undo synchronization

 peer 100.1.1.2 as-number 100

#

return

·     CE 2:

#

 version 5.20, Release 3725

#

 sysname CE2

#

interface GigabitEthernet3/0/1

 port link-mode route

 ip address 200.1.1.1 255.255.255.0

#

interface GigabitEthernet3/0/2

 port link-mode route

 ip address 172.16.0.1 255.255.255.0

#

bgp 65420

 import-route direct

 undo synchronization

 peer 200.1.1.2 as-number 100

#

return

·     CE 3:

#

 version 5.20, Release 3725

#

 sysname CE3

#

interface GigabitEthernet3/0/1

 port link-mode route

 ip address 101.1.1.2 255.255.255.0

#

interface GigabitEthernet3/0/2

 port link-mode route

 ip address 172.16.1.1 255.255.255.0

#

bgp 65430

 import-route direct

 undo synchronization

 peer 101.1.1.1 as-number 100

#

return

·     CE 4:

#

 version 5.20, Release 3725

#

 sysname CE4

#

interface GigabitEthernet3/0/1

 port link-mode route

 ip address 202.1.1.1 255.255.255.0

#

interface GigabitEthernet3/0/2

 port link-mode route

 ip address 172.16.1.1 255.255.255.0

#

bgp 65440

 import-route direct

 undo synchronization

 peer 202.1.1.2 as-number 100

#

return

4  相关资料

·     《H3C SR8800系列万兆核心路由器  MPLS配置指导》中的“MPLS L3VPN”

·     《H3C SR8800系列万兆核心路由器  MPLS命令参考》中的“MPLS L3VPN”

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

新华三官网
联系我们