31-MSR系列路由器MPLS C2C配置举例
本章节下载: 31-MSR系列路由器MPLS C2C配置举例 (181.91 KB)
MSR路由器MPLS C2C的典型配置举例
Copyright © 2014 杭州华三通信技术有限公司 版权所有,保留一切权利。 非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部, 并不得以任何形式传播。本文档中的信息可能变动,恕不另行通知。 |
目 录
本文档介绍使用MPLS C2C的典型配置举例。
本文档不严格与具体软、硬件版本对应,如果使用过程中与产品实际情况有差异,请参考相关产品手册,或以设备实际情况为准。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
如图1所示,在MPLS VPN的运营商的运营商网络中,一级运营商PE 1和PE 2通过MP-IBGP为下联的二级运营商提供标签转发,二级运营商为BGP MPLS VPN供应商,PE向下联的CE提供VPN服务。现要求:一级运营商PE与下联的CE使用LDP分发标签方式,使用户CE 3和CE 4能够互相转发报文。
设备 |
接口 |
IP地址 |
设备 |
接口 |
IP地址 |
PE1 |
GE0/0 |
82.1.1.2/24 |
PE2 |
GE0/0 |
80.1.1.2/24 |
|
GE0/1 |
80.1.1.1/24 |
|
GE0/1 |
81.1.1.2/24 |
|
Loopback0 |
10.1.1.5/32 |
|
Loopback0 |
10.1.1.6/32 |
CE1 |
GE0/0 |
82.1.1.1/24 |
CE2 |
GE0/0 |
81.1.1.1/24 |
|
GE0/1 |
90.1.1.1/24 |
|
GE0/1 |
91.1.1.1/24 |
|
Loopback0 |
10.1.1.3/24 |
|
Loopback0 |
10.1.1.4/24 |
PE3 |
GE0/0 |
90.1.1.2/24 |
PE4 |
GE0/0 |
91.1.1.2/24 |
|
GE0/1 |
192.16.1.1/24 |
|
GE0/1 |
192.168.2.1/24 |
|
Loopback0 |
10.1.1.1/24 |
|
Loopback0 |
10.1.1.2/24 |
CE3 |
GE0/1 |
192.168.1.2/24 |
CE4 |
GE0/1 |
192.168.2.2/24 |
为了使PE和CE间使能LDP将一级运营商和二级运营商正常衔接,需要在PE节点部署LDP多实例,使多实例路由分发进BGP中,连接两个不同的耳机运营商。
本举例是在Release 2316版本上进行配置和验证的。
路由重分布时一定要考虑双向的路由传递,即IGP分布到BGP,同时要把BGP重分布到IGP中,才能保证路由的双向传递。
# 配置接口IP地址。
<PE1> system-view
[PE1] interface loopback 0
[PE1-LoopBack0] ip address 10.1.1.5 255.255.255.255
[PE1-LoopBack0] quit
[PE1] interface gigabitethernet 0/0
[PE1-GigabitEthernet0/0] ip address 82.1.1.2 255.255.255.0
[PE1-GigabitEthernet0/0] quit
[PE1] interface gigabitethernet 0/1
[PE1-GigabitEthernet0/0] ip address 80.1.1.1 255.255.255.0
[PE1-GigabitEthernet0/0] quit
# 配置Router ID及MPLS LSR-ID,使能MPLS和MPLS LDP功能。
[PE1] router id 10.1.1.5
[PE1] mpls lsr-id 10.1.1.5
[PE1] mpls
[PE1] mpls ldp
[PE1-mpls-ldp] quit
# 在接口GigabitEthernet0/0和GigabitEthernet0/1配置MPLS和MPLS LDP功能。
[PE1] interface gigabitethernet 0/0
[PE1-GigabitEthernet0/0] mpls
[PE1-GigabitEthernet0/0] mpls ldp
[PE1-GigabitEthernet0/0] quit
[PE1] interface gigabitethernet 0/1
[PE1-GigabitEthernet0/1] mpls
[PE1-GigabitEthernet0/1] mpls ldp
[PE1-GigabitEthernet0/1] quit
# 创建VPN实例vpn1,并配置RD和VPN Target属性。
[PE1] ip vpn-instance vpn1
[PE1-vpn-instance-vpn1] route-distinguisher 10.1.1.5:1
[PE1-vpn-instance-vpn1] vpn-target 100:1 both
[PE1-vpn-instance-vpn1] quit
# 将接口GigabitEthernet0/0绑定到vpn1上。
[PE1] interface gigabitethernet 0/0
[PE1-GigabitEthernet0/1] ip binding vpn-instance vpn1
[PE1-GigabitEthernet0/1] ip address 82.1.1.2 255.255.255.0
[PE1-GigabitEthernet0/1] quit
# 配置公网OSPF路由协议进程1。
[PE1] ospf 1
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] network 10.1.1.5 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] network 80.1.1.0 0.0.0.255
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
# 配置LDP多实例。
[PE1] mpls ldp vpn-instance vpn1
[PE1-mpls-ldp-vpn-instance-vpn1] quit
# 配置私网OSPF路由协议进程2,同时将BGP路由重分布到OSPF进程中。
[PE1] ospf 2 vpn-instance vpn1
[PE1-ospf-2] import-route bgp
[PE1-ospf-2] area 0.0.0.0
[PE1-ospf-2-area-0.0.0.0] network 82.1.1.0 0.0.0.255
[PE1-ospf-2-area-0.0.0.0] quit
[PE1-ospf-2] quit
# 配置BGP路由协议,在一级运营商PE之间建立MP-IBGP。将私网OSPF 2路由重分布到BGP-VPN路由中,通过MP-IBGP传递到远端一级运营商PE。
[PE1] bgp 1000
[PE1-bgp] peer 10.1.1.6 as-number 1000
[PE1-bgp] peer 10.1.1.6 connect-interface LoopBack0
[PE1-bgp] ipv4-family vpnv4
[PE1-bgp-af-vpnv4] peer 10.1.1.6 enable
[PE1-bgp-af-vpnv4] quit
# 将私网OSPF 2路由重分布到BGP-VPN路由中,通过MP-IBGP传递到远端一级运营商PE。
[PE1-bgp] ipv4-family vpn-instance vpn1
[PE1-bgp-vpn1] import-route ospf 2
[PE1-bgp-vpn1] quit
[PE1-bgp] quit
# 配置接口IP地址。
<CE1> system-view
[CE1] interface loopback 0
[CE1-LoopBack0] ip address 10.1.1.3 255.255.255.255
[CE1-LoopBack0] quit
[CE1] interface gigabitethernet 0/1
[CE1-GigabitEthernet0/1] ip address 90.1.1.1 255.255.255.0
[CE1-GigabitEthernet0/1] quit
[CE1] interface gigabitethernet 0/0
[CE1-GigabitEthernet0/0] ip address 82.1.1.1 255.255.255.0
[CE1-GigabitEthernet0/0] quit
# 配置Router ID和MPLS LSR-ID,,使能MPLS和MPLS LDP功能。
[CE1] router id 10.1.1.3
[CE1] mpls lsr-id 10.1.1.3
[CE1] mpls
[CE1] mpls ldp
[CE1-mpls-ldp] quit
# 在接口GigabitEthernet0/0和GigabitEthernet0/1配置MPLS和MPLS LDP功能。
[CE1] interface gigabitethernet 0/0
[CE1-GigabitEthernet0/0] mpls
[CE1-GigabitEthernet0/0] mpls ldp
[CE1-GigabitEthernet0/0] quit
[CE1] interface gigabitethernet 0/1
[CE1-GigabitEthernet0/1] mpls
[CE1-GigabitEthernet0/1] mpls ldp
[CE1-GigabitEthernet0/1] quit
# 配置OSPF路由协议,使网络互通。
[CE1] ospf 2
[CE1-ospf-2] area 0
[CE1-ospf-2-area-0.0.0.0] network 10.1.1.3 0.0.0.0
[CE1-ospf-2-area-0.0.0.0] network 90.1.1.0 0.0.0.255
[CE1-ospf-2-area-0.0.0.0] network 82.1.1.0 0.0.0.255
[CE1-ospf-2-area-0.0.0.0] quit
[CE1-ospf-2] quit
# 配置接口IP地址。
<PE3> system-view
[PE3] interface loopback 0
[PE3-LoopBack0] ip address 10.1.1.1 255.255.255.255
[PE3-LoopBack0] quit
[PE3] interface gigabitethernet 0/0
[PE3-GigabitEthernet0/0] ip address 90.1.1.2 255.255.255.0
[PE3-GigabitEthernet0/0] quit
[PE3] interface gigabitethernet 0/1
[PE3-GigabitEthernet0/1] ip address 192.168.1.1 255.255.255.0
[PE3-GigabitEthernet0/1] quit
# 配置Router ID和MPLS LSR-ID,使能MPLS和MPLS LDP功能。
[PE3] router id 10.1.1.1
[PE3] mpls lsr-id 10.1.1.1
[PE3] mpls
[PE3] mpls ldp
[PE3] quit
# 在接口GigabitEthernet0/1配置MPLS和MPLS LDP功能。
[PE3] interface gigabitethernet 0/1
[PE3-GigabitEthernet0/1] mpls
[PE3-GigabitEthernet0/1] mpls ldp
[PE3-GigabitEthernet0/1] quit
# 配置OSPF路由协议,使网络互通。
[PE3] ospf 2
[PE3-ospf-2] area 0
[PE3-ospf-2-area-0.0.0.0] network 10.1.1.1 0.0.0.0
[PE3-ospf-2-area-0.0.0.0] network 90.1.1.0 0.0.0.255
[PE3-ospf-2-area-0.0.0.0] quit
[PE3-ospf-2] quit
# 创建VPN实例vpn1,并配置RD和VPN Target属性。
[PE3] ip vpn-instance vpn1
[PE3-vpn-instance-vpn1] route-distinguisher 10.1.1.1:1
[PE3-vpn-instance-vpn1] vpn-target 100:1 both
[PE3-vpn-instance-vpn1] quit
# 将接口GigabitEthernet0/1绑定到vpn1上。
[PE3] interface gigabitethernet 0/1
[PE3-GigabitEthernet0/1] ip binding vpn-instance vpn1
[PE3-GigabitEthernet0/1] ip address 192.16.1.1 255.255.255.0
[PE3-GigabitEthernet0/1] quit
# 配置BGP路由协议,在二级运营商PE之间建立MP-IBGP。
[PE3] bgp 200
[PE3-bgp] peer 10.1.1.2 as-number 200
[PE3-bgp] peer 10.1.1.2 next-hop-local
[PE3-bgp] peer 10.1.1.2 connect-interface LoopBack0
[PE3-bgp] ipv4-family vpnv4
[PE3-bgp-af-vpnv4] peer 10.1.1.2 enable
[PE3-bgp-af-vpnv4] quit
# 进入BGP-VPN实例视图,配置PE 3的CE用户,将私网直连路由重分布到VPN路由中。
[PE3-bgp] ipv4-family vpn-instance vpn1
[PE3-bgp-vpn1] import direct
[PE3-bgp-vpn1] quit
[PE3-bgp] quit
# 配置接口IP地址。
<PE2> system-view
[PE2] interface loopback 0
[PE2-LoopBack0] ip address 10.1.1.6 255.255.255.255
[PE2-LoopBack0] quit
[PE2] interface gigabitethernet 0/0
[PE2-GigabitEthernet0/0] ip address 80.1.1.2 255.255.255.0
[PE2-GigabitEthernet0/0] quit
[PE2] interface gigabitethernet 0/1
[PE2-GigabitEthernet0/1] ip address 81.1.1.2 255.255.255.0
[PE2-GigabitEthernet0/1] quit
# 配置Router ID和MPLS LSR-ID,使能MPLS和MPLS LDP功能。
[PE2] router id 10.1.1.6
[PE2] mpls lsr-id 10.1.1.6
[PE2] mpls
[PE2] mpls ldp
[PE2-mpls-ldp] quit
# 在接口配置MPLS和MPLS LDP功能。
[PE2] interface gigabitethernet 0/0
[PE2-GigabitEthernet0/0] mpls
[PE2-GigabitEthernet0/0] mpls ldp
[PE2-GigabitEthernet0/0] quit
[PE2] interface gigabitethernet 0/1
[PE2-GigabitEthernet0/1] mpls
[PE2-GigabitEthernet0/1] mpls ldp
[PE2-GigabitEthernet0/1] quit
# 创建VPN实例vpn1,并配置RD和VPN Target属性。
[PE2] ip vpn-instance vpn1
[PE2-vpn-instance-vpn1] route-distinguisher 10.1.1.6:1
[PE2-vpn-instance-vpn1] vpn-target 100:1 both
[PE2-vpn-instance-vpn1] quit
# 将接口GigabitEthernet0/1绑定到vpn1上。
[PE2] interface gigabitethernet 0/1
[PE2-GigabitEthernet0/1] ip binding vpn-instance vpn1
[PE2-GigabitEthernet0/1] ip address 81.1.1.2 255.255.255.0
[PE2-GigabitEthernet0/1] quit
# 配置公网OSPF路由协议进程1。
[PE2] ospf 1
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] network 10.1.1.6 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] network 80.1.1.0 0.0.0.255
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
# 配置LDP多实例。
[PE2] mpls ldp vpn-instance vpn1
[PE2-mpls-ldp-vpn-instance-vpn1] quit
# 配置私网OSPF路由协议进程2,同时将BGP路由重分布到OSPF进程中。
[PE2] ospf 2 vpn-instance vpn1
[PE2-ospf-2] import-route bgp
[PE2-ospf-2] area 0.0.0.0
[PE2-ospf-2-area-0.0.0.0] network 81.1.1.0 0.0.0.255
[PE2-ospf-2-area-0.0.0.0] quit
[PE2-ospf-2] quit
# 配置BGP路由协议,在一级运营商PE之间建立MP-IBGP。
[PE2] bgp 1000
[PE2-bgp] peer 10.1.1.5 as-number 1000
[PE2-bgp] peer 10.1.1.5 connect-interface LoopBack0
[PE2-bgp] ipv4-family vpnv4
[PE2-bgp-af-vpnv4] peer 10.1.1.5 enable
[PE2-bgp-af-vpnv4] quit
# 将私网OSPF 2路由重分布到BGP-VPN路由中,通过MP-IBGP传递到远端一级运营商PE。
[PE2-bgp] ipv4-family vpn-instance vpn1
[PE2-bgp-vpn1] import-route ospf 2
[PE2-bgp-vpn1] quit
[PE2-bgp] quit
# 配置接口IP地址。
[CE2] interface loopback 0
[CE2-LoopBack0] ip address 10.1.1.4 255.255.255.255
[CE2-LoopBack0] quit
[CE2] interface gigabitethernet 0/0
[CE2-GigabitEthernet0/0] ip address 81.1.1.1 255.255.255.0
[CE2-GigabitEthernet0/0] quit
[CE2] interface gigabitethernet 0/1
[CE2-GigabitEthernet0/0] ip address 91.1.1.1 255.255.255.0
[CE2-GigabitEthernet0/0] quit
# 配置Router ID和MPLS LSR-ID,使能MPLS和MPLS LDP功能。
[CE2] router id 10.1.1.4
[CE2] mpls lsr-id 10.1.1.4
[CE2] mpls
[CE2] mpls ldp
[CE2-mpls-ldp] quit
# 在接口GigabitEthernet0/0和GigabitEthernet0/1配置MPLS和MPLS LDP功能。
[CE2] interface gigabitethernet 0/0
[CE2-GigabitEthernet0/0] mpls
[CE2-GigabitEthernet0/0] mpls ldp
[CE2-GigabitEthernet0/0] quit
[CE2] interface gigabitethernet 0/1
[CE2-GigabitEthernet0/1] mpls
[CE2-GigabitEthernet0/1] mpls ldp
[CE2-GigabitEthernet0/1] quit
# 配置OSPF路由协议,使网络互通。
[CE2] ospf 2
[CE2-ospf-2] area 0
[CE2-ospf-2-area-0.0.0.0] network 10.1.1.4 0.0.0.0
[CE2-ospf-2-area-0.0.0.0] network 81.1.1.0 0.0.0.255
[CE2-ospf-2-area-0.0.0.0] network 91.1.1.0 0.0.0.255
[CE2-ospf-2-area-0.0.0.0] quit
[CE2-ospf-2] quit
# 配置接口IP地址。
[PE4] interface loopback 0
[PE4-LoopBack0] ip address 10.1.1.2 255.255.255.255
[PE4-LoopBack0] quit
[PE4] interface gigabitethernet 0/0
[PE4-GigabitEthernet0/0] ip address 91.1.1.2 255.255.255.0
[PE4-GigabitEthernet0/0] quit
[PE4] interface gigabitethernet 0/1
[PE4-GigabitEthernet0/1] ip address 192.168.2.1 255.255.255.0
[PE4-GigabitEthernet0/1] quit
# 配置Router ID和MPLS LSR-ID,使能MPLS和MPLS LDP功能。
[PE4] router id 10.1.1.2
[PE4] mpls lsr-id 10.1.1.2
[PE4] mpls
[PE4] mpls ldp
[PE4-mpls-ldp] quit
# 在接口配置MPLS和MPLS LDP功能。
[PE4] interface gigabitethernet 0/0
[PE4-GigabitEthernet0/0] mpls
[PE4-GigabitEthernet0/0] mpls ldp
[PE4-GigabitEthernet0/0] quit
# 配置OSPF路由协议
[PE4] ospf 2
[PE4-ospf-2] area 0
[PE4-ospf-2-area-0.0.0.0] network 10.1.1.2 0.0.0.0
[PE4-ospf-2-area-0.0.0.0] network 91.1.1.0 0.0.0.255
[PE4-ospf-2-area-0.0.0.0] quit
[PE4-ospf-2] quit
# 创建VPN实例vpn1,并配置RD和VPN Target属性。
[PE4] ip vpn-instance vpn1
[PE4-vpn-instance-vpn1] route-distinguisher 10.1.1.2:1
[PE4-vpn-instance-vpn1] vpn-target 100:1 both
[PE4-vpn-instance-vpn1] quit
# 将接口GigabitEthernet0/1绑定到vpn1上。
[PE4] interface gigabitethernet 0/1
[PE4-GigabitEthernet0/1] ip binding vpn-instance vpn1
[PE4-GigabitEthernet0/1] ip address 192.168.2.1 255.255.255.0
[PE4-GigabitEthernet0/1] quit
# 配置BGP路由协议,在二级运营商PE之间建立MP-IBGP。
[PE4] bgp 200
[PE4-bgp] peer 10.1.1.1 as-number 200
[PE4-bgp] peer 10.1.1.1 next-hop-local
[PE4-bgp] peer 10.1.1.1 connect-interface LoopBack0
[PE4-bgp] ipv4-family vpnv4
[PE4-bgp-af-vpnv4] peer 10.1.1.1 enable
# 进入BGP-VPN实例视图,配置PE 4的CE用户,将私网直连路由重分布到VPN路由中。
[PE4-bgp] ipv4 vpn-instance vpn1
[PE4-bgp-vpn1] import direct
[PE4-bgp-vpn1] quit
[PE4-bgp] quit
# 查看二级运营商PE 3的VPN路由表中,是否有对方二级运营商PE的自身的VPN路由。
<PE3> display ip routing-table vpn-instance vpn1
Routing Tables: vpn1
Destinations : 5 Routes : 5
Destination/Mask Proto Pre Cost NextHop Interface
192.168.1.0/24 Direct 0 0 192.168.1.1 Eth0/8
192.168.1.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.2.0/24 BGP 255 0 10.1.1.2 NULL0
# 在PE 3 ping对方二级运营商PE的私网地址,查看能否ping通。
<PE3> ping -vpn-instance vpn1 192.168.2.1
PING 192.168.2.1: 56 data bytes, press CTRL_C to break
Reply from 192.168.2.1: bytes=56 Sequence=0 ttl=255 time=2 ms
Reply from 192.168.2.1: bytes=56 Sequence=1 ttl=255 time=1 ms
Reply from 192.168.2.1: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 192.168.2.1: bytes=56 Sequence=3 ttl=255 time=2 ms
Reply from 192.168.2.1: bytes=56 Sequence=4 ttl=255 time=1 ms
--- 192.168.2.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/1/2 ms
# 在CE 3 ping对方二级运营商PE用户CE 4的接口地址,查看能否ping通。
<CE3> ping 192.168.2.2
PING 192.168.2.2: 56 data bytes, press CTRL_C to break
Reply from 192.168.2.2: bytes=56 Sequence=0 ttl=253 time=2 ms
Reply from 192.168.2.2: bytes=56 Sequence=1 ttl=253 time=1 ms
Reply from 192.168.2.2: bytes=56 Sequence=2 ttl=253 time=1 ms
Reply from 192.168.2.2: bytes=56 Sequence=3 ttl=253 time=2 ms
Reply from 192.168.2.2: bytes=56 Sequence=4 ttl=253 time=2 ms
--- 192.168.2.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/1/2 ms
· PE 1:
#
sysname PE1
#
router id 10.1.1.5
#
ip vpn-instance vpn1
route-distinguisher 10.1.1.5:1
vpn-target 100:1 export-extcommunity
vpn-target 100:1 import-extcommunity
#
mpls lsr-id 10.1.1.5
#
mpls
#
mpls ldp
#
mpls ldp vpn-instance vpn1
#
interface LoopBack0
ip address 10.1.1.5 255.255.255.255
#
interface GigabitEthernet0/0
port link-mode route
ip binding vpn-instance vpn1
ip address 82.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/1
port link-mode route
ip address 80.1.1.1 255.255.255.0
mpls
mpls ldp
#
bgp 1000
undo synchronization
peer 10.1.1.6 as-number 1000
peer 10.1.1.6 connect-interface LoopBack0
#
ipv4-family vpnv4
peer 10.1.1.6 enable
#
ipv4-family vpn-instance vpn1
import-route ospf 2
#
ospf 1
area 0.0.0.0
network 80.1.1.0 0.0.0.255
network 10.1.1.5 0.0.0.0
#
ospf 2 vpn-instance vpn1
import-route bgp
area 0.0.0.0
network 82.1.1.0 0.0.0.255
#
· CE 1:
#
sysname CE1
#
router id 10.1.1.3
#
mpls lsr-id 10.1.1.3
#
mpls
#
mpls ldp
#
interface GigabitEthernet0/0
port link-mode route
ip address 82.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/1
ip address 90.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface LoopBack0
ip address 10.1.1.3 255.255.255.255
#
ospf 2
area 0.0.0.0
network 10.1.1.3 0.0.0.0
network 82.1.1.0 0.0.0.255
network 90.1.1.0 0.0.0.255
#
· PE 3:
#
sysname PE3
#
router id 10.1.1.1
#
ip vpn-instance vpn1
route-distinguisher 10.1.1.1:1
vpn-target 100:1 export-extcommunity
vpn-target 100:1 import-extcommunity
#
mpls lsr-id 10.1.1.1
#
mpls
#
mpls ldp
#
interface GigabitEthernet0/0
ip address 90.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/1
port link-mode route
ip binding vpn-instance vpn1
ip address 192.16.1.1 255.255.255.0
#
interface LoopBack0
ip address 10.1.1.1 255.255.255.255
#
bgp 200
undo synchronization
peer 10.1.1.2 as-number 200
peer 10.1.1.2 next-hop-local
peer 10.1.1.2 connect-interface LoopBack0
#
ipv4-family vpnv4
peer 10.1.1.2 enable
#
ipv4-family vpn-instance vpn1
import direct
#
ospf 2
area 0.0.0.0
network 10.1.1.1 0.0.0.0
network 90.1.1.0 0.0.0.255
#
· PE 2:
#
sysname PE2
#
router id 10.1.1.6
#
ip vpn-instance vpn1
route-distinguisher 10.1.1.6:1
vpn-target 100:1 export-extcommunity
vpn-target 100:1 import-extcommunity
#
mpls lsr-id 10.1.1.6
#
mpls
#
mpls ldp
#
interface LoopBack0
ip address 10.1.1.6 255.255.255.255
#
interface GigabitEthernet0/0
port link-mode route
ip address 80.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/1
port link-mode route
ip binding vpn-instance vpn1
ip address 81.1.1.2 255.255.255.0
mpls
#
bgp 1000
undo synchronization
peer 10.1.1.5 as-number 1000
peer 10.1.1.5 connect-interface LoopBack0
#
ipv4-family vpnv4
peer 10.1.1.5 enable
#
ipv4-family vpn-instance vpn1
import-route ospf 2
#
ospf 1
area 0.0.0.0
network 10.1.1.6 0.0.0.0
network 80.1.1.0 0.0.0.255
#
ospf 2 vpn-instance vpn1
import-route bgp
area 0.0.0.0
network 81.1.1.0 0.0.0.255
#
· CE 2:
#
sysname CE2
#
router id 10.1.1.4
#
ip vpn-instance vpn1
route-distinguisher 10.1.1.4:1
vpn-target 100:1 export-extcommunity
vpn-target 100:1 import-extcommunity
#
mpls lsr-id 10.1.1.4
#
mpls
#
mpls ldp
#
interface LoopBack0
ip address 10.1.1.4 255.255.255.255
#
interface GigabitEthernet0/0
port link-mode route
ip address 81.1.1.1 255.255.255.0
mpls
#
interface GigabitEthernet0/1
port link-mode route
ip address 91.1.1.1 255.255.255.0
mpls
mpls ldp
#
ospf 2
area 0.0.0.0
network 10.1.1.4 0.0.0.0
network 91.1.1.0 0.0.0.255
network 81.1.1.0 0.0.0.255
#
· PE 4:
#
sysname PE4
#
router id 10.1.1.2
#
ip vpn-instance vpn1
route-distinguisher 10.1.1.2:1
vpn-target 100:1 export-extcommunity
vpn-target 100:1 import-extcommunity
#
mpls lsr-id 10.1.1.2
#
mpls
#
mpls ldp
#
interface LoopBack0
ip address 10.1.1.2 255.255.255.255
#
interface GigabitEthernet0/0
port link-mode route
ip address 91.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/1
port link-mode route
ip binding vpn-instance vpn1
ip address 192.168.2.1 255.255.255.0
#
bgp 200
network 91.1.1.0 255.255.255.0
undo synchronization
peer 10.1.1.1 as-number 200
peer 10.1.1.1 next-hop-local
peer 10.1.1.1 connect-interface LoopBack0
#
ipv4-family vpnv4
peer 10.1.1.1 enable
#
ipv4-family vpn-instance vpn1
import direct
#
ospf 2
area 0.0.0.0
network 91.1.1.0 0.0.0.255
network 10.1.1.2 0.0.0.0
#
· H3C MSR 系列路由器 命令参考(V5)-R2311
· H3C MSR 系列路由器 配置指导(V5)-R2311
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!