示例:为 VPWS 配置 FEC 129 BGP 自动发现
了解 VPWS
虚拟专用有线服务 (VPWS) 第 2 层 VPN 通过 MPLS 采用第 2 层服务来构建点对点连接拓扑,在 VPN 中连接最终客户站点。这些第 2 层 VPN 为通过专用租用线路或第 2 层虚拟电路配置的专用网络提供了替代方案。使用这些第 2 层 VPN 调配的服务称为 VPWS。您可以在每个关联的边缘设备上为每个 VPWS 第 2 层 VPN 配置一个 VPWS instance 。
采用第 2 层电路的传统 VPN 需要为 IP 和 VPN 服务配置和维护单独的网络。相比之下, VPWS 允许在 IP 和第 2 层 VPN 服务之间共享提供商的核心网络基础设施,从而降低提供这些服务的成本。
Junos OS 支持两种类型的 VPWS 2 层 VPN:
-
Kompella 第 2 层 VPN,使用 BGP 进行自动发现和信令。
-
用于 VPWS 的 FEC 129 BGP 自动发现,使用 BGP 进行自动发现,使用 LDP 作为信令协议。
用于 VPWS 的 FEC 129 BGP 自动发现需要 l2vpn-id、 和 source-attachment-identifier语 target-attachment-identifier 句。Kompella 2 层 VPN 需要 site-identifier and remote-site-id 语句。
VPWS 可创建模拟第 2 层电路的伪线。虚拟专用 LAN 服务 (VPLS) 网络与 VPWS 类似,但提供点对多点流量转发,而 VPWS 第 2 层 VPN 的点对点流量转发则相反。如果您需要点对多点服务而非点对点服务,请考虑使用 VPLS 而非 VPWS。
VPWS 第 2 层 VPN 可以是全网状拓扑,也可以是中心辐射型拓扑。核心网络中的隧道机制通常是 MPLS。但是,VPWS 也可以使用其他隧道协议,例如 GRE。VPWS 类似于 MPLS 上的 Martini 第 2 层服务,均采用类似的封装方案转发流量。
图 1 展示了一个简单的 VPWS 第 2 层 VPN 拓扑的示例。
在此示例中,服务提供商向客户 A 和客户 B 提供 VPWS 服务。客户 A 希望在 Westford 和班加罗尔之间创建点对点链路的完整网格。客户 B 只需要 Westford 和 Sunnyvale 之间的单点对点链路。服务提供商在核心中使用 BGP 和 MPLS 信令,并在每个提供商边缘 (PE) 设备上创建一组单向伪线,以便分别交叉连接每个客户的第 2 层电路。
为了配置此服务,提供商配置了两个 VPWS 第 2 层 VPN,即第 2 层 VPN A 和第 2 层 VPN B。为每个 VPWS 第 2 层 VPN 配置电路交叉连接 (CCC) 封装类型(ethernet-ccc 或 vlan-ccc)。给定 VPWS 第 2 层 VPN 中的所有接口都必须配置 VPWS 第 2 层 VPN 的封装类型。
接口的本地和远程站点信息标识交叉连接。当连接的接口属于在同一 VPWS 实例和同一 PE 设备上配置的两个不同站点时,支持本地交叉连接。
BGP 通告 VPN 的可访问性。BGP 的配置与其他 VPN 服务(如第 3 层 VPN 和 VPLS)的配置类似。与其他 VPN 服务类似,将 MPLS 配置为为远程 PE 设备建立基本 LSP。
Junos OS 通过以下配置方法支持 VPWS:
-
伪线可使用转发同等等级 (FEC) 128 进行手动配置。
-
伪线由LDP使用FEC 129发出信号。这种安排减轻了与静态配置的第 2 层电路相关的配置负担,同时仍将 LDP 用作底层信令协议。
支持和不支持的功能
Junos OS 通过 VPWS 支持以下功能:
-
AS 内部 VPWS 功能,使用 BGP 进行自动发现,FEC 129 LDP 用于伪线信号。
-
平滑路由引擎切换。
-
作、管理和维护 (OAM) 机制,包括双向转发检测和 MPLS ping。
-
具有静态配置的 FEC 128 LDP 信令(在 Junos OS 中,此配置在
protocols l2circuit内部)。使用此选项时,不会有 BGP 自动发现。
Junos OS 不支持以下 VPWS 功能:
-
使用多宿主的 BGP 站点模型,将客户站点连接到多个 PE 设备。
-
将 FEC 129 VPWS 终止到 FEC 129 VPLS 实例的网格组中。
-
AS 内部 VPWS 功能,使用 BGP 进行自动发现,FEC 128 LDP 用于伪线信号。
-
FEC 129 VPWS,不带 BGP 自动发现。
-
使用 FEC 129 信令进行 VPWS 的静态配置。
-
不间断主动路由。
-
多段伪线。
-
FEC 128 和 FEC 129 VPWS 的互连。
-
静态配置的第 2 层电路式伪线冗余。
-
AS 间部署。
也可以看看
了解 VPWS 的 FEC 129 BGP 自动发现
使用 FEC 129 的 VPWS 中的主要功能组件是 BGP、LDP 和 Junos OS 的第 2 层 VPN 模块。BGP 负责将在每个 PE 设备上创建的本地自动发现路由分发到所有其他 PE 设备。LDP 负责使用 BGP 提供的自动发现信息来设置目标 LDP 会话,通过这些会话向伪线发出信号。第 2 层 VPN 是将 BGP 和 LDP 功能粘合在一起的粘合剂。
- FEC 129 中支持的标准 VPWS 的 BGP 自动发现
- FEC 129 中的路由和路由表交互 VPWS 的 BGP 自动发现
- 用于 VPWS 的 FEC 129 BGP 自动发现中的第 2 层 VPN 行为
- FEC 129 中的 BGP 自动发现行为 VPWS 的 BGP 自动发现
- FEC 129 中 VPWS 中的 LDP 信令行为 VPWS 的 BGP 自动发现
FEC 129 中支持的标准 VPWS 的 BGP 自动发现
此功能的相关 RFC 如下:
RFC 4447, 使用标签分发协议 (LDP) 的伪线设置和维护
RFC 6074, 第 2 层虚拟专用网络 (L2VPN) 中的调配、自动发现和信令
FEC 129 中的路由和路由表交互 VPWS 的 BGP 自动发现
BGP、LDP 和第 2 层 VPN 通过 .l2vpn.0 表中 instance安装的不同类型的路由进行交互。表中显示的路由是自动发现路由和伪线路由。
BGP 使用自动发现路由来允许自动发现远程源访问、单个标识符 (SAII)(点对点伪线的来源)和 PE 设备地址。配置地址族时
l2vpn auto-discovery-only,系统会播发自动发现路由。自动发现路由的格式是路由识别符和 SAII 的组合。例如:10.255.0.1:100:0.0.0.1/96 AD。
表 1 列出了路由元素以及分配给每个元素的关联字节数。
表 1:自动发现路由格式 路由元素
字节
研发
8 字节
SAII
4 字节
FEC 129 VPWS 实例的 附加
l2vpn-id到 BGP 扩展社区中的路由。为实例中的每个源附件标识符 (SAI) 播发一个自动发现路由。伪线路由由第 2 层 VPN(本地)和 LDP(远程)安装,以表示伪线的双向组件。例如:NoCtrlWord:5:100:200:2:0.0.0.1/176。 表 2 介绍了路由的格式。
字段名称 |
字段说明 |
|---|---|
伪线类型 + 控制字位 |
2 字节 |
远程 PE 地址 |
4 字节 |
附件组标识符 (AGI) 伪线路由的 AGI 字段始终设置为实例的 。 |
8 字节 |
SAII |
4 字节 |
目标附件个体标识符 (TAII) |
4 字节 |
用于 VPWS 的 FEC 129 BGP 自动发现中的第 2 层 VPN 行为
对于在 FEC 129 VPWS 实例中配置的每个 SAII,第 2 层 VPN 会将本地生成的自动发现路由安装到 instance.l2vpn.0 表中。当路由添加到 instance.l2vpn.0 表时,将附加包含 的 l2vpn-id 扩展社区。
对于来自远程邻接方的每个自动发现的 SAII,如果本地 l2vpn-id SAII 匹配 l2vpn-id ,接收的 SAII 与本地配置的 TAII 匹配,则第 2 层 VPN 将获取 MPLS 标签并生成伪线路由并将其添加到 instance.l2vpn.0 表中。从自动发现路由的 BGP 协议下一跃点复制远程 PE 地址。
Junos OS 的第 2 层 VPN 模块负责像往常一样将转发路由安装到 mpls.0 表中。
FEC 129 中的 BGP 自动发现行为 VPWS 的 BGP 自动发现
第 2 层 VPN 在 instance.l2vpn.0 表中安装的本地自动发现路由将根据实例和BGP导出策略由BGP播发至远程 PE 设备的l2vpn auto-discovery-only 地址家族。
在接收端,BGP 接受来自远程对等方的自动发现路由,并将其安装在本地 bgp.l2vpn.0 表中(如果入站策略允许)。路由已安装,当找到路由和实例之间的导入路由目标匹配时,辅助路由将导入 instance.l2vpn.0 表中。
FEC 129 中 VPWS 中的 LDP 信令行为 VPWS 的 BGP 自动发现
在 LDP 的 Junos OS 实施中,对于为 FEC 129 VPWS 配置的任何实例,路由器会监控来自 instance.l2vpn.0 的路由。这些路由通过路由实例中的语句和语句的l2vpn-id存在来instance-type l2vpn识别。
安装 BGP 自动发现路由后,LDP 会与远程对等方建立目标会话,其中对等方地址被标识为 BGP 自动发现路由的协议下一跃点。
在 instance.l2vpn.0 表中安装伪线路由时,LDP 使用与路由关联的参数,通过 FEC 129 发出创建伪线的信号。收到来自远程对等方的 FEC 129 标签映射消息后,LDP 会在 ldp.l2vpn.0 表中安装伪线路由。
与配置的 FEC 129 VPWS 实例成功匹配后 l2vpn-id ,辅助伪线路由将导入 instance.l2vpn.0 表。如果在收到传入伪线信令时尚未设置传出伪线,LDP 也会启动传出伪线创建。
也可以看看
示例:为 VPWS 配置 FEC 129 BGP 自动发现
此示例说明如何配置虚拟专用线服务 (VPWS),其中远程提供商边缘 (PE) 设备由 BGP 自动动态发现,伪线由 LDP 使用 FEC 129 发出信号。这种安排减轻了与静态配置的第 2 层电路相关的配置负担,同时仍将 LDP 用作底层信令协议。
要求
此示例要求 PE 设备上安装 Junos OS 13.2 或更高版本。
概述
由于 VPWS 是点对点服务,因此 FEC 129 VPWS 路由实例配置为 instance-type l2vpn。与 FEC 129 VPLS 一样,FEC 129 VPWS 使用该 l2vpn-id 语句来定义路由实例所属的第 2 层 VPN。该 l2vpn-id 语句的存在表示路由实例使用 FEC 129 LDP 信令。如果没有 l2vpn-id ,则表示改用 BGP 信令。
VPWS 的点对点性质要求您指定源访问单个标识符 (SAII) 和目标访问单个标识符 (TAII)。该 SAII-TAII 对定义了两个 PE 器件之间的独特伪线。
SAII 通过 FEC 129 VPWS 路由实例中的语句指定 source-attachment-identifier 。您可以配置源附件标识符以及要与该源附件标识符关联的接口。在每个接口下,您可以使用语句配置 target-attachment-identifier TAII。如果配置的目标标识符与远程 PE 设备通过 BGP 自动发现消息播发的源标识符匹配,则会发出该源-目标对之间的伪线信号。如果播发的源标识符与配置的目标标识符之间不匹配,则不会建立伪线。
示例:具有多个接口和站点的 VPWS 配置
routing-instances {
FEC129-VPWS {
instance-type l2vpn;
interface ge-0/0/1.0;
interface ge-0/0/2.0;
interface ge-0/0/3.0;
route-distinguisher 10.255.0.1:200;
l2vpn-id l2vpn-id:100:200;
vrf-target target:100:200;
protocols l2vpn {
site CUSTOMER-1 {
source-attachment-identifier 1;
interface ge-0/0/1.0 {
target-attachment-identifier 2;
}
interface ge-0/0/2.0 {
target-attachment-identifier 3;
}
}
}
}
}
您可以在站点内配置多个接口,因为每个 SAII-TAII 对都定义了一个唯一的伪线,如示例配置中的伪线 1-2 和 1-3 所示。源和目标访问标识符都是 4 字节数字,只能在存在 is l2vpn 和l2vpn-id配置语句的 instance-type FEC 129 VPWS 实例中配置。
您可以将源标识符和目标标识符指定为 1 到 4,292,967,295 范围内的纯无符号整数。
第 2 层电路和第 2 层 VPN 服务允许在每个伪线的基础上包含许多可选参数。FEC 129 VPWS 允许 MTU 设置、社区标记和包含控制字等参数,如以下示例配置所示:
示例:使用可选配置参数的 VPWS 配置
routing-instances {
FEC129-VPWS {
instance-type l2vpn;
interface ge-0/0/1.0;
interface ge-0/0/2.0;
interface ge-0/0/3.0;
route-distinguisher 10.255.0.1:200;
l2vpn-id l2vpn-id:100:200;
vrf-target target:100:200;
protocols l2vpn {
site CUSTOMER-1 {
source-attachment-identifier 1;
community COMM;
control-word ;
encapsulation-type ethernet;
ignore-encapsulation-mismatch;
ignore-mtu-mismatch;
mtu 1500;
no-control-word;
interface ge-0/0/1.0 {
target-attachment-identifier 2;
}
interface ge-0/0/2.0 {
target-attachment-identifier 3;
community COMM;
control-word;
encapsulation-type ethernet;
ignore-encapsulation-mismatch;
ignore-mtu-mismatch;
mtu 1500;
no-control-word;
}
}
}
}
}
在站点内配置时,定义的参数会影响源自该站点的任何伪线。在接口下配置时,定义的参数会影响该单个特定伪线。这样,您就可以在配置中的一个位置作与特定本地站点关联的所有伪线的参数。
与其他点对点服务一样,配置为 FEC 129 VPWS 实例成员的接口必须配置为 CCC 封装和 CCC 地址族,如下所示:
interfaces {
ge-0/0/1 {
encapsulation ethernet-ccc;
unit 0 {
family ccc;
}
}
ge-0/0/2 {
encapsulation ethernet-ccc;
unit 0 {
family ccc;
}
}
ge-0/0/3 {
encapsulation ethernet-ccc;
unit 0 {
family ccc;
}
}
}
您可以使用 vlan-ccc ethernet-ccc代替 .
为了支持基本的 FEC 129 VPWS 功能,还需要使用 BGP 地址族配置 PE 设备上的 BGP auto-discovery-only 会话,以允许交换自动发现路由。如果 PE 设备上还调配了传统 BGP VPLS 或第 2 层 VPN 服务,则还需要地址族 l2vpn signaling ,如下所示:
bgp {
group pe {
type internal;
local-address 10.255.0.1;
family l2vpn {
auto-discovery-only;
signaling;
}
neighbor 10.255.0.2;
neighbor 10.255.0.3;
}
}
以下配置示例显示了具有作、管理和维护 (OAM)(ping 和 BFD) 配置选项的 FEC 129 VPWS 路由实例:
示例:使用 OAM 的 VPWS 配置
routing-instances {
FEC129-VPWS {
instance-type l2vpn;
interface ge-0/0/1.0;
route-distinguisher 10.255.0.1:200;
l2vpn-id l2vpn-id:100:200;
vrf-target target:100:200;
protocols l2vpn {
oam {
ping-interval 600;
bfd-liveness-detection {
minimum-interval 200;
}
}
site CUSTOMER {
source-attachment-identifier 1;
oam {
ping-interval 600;
bfd-liveness-detection {
minimum-interval 200;
}
}
interface ge-0/0/1.0 {
oam {
ping-interval 600;
bfd-liveness-detection {
minimum-interval 200;
}
}
target-attachment-identifier 2;
}
}
}
}
}
下 protocols l2vpn 配置的 OAM 选项适用于路由实例中的所有站点和伪线。在特定站点下配置的 OAM 选项适用于在该站点下配置的伪线。在特定接口下配置的 OAM 选项适用于在该接口下配置的伪线。
配置
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,然后将命令复制并粘贴到层次结构级别的 [edit] CLI 中。
设备 CE1
set interfaces ge-2/0/8 unit 0 description CE1_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 192.0.2.5/24 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/6 unit 0 description CE2_to_PE2 set interfaces ge-2/1/6 unit 0 family inet address 172.16.0.4/24 set interfaces lo0 unit 0 family inet address 192.0.2.6/24 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
设备 PE1
set interfaces ge-2/0/5 encapsulation ethernet-ccc set interfaces ge-2/0/5 unit 0 description PE1_to_CE1 set interfaces ge-2/0/5 unit 0 family ccc set interfaces fe-2/0/10 unit 0 description to_PE2 set interfaces fe-2/0/10 unit 0 family inet address 10.0.0.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 bgp local-address 192.0.2.1 set protocols bgp group pe-pe type internal set protocols bgp group pe-pe family l2vpn auto-discovery-only set protocols bgp group pe-pe family l2vpn signaling set protocols bgp group pe-pe neighbor 192.0.2.2 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 ldp interface fe-2/0/10.0 set protocols ldp interface lo0.0 set routing-instances FEC129-VPWS instance-type l2vpn set routing-instances FEC129-VPWS interface ge-2/0/5.0 set routing-instances FEC129-VPWS route-distinguisher 192.0.2.1:100 set routing-instances FEC129-VPWS l2vpn-id l2vpn-id:100:100 set routing-instances FEC129-VPWS vrf-target target:100:100 set routing-instances FEC129-VPWS protocols l2vpn site ONE source-attachment-identifier 1 set routing-instances FEC129-VPWS protocols l2vpn site ONE interface ge-2/0/5.0 target-attachment-identifier 2 set routing-options autonomous-system 64510
设备 PE2
set interfaces ge-2/1/7 encapsulation ethernet-ccc set interfaces ge-2/1/7 unit 0 description PE2_to_CE2 set interfaces ge-2/1/7 unit 0 family ccc set interfaces fe-2/0/10 unit 0 description to_PE1 set interfaces fe-2/0/10 unit 0 family inet address 10.0.0.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 bgp local-address 192.0.2.2 set protocols bgp group pe-pe type internal set protocols bgp group pe-pe family l2vpn auto-discovery-only set protocols bgp group pe-pe family l2vpn signaling set protocols bgp group pe-pe neighbor 192.0.2.1 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface fe-2/0/10.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ldp interface fe-2/0/10.0 set protocols ldp interface lo0.0 set routing-instances FEC129-VPWS instance-type l2vpn set routing-instances FEC129-VPWS interface ge-2/1/7.0 set routing-instances FEC129-VPWS route-distinguisher 192.0.2.2:100 set routing-instances FEC129-VPWS l2vpn-id l2vpn-id:100:100 set routing-instances FEC129-VPWS vrf-target target:100:100 set routing-instances FEC129-VPWS protocols l2vpn site TWO source-attachment-identifier 2 set routing-instances FEC129-VPWS protocols l2vpn site TWO interface ge-2/1/7.0 target-attachment-identifier 1 set routing-options autonomous-system 64510
过程
分步程序
要配置 FEC 129 VPWS,请执行以下作:
-
配置接口。
[edit interfaces] user@PE1# set ge-2/0/5 encapsulation ethernet-ccc user@PE1# set ge-2/0/5 unit 0 description PE1_to_CE1 user@PE1# set ge-2/0/5 unit 0 family ccc user@PE1# set fe-2/0/10 unit 0 description to_PE2 user@PE1# set fe-2/0/10 unit 0 family inet address 10.0.0.1/30 user@PE1# set fe-2/0/10 unit 0 family mpls user@PE1# set lo0 unit 0 family inet address 192.0.2.1/24
-
在面向核心的接口上配置 MPLS。
[edit protocols mpls] user@PE1# set interface fe-2/0/10.0
-
配置 BGP。
[edit protocols bgp] user@PE1# set local-address 192.0.2.1 user@PE1# set group pe-pe type internal user@PE1# set group pe-pe family l2vpn auto-discovery-only user@PE1# set group pe-pe family l2vpn signaling user@PE1# set group pe-pe neighbor 192.0.2.2
-
配置内部网关协议,例如 IS-IS 或 OSPF。
如果使用 OSPF,请启用流量工程。默认情况下,IS-IS 支持流量工程。
[edit protocols ospf] user@PE1# set traffic-engineering user@PE1# set area 0.0.0.0 interface lo0.0 passive user@PE1# set area 0.0.0.0 interface fe-2/0/10.0
-
在面向核心的接口和环路接口上配置 LDP。
[edit protocols ldp] user@PE1# set interface fe-2/0/10.0 user@PE1# set interface lo0.0
-
配置 VPWS 路由实例。
LDP 侦听来自 instance.l2vpn.0 的路由,以获取为 FEC 129 VPWS 配置的任何实例。这些路由通过路由实例中的语句和语句的
l2vpn-id存在来instance-type l2vpn识别。确保与
target-attachment-identifier远程 PE 设备对应站点中的 匹配source-attachment-identifier。此示例将在设备 PE1 和设备 PE2 之间建立伪线。设备 PE1 使用 SAI 1 和 TAI 2,而设备 PE2 则使用相反的 SAI 2 和 TAI 1。[edit routing-instances FEC129-VPWS] user@PE1# set instance-type l2vpn user@PE1# set interface ge-2/0/5.0 user@PE1# set route-distinguisher 192.0.2.1:100 user@PE1# set l2vpn-id l2vpn-id:100:100 user@PE1# set vrf-target target:100:100 user@PE1# set protocols l2vpn site ONE source-attachment-identifier 1 user@PE1# set protocols l2vpn site ONE interface ge-2/0/5.0 target-attachment-identifier 2
-
配置自治系统 (AS) 编号。
[edit routing-options] user@PE1# set autonomous-system 64510
-
如果完成设备配置,请提交配置。
[edit] user@PE1# commit
结果
在配置模式下,输入 、 show protocols、 show routing-instances和show routing-options命令show interfaces以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明以更正配置。
user@PE1# show interfaces
ge-2/0/5 {
encapsulation ethernet-ccc;
unit 0 {
description PE1_to_CE1;
family ccc;
}
}
fe-2/0/10 {
unit 1 {
description to_PE2;
family inet {
address 10.0.0.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;
}
bgp {
local-address 192.0.2.1;
group pe-pe {
type internal;
family l2vpn {
auto-discovery-only;
inactive: signaling;
}
neighbor 192.0.2.2;
}
}
ospf {
traffic-engineering;
area 0.0.0.0 {
interface lo0.0 {
passive;
}
interface fe-2/0/10.0;
}
}
ldp {
interface fe-2/0/10.0;
interface lo0.0;
}
user@PE1# show routing-instances
FEC129-VPWS {
instance-type l2vpn;
interface ge-2/0/5.0;
route-distinguisher 192.0.2.1:100;
l2vpn-id l2vpn-id:100:100;
vrf-target target:100:100;
protocols {
l2vpn {
site ONE {
source-attachment-identifier 1;
interface ge-2/0/5.0 {
target-attachment-identifier 2;
}
}
}
}
}
user@PE1# show routing-options autonomous-system 64510;
验证
确认配置工作正常。
验证路由
目的
验证是否已学习预期路由。
行动
在作模式下,输入命令 show route 。
user@PE1> show route
inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.0.2.1/24 *[Direct/0] 6d 21:16:32
> via lo0.0
192.0.2.2/24 *[OSPF/10] 6d 21:15:31, metric 1
> to 10.0.0.2 via fe-2/0/10.0
10.0.0.0/30 *[Direct/0] 6d 21:16:31
> via fe-2/0/10.0
10.0.0.1/32 *[Local/0] 6d 21:16:32
Local via fe-2/0/10.0
203.0.113.0/24 *[OSPF/10] 6d 21:16:34, metric 1
MultiRecv
inet.3: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.0.2.2/24 *[LDP/9] 5d 22:25:19, metric 1
> to 10.0.0.2 via fe-2/0/10.0
mpls.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0 *[MPLS/0] 6d 21:16:33, metric 1
Receive
1 *[MPLS/0] 6d 21:16:33, metric 1
Receive
2 *[MPLS/0] 6d 21:16:33, metric 1
Receive
13 *[MPLS/0] 6d 21:16:33, metric 1
Receive
299808 *[LDP/9] 5d 22:25:19, metric 1
> to 10.0.0.2 via fe-2/0/10.0, Pop
299808(S=0) *[LDP/9] 5d 22:25:19, metric 1
> to 10.0.0.2 via fe-2/0/10.0, Pop
299824 *[L2VPN/7] 5d 22:25:18
> via ge-2/0/5.0, Pop
ge-2/0/5.0 *[L2VPN/7] 5d 22:13:02, metric2 1
> to 10.0.0.2 via fe-2/0/10.0, Push 299872
bgp.l2vpn.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.0.2.2:100:0.0.0.2/96 AD
*[BGP/170] 6d 20:51:23, localpref 100, from 192.0.2.2
AS path: I, validation-state: unverified
> to 10.0.0.2 via fe-2/0/10.0
ldp.l2vpn.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.0.2.2:NoCtrlWord:5:100:100:0.0.0.2:0.0.0.1/176
*[LDP/9] 5d 22:13:02
Discard
FEC129-VPWS.l2vpn.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.0.2.1:100:0.0.0.1/96 AD
*[L2VPN/170] 6d 20:53:26, metric2 1
Indirect
192.0.2.2:100:0.0.0.2/96 AD
*[BGP/170] 6d 20:51:23, localpref 100, from 192.0.2.2
AS path: I, validation-state: unverified
> to 10.0.0.2 via fe-2/0/10.0
192.0.2.2:NoCtrlWord:5:100:100:0.0.0.1:0.0.0.2/176
*[L2VPN/7] 6d 20:51:23, metric2 1
> to 10.0.0.2 via fe-2/0/10.0
192.0.2.2:NoCtrlWord:5:100:100:0.0.0.2:0.0.0.1/176
*[LDP/9] 5d 22:13:02
Discard
意义
输出显示所有学习的路由,包括自动发现 (AD) 路由。
检查客户边缘设备之间的连接
目的
验证设备 CE1 是否可以对设备 CE2 使用 Ping 命令。
行动
user@CE1> ping 192.0.2.6 PING 192.0.2.6 (192.0.2.6): 56 data bytes 64 bytes from 192.0.2.6: icmp_seq=0 ttl=64 time=0.679 ms 64 bytes from 192.0.2.6: icmp_seq=1 ttl=64 time=0.524 ms ^C --- 192.0.2.6 ping statistics --- 2 packets transmitted, 2 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.524/0.602/0.679/0.078 ms
意义
输出显示 VPWS 已正常运行。
检查 VPWS 连接
目的
确保所有 FEC 129 VPWS 连接都正确启动。
行动
user@PE1> show l2vpn 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: FEC129-VPWS
L2vpn-id: 100:100
Local source-attachment-id: 1 (ONE)
Target-attachment-id Type St Time last up # Up trans
2 rmt Up Nov 28 16:16:14 2012 1
Remote PE: 192.0.2.2, Negotiated control-word: No
Incoming label: 299792, Outgoing label: 299792
Local interface: ge-2/0/5.0, Status: Up, Encapsulation: ETHERNET
意义
正如预期一样,连接已开启。输出包括源附件 ID 和目标附件 ID。
检查 PE 设备之间的连接
目的
验证设备 PE1 是否可以对设备 PE2 使用 Ping 命令。该ping mpls l2vpn fec129命令接受 SAI 和 TAI 作为整数或 IP 地址,还允许您使用面向客户边缘的接口而不是其他参数 (instance, local-idremote-id)。 remote-pe-address
行动
user@PE1> ping mpls l2vpn fec129 instance FEC129-VPWS remote-id 2 remote-pe-address 192.0.2.2 local-id 1 !!!!! --- lsping statistics --- 5 packets transmitted, 5 packets received, 0% packet loss
user@PE1> ping mpls l2vpn fec129 interface ge-2/0/5.0 !!!!! --- lsping statistics --- 5 packets transmitted, 5 packets received, 0% packet loss
意义
输出显示 VPWS 已正常运行。
