示例:配置基于 H-VPLS BGP 和基于 LDP 的 VPLS 互操作性
此示例说明如何在多宿主部署中使用基于 LDP 的 VPLS 和基于 BGP 的 VPLS 互操作情景中配置分层虚拟专用 LAN 服务 (H-VPLS)。当客户部署正在使用两种不同类型的 VPLS,而您需要将其集成时,此方案会很有用。另一个例子是,ISP-A 运行基于 BGP 的 VPLS,而 ISP-B 正在运行基于 LDP 的 VPLS,而两个 ISP 正在合并其网络。
要求
配置此示例之前,不需要除设备初始化之外的特殊配置。
概述
在此示例中,设备 PE2 和设备 PE3 充当网络提供商边缘 (PE) 路由器,具有基于 BGP 和基于 LDP 的 VPLS 终端。
此示例中的设备具有以下角色:
仅 BGP VPLS PE — 设备 PE1
仅 LDP VPLS PE — 设备 PE4
BGP-LDP VPLS PE — 设备 PE2 和设备 PE3
图 1 显示了此示例中使用的拓扑。

从设备 PE4,到设备 PE3 的伪线是主要路径或工作路径。伪线设备 PE2 是备份路径。
CLI 快速配置 显示了 图 1 中所有设备的配置。分 步过程 部分介绍了有关设备 PE1、设备 PE2 和设备 PE4 的步骤。
配置
程序
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,然后将命令复制并粘贴到层级的 [edit]
CLI 中。
设备 PE1
set interfaces ge-2/0/5 encapsulation ethernet-vpls set interfaces ge-2/0/5 unit 0 description to_CE1 set interfaces ge-2/0/5 unit 0 family vpls set interfaces fe-2/0/9 unit 0 description to_PE2 set interfaces fe-2/0/9 unit 0 family inet address 10.10.3.1/30 set interfaces fe-2/0/9 unit 0 family mpls set interfaces fe-2/0/10 unit 0 description to_PE3 set interfaces fe-2/0/10 unit 0 family inet address 10.10.1.1/30 set interfaces fe-2/0/10 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.0.2.1/24 set protocols mpls interface fe-2/0/10.0 set protocols mpls interface fe-2/0/9.0 set protocols ldp interface fe-2/0/10.0 set protocols ldp interface fe-2/0/9.0 set protocols ldp interface lo0.0 set protocols bgp group internal-peers type internal set protocols bgp group internal-peers local-address 192.0.2.1 set protocols bgp group internal-peers family l2vpn signaling set protocols bgp group internal-peers neighbor 192.0.2.2 set protocols bgp group internal-peers neighbor 192.0.2.3 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface fe-2/0/10.0 set protocols ospf area 0.0.0.0 interface fe-2/0/9.0 set routing-instances h-vpls-PE1 instance-type vpls set routing-instances h-vpls-PE1 interface ge-2/0/5.0 set routing-instances h-vpls-PE1 route-distinguisher 1:1 set routing-instances h-vpls-PE1 vrf-target target:1:1 set routing-instances h-vpls-PE1 protocols vpls interface ge-2/0/5.0 set routing-instances h-vpls-PE1 protocols vpls site PE1-vpls site-identifier 2 set routing-options autonomous-system 64510
设备 PE2
set interfaces ge-2/0/6 encapsulation ethernet-vpls set interfaces ge-2/0/6 unit 0 description to_CE2 set interfaces ge-2/0/6 unit 0 family vpls set interfaces fe-2/0/8 unit 0 description to_PE3 set interfaces fe-2/0/8 unit 0 family inet address 10.10.4.2/30 set interfaces fe-2/0/8 unit 0 family mpls set interfaces fe-2/0/9 unit 0 description to_PE4 set interfaces fe-2/0/9 unit 0 family inet address 10.10.5.1/30 set interfaces fe-2/0/9 unit 0 family mpls set interfaces fe-2/0/10 unit 0 description to_PE1 set interfaces fe-2/0/10 unit 0 family inet address 10.10.3.2/30 set interfaces fe-2/0/10 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.0.2.2/24 set protocols mpls interface fe-2/0/10.0 set protocols mpls interface fe-2/0/9.0 set protocols mpls interface fe-2/0/8.0 set protocols ldp interface fe-2/0/10.0 set protocols ldp interface fe-2/0/9.0 set protocols ldp interface fe-2/0/8.0 set protocols ldp interface lo0.0 set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 192.0.2.2 set protocols bgp group ibgp family l2vpn signaling set protocols bgp group ibgp neighbor 192.0.2.3 set protocols bgp group ibgp neighbor 192.0.2.1 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface fe-2/0/10.0 set protocols ospf area 0.0.0.0 interface fe-2/0/9.0 set protocols ospf area 0.0.0.0 interface fe-2/0/8.0 set routing-instances h-vpls-PE2 instance-type vpls set routing-instances h-vpls-PE2 interface ge-2/0/6.0 set routing-instances h-vpls-PE2 route-distinguisher 1:2 set routing-instances h-vpls-PE2 vrf-target target:1:1 set routing-instances h-vpls-PE2 protocols vpls interface ge-2/0/6.0 set routing-instances h-vpls-PE2 protocols vpls site PE2-vpls site-identifier 1 set routing-instances h-vpls-PE2 protocols vpls site PE2-vpls multi-homing set routing-instances h-vpls-PE2 protocols vpls site PE2-vpls mesh-group h-vpls-PE2 set routing-instances h-vpls-PE2 protocols vpls vpls-id 100 set routing-instances h-vpls-PE2 protocols vpls mesh-group h-vpls-PE2 vpls-id 100 set routing-instances h-vpls-PE2 protocols vpls mesh-group h-vpls-PE2 local-switching set routing-instances h-vpls-PE2 protocols vpls mesh-group h-vpls-PE2 neighbor 192.0.2.4 set routing-options autonomous-system 64510
设备 PE3
set interfaces fe-2/0/8 unit 0 description to_PE2 set interfaces fe-2/0/8 unit 0 family inet address 10.10.4.1/30 set interfaces fe-2/0/8 unit 0 family mpls set interfaces fe-2/0/9 unit 0 description to_PE4 set interfaces fe-2/0/9 unit 0 family inet address 10.10.6.1/30 set interfaces fe-2/0/9 unit 0 family mpls set interfaces fe-2/0/10 unit 0 description to_PE1 set interfaces fe-2/0/10 unit 0 family inet address 10.10.1.2/30 set interfaces fe-2/0/10 unit 0 family mpls set interfaces ge-2/1/3 encapsulation ethernet-vpls set interfaces ge-2/1/3 unit 0 description to_CE3 set interfaces ge-2/1/3 unit 0 family vpls set interfaces lo0 unit 0 family inet address 192.0.2.3/24 set protocols mpls interface fe-2/0/10.0 set protocols mpls interface fe-2/0/8.0 set protocols mpls interface fe-2/0/9.0 set protocols ldp interface fe-2/0/10.0 set protocols ldp interface fe-2/0/9.0 set protocols ldp interface fe-2/0/8.0 set protocols ldp interface lo0.0 set protocols bgp group internal-peers type internal set protocols bgp group internal-peers local-address 192.0.2.3 set protocols bgp group internal-peers family l2vpn signaling set protocols bgp group internal-peers neighbor 192.0.2.2 set protocols bgp group internal-peers neighbor 192.0.2.1 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface fe-2/0/10.0 set protocols ospf area 0.0.0.0 interface fe-2/0/8.0 set protocols ospf area 0.0.0.0 interface fe-2/0/9.0 set routing-instances h-vpls-PE3 instance-type vpls set routing-instances h-vpls-PE3 interface ge-2/1/3.0 set routing-instances h-vpls-PE3 route-distinguisher 1:3 set routing-instances h-vpls-PE3 vrf-target target:1:1 set routing-instances h-vpls-PE3 protocols vpls interface ge-2/1/3.0 set routing-instances h-vpls-PE3 protocols vpls site PE3-vpls site-identifier 1 set routing-instances h-vpls-PE3 protocols vpls site PE3-vpls multi-homing set routing-instances h-vpls-PE3 protocols vpls site PE3-vpls mesh-group h-vpls-PE3 set routing-instances h-vpls-PE3 protocols vpls vpls-id 100 set routing-instances h-vpls-PE3 protocols vpls mesh-group h-vpls-PE3 vpls-id 100 set routing-instances h-vpls-PE3 protocols vpls mesh-group h-vpls-PE3 local-switching set routing-instances h-vpls-PE3 protocols vpls mesh-group h-vpls-PE3 neighbor 192.0.2.4 set routing-options autonomous-system 64510
设备 PE4
set interfaces fe-2/0/9 unit 0 description to_PE3 set interfaces fe-2/0/9 unit 0 family inet address 10.10.6.2/30 set interfaces fe-2/0/9 unit 0 family mpls set interfaces fe-2/0/10 unit 0 description to_PE2 set interfaces fe-2/0/10 unit 0 family inet address 10.10.5.2/30 set interfaces fe-2/0/10 unit 0 family mpls set interfaces ge-2/1/7 encapsulation ethernet-vpls set interfaces ge-2/1/7 unit 0 description to_CE4 set interfaces ge-2/1/7 unit 0 family vpls set interfaces lo0 unit 0 family inet address 192.0.2.4/24 set protocols mpls interface fe-2/0/10.0 set protocols mpls interface fe-2/0/9.0 set protocols ldp interface fe-2/0/10.0 set protocols ldp interface fe-2/0/9.0 set protocols ldp interface lo0.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface fe-2/0/10.0 set protocols ospf area 0.0.0.0 interface fe-2/0/9.0 set routing-instances ldp-vpls instance-type vpls set routing-instances ldp-vpls interface ge-2/1/7.0 set routing-instances ldp-vpls protocols vpls vpls-id 100 set routing-instances ldp-vpls protocols vpls neighbor 192.0.2.3 set routing-instances ldp-vpls protocols vpls neighbor 192.0.2.2
设备 CE1
set interfaces ge-2/0/8 unit 0 description to_PE1 set interfaces ge-2/0/8 unit 0 family inet address 172.16.0.1/24 set interfaces lo0 unit 0 family inet address 10.255.14.214/32 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-2/0/8.0
设备 CE2
set interfaces ge-2/1/5 unit 0 description to_PE2 set interfaces ge-2/1/5 unit 0 family inet address 172.16.0.2/24 set interfaces lo0 unit 0 family inet address 10.255.14.215/32 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-2/1/5.0
设备 CE3
set interfaces ge-2/0/9 unit 0 description to_PE3 set interfaces ge-2/0/9 unit 0 family inet address 172.16.0.3/24 set interfaces lo0 unit 0 family inet address 10.255.14.218/32 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-2/0/9.0
设备 CE4
set interfaces ge-2/1/6 unit 0 description to_PE4 set interfaces ge-2/1/6 unit 0 family inet address 172.16.0.4/24 set interfaces lo0 unit 0 family inet address 10.255.14.219/32 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-2/1/6.0
逐步过程
以下示例要求您在配置层次结构中的各个级别上导航。有关导航 CLI 的信息,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
要配置基于 BGP 的 VPLS PE 设备:
-
配置接口。
在连接到客户边缘的设备接口上,启用 VPLS 封装和 VPLS 地址系列。
在面向核心的接口上,启用 MPLS 标签。
[edit interfaces] user@PE1# set ge-2/0/5 encapsulation ethernet-vpls user@PE1# set ge-2/0/5 unit 0 description to_CE1 user@PE1# set ge-2/0/5 unit 0 family vpls user@PE1# set fe-2/0/10 unit 0 description to_PE3 user@PE1# set fe-2/0/10 unit 0 family inet address 10.10.1.1/30 user@PE1# set fe-2/0/10 unit 0 family mpls user@PE1# set fe-2/0/9 unit 0 description to_PE2 user@PE1# set fe-2/0/9 unit 0 family inet address 10.10.3.1/30 user@PE1# set fe-2/0/9 unit 0 family mpls user@PE1# set lo0 unit 0 family inet address 192.0.2.1/24
-
在接口上启用 MPLS 和 LDP。
在连接到其他 PE 设备的 MTU 设备接口上,配置 MPLS 和 LDP。
[edit protocols mpls] user@PE1# set interface fe-2/0/10.0 user@PE1# set interface fe-2/0/9.0 [edit protocols ldp ] user@PE1# set interface fe-2/0/10.0 user@PE1# set interface fe-2/0/9.0 user@PE1# set interface lo0.0
-
在接口上启用路由。
在连接到其他 PE 设备的 MTU 设备接口上,配置内部网关协议 (IGP),例如 OSPF 或 IS-IS。
[edit protocols ospf area 0.0.0.0] user@PE1# set interface lo0.0 passive user@PE1# set interface fe-2/0/10.0 user@PE1# set interface fe-2/0/9.0
-
使用 2 层 VPN 信令配置 BGP。
该
l2vpn signaling
语句支持在同一网络层可访问性信息 (NLRI) 下对 VPLS 和第 2 层 VPN 通告。内部 IBGP (IBGP) 全网状包括设备 PE1、设备 PE2 和设备 PE3。不包括设备 PE4。
[edit protocols bgp group internal-peers] user@PE1# set type internal user@PE1# set local-address 192.0.2.1 user@PE1# set family l2vpn signaling user@PE1# set neighbor 192.0.2.2 user@PE1# set neighbor 192.0.2.3
-
配置 VPLS 路由实例。
由于这是基于 BGP 的 VPLS,因此包括路由识别器、VRF 目标以及站点名称和 ID。
[edit routing-instances h-vpls-PE1] user@PE1# set instance-type vpls user@PE1# set interface ge-2/0/5.0 user@PE1# set route-distinguisher 1:1 user@PE1# set vrf-target target:1:1 [edit routing-instances h-vpls-PE1 protocols vpls] user@PE1# set interface ge-2/0/5.0 user@PE1# set site PE1-vpls site-identifier 2
-
配置自治系统 (AS) 编号。
[edit routing-options] user@PE1# set autonomous-system 64510
逐步过程
以下示例要求您在配置层次结构中的各个级别上导航。有关导航 CLI 的信息,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
要配置基于 BGP-LDP 的 VPLS PE 设备:
配置接口。
在连接到客户边缘的 PE-r 设备接口上,配置其中一个 VPLS 封装类型和 VPLS 地址系列。这将启用 VPLS。
在面向核心的接口上,启用 MPLS 标签。
[edit interfaces] user@PE2# set ge-2/0/6 encapsulation ethernet-vpls user@PE2# set ge-2/0/6 unit 0 description to_CE2 user@PE2# set ge-2/0/6 unit 0 family vpls user@PE2# set fe-2/0/10 unit 0 description to_PE1 user@PE2# set fe-2/0/10 unit 0 family inet address 10.10.3.2/30 user@PE2# set fe-2/0/10 unit 0 family mpls user@PE2# set fe-2/0/9 unit 0 description to_PE4 user@PE2# set fe-2/0/9 unit 0 family inet address 10.10.5.1/30 user@PE2# set fe-2/0/9 unit 0 family mpls user@PE2# set fe-2/0/8 unit 0 description to_PE3 user@PE2# set fe-2/0/8 unit 0 family inet address 10.10.4.2/30 user@PE2# set fe-2/0/8 unit 0 family mpls user@PE2# set lo0 unit 0 family inet address 192.0.2.2/24
在接口上启用 MPLS 和 LDP。
在连接到其他 PE 设备的 MTU 设备接口上,配置 MPLS 和 LDP。
[edit protocols mpls] user@PE2# set interface fe-2/0/10.0 user@PE2# set interface fe-2/0/9.0 user@PE2# set interface fe-2/0/8.0 [edit protocols ldp] user@PE2# set interface fe-2/0/10.0 user@PE2# set interface fe-2/0/9.0 user@PE2# set interface fe-2/0/8.0 user@PE2# set interface lo0.0
在接口上启用路由。
在连接到其他 PE 设备的 MTU 设备接口上,配置内部网关协议 (IGP),例如 OSPF 或 IS-IS。
[edit protocols ospf area 0.0.0.0] user@PE2# set interface lo0.0 passive user@PE2# set interface fe-2/0/10.0 user@PE2# set interface fe-2/0/9.0 user@PE2# set interface fe-2/0/8.0
[edit protocols bgp group ibgp] user@PE2# set type internal user@PE2# set local-address 192.0.2.2 user@PE2# set family l2vpn signaling user@PE2# set neighbor 192.0.2.3 user@PE2# set neighbor 192.0.2.1
配置 VPLS。
该
vpls-id
语句为 VPLS 实例启用 LDP 信令。[edit routing-instances h-vpls-PE2] user@PE2# set instance-type vpls user@PE2# set interface ge-2/0/6.0 user@PE2# set route-distinguisher 1:2 user@PE2# set vrf-target target:1:1 [edit routing-instances h-vpls-PE2 protocols vpls] user@PE2# set interface ge-2/0/6.0 user@PE2# set site PE2-vpls site-identifier 1 user@PE2# set site PE2-vpls multi-homing user@PE2# set site PE2-vpls mesh-group h-vpls-PE2 user@PE2# set vpls-id 100 user@PE2# set mesh-group h-vpls-PE2 vpls-id 100 user@PE2# set mesh-group h-vpls-PE2 local-switching user@PE2# set mesh-group h-vpls-PE2 neighbor 192.0.2.4
[edit routing-options] user@PE2# set autonomous-system 64510
逐步过程
以下示例要求您在配置层次结构中的各个级别上导航。有关导航 CLI 的信息,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
要配置基于 LDP 的 VPLS PE 设备:
配置接口。
在连接到客户边缘的 PE-r 设备接口上,配置其中一个 VPLS 封装类型和 VPLS 地址系列。这将启用 VPLS。
在面向核心的接口上,启用 MPLS 标签。
[edit interfaces] user@PE4# set fe-2/0/10 unit 0 description to_PE2 user@PE4# set fe-2/0/10 unit 0 family inet address 10.10.5.2/30 user@PE4# set fe-2/0/10 unit 0 family mpls user@PE4# set fe-2/0/9 unit 0 description to_PE3 user@PE4# set fe-2/0/9 unit 0 family inet address 10.10.6.2/30 user@PE4# set fe-2/0/9 unit 0 family mpls user@PE4# set ge-2/1/7 encapsulation ethernet-vpls user@PE4# set ge-2/1/7 unit 0 description to_CE4 user@PE4# set ge-2/1/7 unit 0 family vpls user@PE4# set lo0 unit 0 family inet address 192.0.2.4/24
在接口上启用 MPLS 和 LDP。
在连接到其他 PE 设备的 MTU 设备接口上,配置 MPLS 和 LDP。
[edit protocols mpls] user@PE4# set interface fe-2/0/10.0 user@PE4# set interface fe-2/0/9.0 [edit protocols ldp] user@PE4# set interface fe-2/0/10.0 user@PE4# set interface fe-2/0/9.0 user@PE4# set interface lo0.0
在接口上启用路由。
在连接到其他 PE 设备的 MTU 设备接口上,配置内部网关协议 (IGP),例如 OSPF 或 IS-IS。
[edit protocols ospf area 0.0.0.0] user@PE4# set interface lo0.0 passive user@PE4# set interface fe-2/0/10.0 user@PE4# set interface fe-2/0/9.0
配置 VPLS。
该
vpls-id
语句为 VPLS 实例启用 LDP 信令。[edit routing-instances ldp-vpls] user@PE4# set instance-type vpls user@PE4# set interface ge-2/1/7.0 user@PE4# set protocols vpls vpls-id 100 [edit routing-instances ldp-vpls protocols vpls] user@PE4# set neighbor 192.0.2.3 user@PE4# set neighbor 192.0.2.2
结果
在配置模式下,输入 show interfaces
、 show protocols
、 show routing-instances
和 show routing-options
命令,以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明,以更正配置。
设备 PE1
user@PE1# show interfaces
ge-2/0/5 {
encapsulation ethernet-vpls;
unit 0 {
description to_CE1;
family vpls;
}
}
fe-2/0/9 {
}
unit 0 {
description to_PE2;
family inet {
address 10.10.3.1/30;
}
family mpls;
}
}
fe-2/0/10 {
unit 0 {
description to_PE3;
family inet {
address 10.10.1.1/30;
}
family mpls;
}
}
lo0 {
unit 0 {
family inet {
address 192.0.2.1/24;
}
}
}
user@PE1# show protocols
mpls {
interface fe-2/0/10.0;
interface fe-2/0/9.0;
}
bgp {
group internal-peers {
type internal;
local-address 192.0.2.1;
family l2vpn {
signaling;
}
neighbor 192.0.2.2;
neighbor 192.0.2.3;
}
}
ospf {
area 0.0.0.0 {
interface lo0.0 {
passive;
}
interface fe-2/0/10.0;
interface fe-2/0/9.0;
}
}
ldp {
interface fe-2/0/10.0;
interface fe-2/0/9.0;
interface lo0.0;
}
user@PE1# show routing-instances
h-vpls-PE1 {
instance-type vpls;
interface ge-2/0/5.0;
route-distinguisher 1:1;
vrf-target target:1:1;
protocols {
vpls {
interface ge-2/0/5.0;
site PE1-vpls {
site-identifier 2;
}
}
}
}
user@PE1# show routing-options
autonomous-system 64510;
设备 PE2
user@PE2# show interfaces
ge-2/0/6 {
encapsulation ethernet-vpls;
unit 0 {
description to_CE2;
family vpls;
}
}
fe-2/0/8 {
unit 0 {
description to_PE3;
family inet {
address 10.10.4.2/30;
}
family mpls;
}
}
fe-2/0/9 {
unit 0{
description to_PE4;
family inet {
address 10.10.5.1/30;
}
family mpls;
}
}
fe-2/0/10 {
unit 0 {
description to_PE1;
family inet {
address 10.10.3.2/30;
}
family mpls;
}
}
lo0 {
unit 0 {
family inet {
address 192.0.2.2/24;
}
}
}
user@PE2# show protocols
mpls {
interface fe-2/0/10.0;
interface fe-2/0/9.0;
interface fe-2/0/8.0;
}
bgp {
group ibgp {
type internal;
local-address 192.0.2.2;
family l2vpn {
signaling;
}
neighbor 192.0.2.3;
neighbor 192.0.2.1;
}
}
ospf {
area 0.0.0.0 {
interface lo0.0 {
passive;
}
interface fe-2/0/10.0;
interface fe-2/0/9.0;
interface fe-2/0/8.0;
}
}
ldp {
interface fe-2/0/10.0;
interface fe-2/0/9.0;
interface fe-2/0/8.0;
interface lo0.0;
}
user@PE2# show routing-instances
h-vpls-PE2 {
instance-type vpls;
interface ge-2/0/6.0;
route-distinguisher 1:2;
vrf-target target:1:1;
protocols {
vpls {
interface ge-2/0/6.0;
site PE2-vpls {
site-identifier 1;
multi-homing;
mesh-group h-vpls-PE2;
}
vpls-id 100;
mesh-group h-vpls-PE2 {
vpls-id 100;
local-switching;
neighbor 192.0.2.4;
}
}
}
}
user@PE2# show routing-options
autonomous-system 64510;
设备 PE4
user@PE4# show interfaces
ge-2/1/7 {
encapsulation ethernet-vpls;
unit 0 {
description to_CE4;
family vpls;
}
}
fe-2/0/9 {
unit 0 {
description to_PE3;
family inet {
address 10.10.6.2/30;
}
family mpls;
}
}
fe-2/0/10 {
unit 0 {
description to_PE2;
family inet {
address 10.10.5.2/30;
}
family mpls;
}
}
lo0 {
unit 0 {
family inet {
address 192.0.2.4/24;
}
}
}
user@PE4# show protocols
mpls {
interface fe-2/0/9.0;
interface fe-2/0/10.0;
}
ospf {
area 0.0.0.0 {
interface lo0.0 {
passive;
}
interface fe-2/0/9.0;
interface fe-2/0/10.0;
}
}
ldp {
interface fe-2/0/10.0;
interface fe-2/0/9.0;
interface lo0.0;
}
user@PE4# show routing-instances
ldp-vpls {
instance-type vpls;
interface ge-2/1/7.0;
protocols {
vpls {
vpls-id 100;
neighbor 192.0.2.3;
neighbor 192.0.2.2;
}
}
}
完成设备配置后,请从配置模式进入 commit 。
验证
确认配置工作正常。在采用 BGP-LDP VPLS 的多宿主场景中,备份 PE(设备 PE2)的 LDP 伪线处于关闭状态。而在仅 LDP VPLS PE(设备 PE4)上,到主要和备用 BGP-LDP PE 设备的伪线处于开启状态。
验证 VPLS 连接
目的
验证 VPLS 连接是否按预期工作。
行动
在操作模式下,输入 show vpls connections
命令。
user@PE1> show vpls connections Layer-2 VPN connections: Legend for connection status (St) EI -- encapsulation invalid NC -- interface encapsulation not CCC/TCC/VPLS EM -- encapsulation mismatch WE -- interface and instance encaps not same VC-Dn -- Virtual circuit down NP -- interface hardware not present CM -- control-word mismatch -> -- only outbound connection is up CN -- circuit not provisioned <- -- only inbound connection is up OR -- out of range Up -- operational OL -- no outgoing label Dn -- down LD -- local site signaled down CF -- call admission control failure RD -- remote site signaled down SC -- local and remote site ID collision LN -- local site not designated LM -- local site ID not minimum designated RN -- remote site not designated RM -- remote site ID not minimum designated XX -- unknown connection status IL -- no incoming label MM -- MTU mismatch MI -- Mesh-Group ID not available BK -- Backup connection ST -- Standby connection PF -- Profile parse failure PB -- Profile busy RS -- remote site standby SN -- Static Neighbor LB -- Local site not best-site RB -- Remote site not best-site VM -- VLAN ID mismatch Legend for interface status Up -- operational Dn -- down Instance: h-vpls-PE1 Local site: PE1-vpls (2) connection-site Type St Time last up # Up trans 1 rmt Up Oct 16 16:52:27 2012 1 Remote PE: 192.0.2.2, Negotiated control-word: No Incoming label: 800016, Outgoing label: 800009 Local interface: vt-2/0/10.51380738, Status: Up, Encapsulation: VPLS Description: Intf - vpls h-vpls-PE1 local site 2 remote site 1
user@PE2> show vpls connections Layer-2 VPN connections: Legend for connection status (St) EI -- encapsulation invalid NC -- interface encapsulation not CCC/TCC/VPLS EM -- encapsulation mismatch WE -- interface and instance encaps not same VC-Dn -- Virtual circuit down NP -- interface hardware not present CM -- control-word mismatch -> -- only outbound connection is up CN -- circuit not provisioned <- -- only inbound connection is up OR -- out of range Up -- operational OL -- no outgoing label Dn -- down LD -- local site signaled down CF -- call admission control failure RD -- remote site signaled down SC -- local and remote site ID collision LN -- local site not designated LM -- local site ID not minimum designated RN -- remote site not designated RM -- remote site ID not minimum designated XX -- unknown connection status IL -- no incoming label MM -- MTU mismatch MI -- Mesh-Group ID not available BK -- Backup connection ST -- Standby connection PF -- Profile parse failure PB -- Profile busy RS -- remote site standby SN -- Static Neighbor LB -- Local site not best-site RB -- Remote site not best-site VM -- VLAN ID mismatch Legend for interface status Up -- operational Dn -- down Instance: h-vpls-PE2 BGP-VPLS State Local site: PE2-vpls (1) connection-site Type St Time last up # Up trans 1 rmt RN 2 rmt Up Oct 16 17:12:31 2012 1 Remote PE: 192.0.2.1, Negotiated control-word: No Incoming label: 800257, Outgoing label: 800000 Local interface: vt-2/0/10.118489089, Status: Up, Encapsulation: VPLS Description: Intf - vpls h-vpls-PE2 local site 1 remote site 2 LDP-VPLS State VPLS-id: 100 Mesh-group connections: h-vpls-PE2 Neighbor Type St Time last up # Up trans 192.0.2.4(vpls-id 100) rmt Up Oct 16 17:12:30 2012 1 Remote PE: 192.0.2.4, Negotiated control-word: No Incoming label: 800000, Outgoing label: 800001 Negotiated PW status TLV: No Local interface: vt-2/0/10.118489088, Status: Up, Encapsulation: ETHERNET Description: Intf - vpls h-vpls-PE2 neighbor 192.0.2.4 vpls-id 100
user@PE3> show vpls connections Layer-2 VPN connections: Legend for connection status (St) EI -- encapsulation invalid NC -- interface encapsulation not CCC/TCC/VPLS EM -- encapsulation mismatch WE -- interface and instance encaps not same VC-Dn -- Virtual circuit down NP -- interface hardware not present CM -- control-word mismatch -> -- only outbound connection is up CN -- circuit not provisioned <- -- only inbound connection is up OR -- out of range Up -- operational OL -- no outgoing label Dn -- down LD -- local site signaled down CF -- call admission control failure RD -- remote site signaled down SC -- local and remote site ID collision LN -- local site not designated LM -- local site ID not minimum designated RN -- remote site not designated RM -- remote site ID not minimum designated XX -- unknown connection status IL -- no incoming label MM -- MTU mismatch MI -- Mesh-Group ID not available BK -- Backup connection ST -- Standby connection PF -- Profile parse failure PB -- Profile busy RS -- remote site standby SN -- Static Neighbor LB -- Local site not best-site RB -- Remote site not best-site VM -- VLAN ID mismatch Legend for interface status Up -- operational Dn -- down Instance: h-vpls-PE3 BGP-VPLS State Local site: PE3-vpls (1) connection-site Type St Time last up # Up trans 1 rmt LN 2 rmt LN LDP-VPLS State VPLS-id: 100 Mesh-group connections: h-vpls-PE3 Neighbor Type St Time last up # Up trans 192.0.2.4(vpls-id 100) rmt LN
user@PE4> show vpls connections Layer-2 VPN connections: Legend for connection status (St) EI -- encapsulation invalid NC -- interface encapsulation not CCC/TCC/VPLS EM -- encapsulation mismatch WE -- interface and instance encaps not same VC-Dn -- Virtual circuit down NP -- interface hardware not present CM -- control-word mismatch -> -- only outbound connection is up CN -- circuit not provisioned <- -- only inbound connection is up OR -- out of range Up -- operational OL -- no outgoing label Dn -- down LD -- local site signaled down CF -- call admission control failure RD -- remote site signaled down SC -- local and remote site ID collision LN -- local site not designated LM -- local site ID not minimum designated RN -- remote site not designated RM -- remote site ID not minimum designated XX -- unknown connection status IL -- no incoming label MM -- MTU mismatch MI -- Mesh-Group ID not available BK -- Backup connection ST -- Standby connection PF -- Profile parse failure PB -- Profile busy RS -- remote site standby SN -- Static Neighbor LB -- Local site not best-site RB -- Remote site not best-site VM -- VLAN ID mismatch Legend for interface status Up -- operational Dn -- down Instance: ldp-vpls VPLS-id: 100 Neighbor Type St Time last up # Up trans 192.0.2.2(vpls-id 100) rmt Up Oct 16 17:12:23 2012 1 Remote PE: 192.0.2.2, Negotiated control-word: No Incoming label: 800001, Outgoing label: 800000 Negotiated PW status TLV: No Local interface: vt-2/0/10.17825793, Status: Up, Encapsulation: ETHERNET Description: Intf - vpls ldp-vpls neighbor 192.0.2.2 vpls-id 100 192.0.2.3(vpls-id 100) rmt Up Oct 16 17:12:20 2012 1 Remote PE: 192.0.2.3, Negotiated control-word: No Incoming label: 800000, Outgoing label: 800000 Negotiated PW status TLV: No Local interface: vt-2/0/10.17825792, Status: Up, Encapsulation: ETHERNET Description: Intf - vpls ldp-vpls neighbor 192.0.2.3 vpls-id 100
意义
在设备 PE1 上,与设备 PE2 的 BGP-VPLS 连接已开启。在稳定状态下,设备 PE2 是主路由器,其上的所有伪线都断开。流量从 CE1 流到 PE1,从 PE2 流到 PE4,再到 CE4。
在设备 PE2 上,与设备 PE1 的 BGP-VPLS 连接已开启。与设备 PE3 的连接处于 RN 状态。设备 PE4 的 LDP-VPLS 连接已启动。
在设备 PE3 上,所有 VPLS 连接均处于 LN 状态。这是意料之中的,因为设备 PE3 是备份。
在设备 PE4 上,仅 LDP 的 VPLS 路由器、到设备 PE2 的主伪线以及到设备 PE3 的主伪线均处于运行状态。
手动触发从主动伪线到备用伪线的交换机
目的
验证设备 PE2 不可用时,流量流是否转移到设备 PE3。
行动
在设备 PE2 上,停用接口。
user@PE2# deactivate interfaces user@PE2# commit
在所有 PE 设备上重新运行
show vpls connections
命令。user@PE1> show vpls connections Layer-2 VPN connections: Legend for connection status (St) EI -- encapsulation invalid NC -- interface encapsulation not CCC/TCC/VPLS EM -- encapsulation mismatch WE -- interface and instance encaps not same VC-Dn -- Virtual circuit down NP -- interface hardware not present CM -- control-word mismatch -> -- only outbound connection is up CN -- circuit not provisioned <- -- only inbound connection is up OR -- out of range Up -- operational OL -- no outgoing label Dn -- down LD -- local site signaled down CF -- call admission control failure RD -- remote site signaled down SC -- local and remote site ID collision LN -- local site not designated LM -- local site ID not minimum designated RN -- remote site not designated RM -- remote site ID not minimum designated XX -- unknown connection status IL -- no incoming label MM -- MTU mismatch MI -- Mesh-Group ID not available BK -- Backup connection ST -- Standby connection PF -- Profile parse failure PB -- Profile busy RS -- remote site standby SN -- Static Neighbor LB -- Local site not best-site RB -- Remote site not best-site VM -- VLAN ID mismatch Legend for interface status Up -- operational Dn -- down Instance: h-vpls-PE1 Local site: PE1-vpls (2) connection-site Type St Time last up # Up trans 1 rmt Up Oct 17 12:24:01 2012 2 Remote PE: 192.0.2.3, Negotiated control-word: No Incoming label: 800000, Outgoing label: 800257 Local interface: vt-2/0/10.84934656, Status: Up, Encapsulation: VPLS Description: Intf - vpls h-vpls-PE1 local site 2 remote site 1
user@PE2> show vpls connections Layer-2 VPN connections: Legend for connection status (St) EI -- encapsulation invalid NC -- interface encapsulation not CCC/TCC/VPLS EM -- encapsulation mismatch WE -- interface and instance encaps not same VC-Dn -- Virtual circuit down NP -- interface hardware not present CM -- control-word mismatch -> -- only outbound connection is up CN -- circuit not provisioned <- -- only inbound connection is up OR -- out of range Up -- operational OL -- no outgoing label Dn -- down LD -- local site signaled down CF -- call admission control failure RD -- remote site signaled down SC -- local and remote site ID collision LN -- local site not designated LM -- local site ID not minimum designated RN -- remote site not designated RM -- remote site ID not minimum designated XX -- unknown connection status IL -- no incoming label MM -- MTU mismatch MI -- Mesh-Group ID not available BK -- Backup connection ST -- Standby connection PF -- Profile parse failure PB -- Profile busy RS -- remote site standby SN -- Static Neighbor LB -- Local site not best-site RB -- Remote site not best-site VM -- VLAN ID mismatch Legend for interface status Up -- operational Dn -- down Instance: h-vpls-PE2 BGP-VPLS State Local site: PE2-vpls (1) LDP-VPLS State VPLS-id: 100 Mesh-group connections: h-vpls-PE2 Neighbor Type St Time last up # Up trans 192.0.2.4(vpls-id 100) rmt OL
user@PE3> show vpls connections Layer-2 VPN connections: Legend for connection status (St) EI -- encapsulation invalid NC -- interface encapsulation not CCC/TCC/VPLS EM -- encapsulation mismatch WE -- interface and instance encaps not same VC-Dn -- Virtual circuit down NP -- interface hardware not present CM -- control-word mismatch -> -- only outbound connection is up CN -- circuit not provisioned <- -- only inbound connection is up OR -- out of range Up -- operational OL -- no outgoing label Dn -- down LD -- local site signaled down CF -- call admission control failure RD -- remote site signaled down SC -- local and remote site ID collision LN -- local site not designated LM -- local site ID not minimum designated RN -- remote site not designated RM -- remote site ID not minimum designated XX -- unknown connection status IL -- no incoming label MM -- MTU mismatch MI -- Mesh-Group ID not available BK -- Backup connection ST -- Standby connection PF -- Profile parse failure PB -- Profile busy RS -- remote site standby SN -- Static Neighbor LB -- Local site not best-site RB -- Remote site not best-site VM -- VLAN ID mismatch Legend for interface status Up -- operational Dn -- down Instance: h-vpls-PE3 BGP-VPLS State Local site: PE3-vpls (1) connection-site Type St Time last up # Up trans 2 rmt Up Oct 17 12:24:01 2012 1 Remote PE: 192.0.2.1, Negotiated control-word: No Incoming label: 800257, Outgoing label: 800000 Local interface: vt-2/0/10.135266304, Status: Up, Encapsulation: VPLS Description: Intf - vpls h-vpls-PE3 local site 1 remote site 2 LDP-VPLS State VPLS-id: 100 Mesh-group connections: h-vpls-PE3 Neighbor Type St Time last up # Up trans 192.0.2.4(vpls-id 100) rmt Up Oct 17 12:24:02 2012 1 Remote PE: 192.0.2.4, Negotiated control-word: No Incoming label: 800000, Outgoing label: 800000 Negotiated PW status TLV: No Local interface: vt-2/0/10.135266305, Status: Up, Encapsulation: ETHERNET Description: Intf - vpls h-vpls-PE3 neighbor 192.0.2.4 vpls-id 100
user@PE4> show vpls connections Layer-2 VPN connections: Legend for connection status (St) EI -- encapsulation invalid NC -- interface encapsulation not CCC/TCC/VPLS EM -- encapsulation mismatch WE -- interface and instance encaps not same VC-Dn -- Virtual circuit down NP -- interface hardware not present CM -- control-word mismatch -> -- only outbound connection is up CN -- circuit not provisioned <- -- only inbound connection is up OR -- out of range Up -- operational OL -- no outgoing label Dn -- down LD -- local site signaled down CF -- call admission control failure RD -- remote site signaled down SC -- local and remote site ID collision LN -- local site not designated LM -- local site ID not minimum designated RN -- remote site not designated RM -- remote site ID not minimum designated XX -- unknown connection status IL -- no incoming label MM -- MTU mismatch MI -- Mesh-Group ID not available BK -- Backup connection ST -- Standby connection PF -- Profile parse failure PB -- Profile busy RS -- remote site standby SN -- Static Neighbor LB -- Local site not best-site RB -- Remote site not best-site VM -- VLAN ID mismatch Legend for interface status Up -- operational Dn -- down Instance: ldp-vpls VPLS-id: 100 Neighbor Type St Time last up # Up trans 192.0.2.2(vpls-id 100) rmt OL 192.0.2.3(vpls-id 100) rmt Up Oct 16 17:12:20 2012 1 Remote PE: 192.0.2.3, Negotiated control-word: No Incoming label: 800000, Outgoing label: 800000 Negotiated PW status TLV: No Local interface: vt-2/0/10.17825792, Status: Up, Encapsulation: ETHERNET Description: Intf - vpls ldp-vpls neighbor 192.0.2.3 vpls-id 100
意义
在设备 PE1 上,与设备 PE3 的 BGP-VPLS 连接已开启。流量从 CE1 流到 PE1,从 PE3 流到 PE4,再到 CE4。
在设备 PE2 上,与设备 PE1 的 BGP-VPLS 连接处于 OL 状态。
在设备 PE3 上,所有 VPLS 连接均已开启。
在设备 PE4 上,与设备 PE2 的 VPLS 连接处于 OL 状态。设备 PE3 的 VPLS 连接已启动。
如果重新激活设备 PE2 上的接口,则连接将恢复为之前的状态和流量。
检查连接性
目的
验证设备 CE1 是否可以对设备 CE4 执行 ping 操作。
行动
user@CE1> ping 10.255.14.219 PING 10.255.14.219 (10.255.14.219): 56 data bytes 64 bytes from 10.255.14.219: icmp_seq=0 ttl=64 time=1.149 ms 64 bytes from 10.255.14.219: icmp_seq=1 ttl=64 time=0.779 ms ^C --- 10.255.14.219 ping statistics --- 2 packets transmitted, 2 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.779/0.964/1.149/0.185 ms
意义
输出显示 VPLS 可正常运行。
检查 BGP 2 层 VPN 路由表
目的
验证是否已从 BGP 中了解 VPLS 路由。
行动
user@PE1> show route table bgp.l2vpn.0 bgp.l2vpn.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 1:3:1:1/96 *[BGP/170] 20:00:11, localpref 100, from 192.0.2.3 AS path: I, validation-state: unverified > to 10.10.1.2 via fe-2/0/10.0 user@PE3> show route table bgp.l2vpn.0 bgp.l2vpn.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 1:1:2:1/96 *[BGP/170] 20:00:11, localpref 100, from 192.0.2.1 AS path: I, validation-state: unverified > to 10.10.1.1 via fe-2/0/10.0
检查第 2 层电路路由表
目的
验证是否从 LDP 中学习了 VPLS 路由。
行动
user@PE3> show route table l2circuit.0 l2circuit.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 192.0.2.4:NoCtrlWord:5:100:Local/96 *[VPLS/7] 01:30:11, metric2 1 > to 10.10.6.2 via fe-2/0/9.0 192.0.2.4:NoCtrlWord:5:100:Remote/96 *[LDP/9] 20:41:57 Discard user@PE4> show route table bgp.l2vpn.0 l2circuit.0: 3 destinations, 3 routes (2 active, 0 holddown, 1 hidden) + = Active Route, - = Last Active, * = Both 192.0.2.3:NoCtrlWord:5:100:Local/96 *[VPLS/7] 20:42:51, metric2 1 > to 10.10.6.1 via fe-2/0/9.0 192.0.2.3:NoCtrlWord:5:100:Remote/96 *[LDP/9] 20:41:57 Discard