将 3 层 VPN 连接到第 2 层 VPN
使用 3 层 VPN 互连第 2 层 VPN 概述
随着MPLS 2 层服务的需求不断增长,服务提供商必须能够与 2 层和 3 层服务进行互操作并为客户提供增值服务,也带来了新的挑战。Junos OS具有多种功能,可解决服务提供商的需求。其中一项功能是使用逻辑隧道接口。此功能Junos OS通道 PIC 来从路由器回环数据包数据包转发引擎将第 2 层网络与第 3 层网络相链路。解决方案受到通道 PIC 施加的逻辑通道带宽约束的限制。
将 2 层 VPN 与 3 层 VPN 应用互连
将第 2 层 VPN 与 3 层 VPN 互连可提供以下优势:
提供多个服务的单个接入线路 — 传统第 2 层电路上的 VPN 需要为 IP 和 VPN 服务调配和维护单独的网络。相比之下,第 2 层 VPN 则支持在 IP 服务和 2 层 VPN 服务之间共享提供商的核心网络基础架构,从而降低这些服务的提供成本。
灵活性 — 服务提供商可以支持许多不同类型的网络。如果 VPN 中所有站点都由同一企业所有,则属于内部网。如果不同站点由不同的企业所有,VPN 就是一个外网。一个站点可以位于多个 VPN 中。
各种可能的策略 — 您可为 VPN 中每个站点提供其他每个站点不同的路由,也可强制通过第三个站点路由的某些站点对之间的流量,以便让某些流量通过防火墙。
可扩展网络 - 此设计可增强可扩展性,因为它无需提供商边缘 (PE) 路由器来维护服务提供商的所有 VPN 路由。每个 PE 路由器都维护每个直接连接的站点的 VRF 表。每个客户连接(例如帧中继 PVC、ATM PVC 或 VLAN)映射到特定 VRF 表。因此,这是 PE 路由器上的端口,而不是与 VRF 表相关联的站点。PE 路由器上的多个端口可以与单个 VRF 表相关联。PE 路由器能够维护多个支持路由信息按 VPN 分隔的转转表。
路由反射器使用 — 提供商边缘路由器可维护 IBGP 会话以路由反射器,作为 IBGP 全网状会话的替代。部署多个路由反射器可增强 RFC 2547bis 模型的可扩展性,因为它无需任何单一网络组件来维护所有 VPN 路由。
多个 VPN 相互独立且不同 — 客户边缘路由器相互之间不对等。两个站点仅在通用主干上具有 IP 连接,并且仅在有包含两个站点 VPN 时。即使两个 VPN 的地址空间重叠,此功能也保持 VPN 彼此独立和独特。
客户使用简单 — 客户可以从服务提供商处获得 IP 骨干服务,而不需要维护自己的骨干网。
示例:将第 2 层 VPN 与 3 层 VPN 互连
此示例提供了使用第 3 层 VPN 互连和验证第 2 层 VPN 的逐步过程和命令。其中包含以下部分:
要求
此示例具有以下硬件和软件组件:
Junos OS 9.3 或更高版本
五个 MX 系列路由器
三M Series路由器
两T Series路由器
概述和拓扑
第 2 层 VPN 是一种虚拟专用网络 (VPN),它使用MPLS标签来传输数据。通信在提供商边缘 (PE) 路由器之间发生。
第 2 层 VPN BGP信号协议,因此设计更简单,比传统第 2 层电路的调配开销更低。BGP信号还支持自动发现 2 层 VPN 对等方。第 2 层 VPN 可以具有全网状拓扑或中心辐式拓扑。核心网络的通道机制通常MPLS。但是,第 2 层 VPN 也可使用其他隧道协议,如 GRE。
3 层 VPN 基于 RFC 2547bis、BGP /MPLS IP VPN。RFC 2547bis 定义了一种机制,服务提供商可以使用其 IP 骨干网为客户提供 VPN 服务。第 3 层 VPN 是一组共享通用路由信息的站点,其连接由一组策略控制。作为第 3 层 VPN 的站点通过提供商的现有公共互联网主干网进行连接。RFC 2547bis VPN 也称为 BGP/MPLS VPN,因为 BGP 用于跨提供商的主干分发 VPN 路由信息,而 MPLS 用于跨骨干网将 VPN 流量转发至远程 VPN 站点。
客户网络是私有网络,因此可使用公共地址或私有地址,如 RFC 1918"专用互联网的地址分配" 中定义。当使用专用地址的客户网络连接到公共 Internet 基础架构时,专用地址可能会与其他网络用户使用的相同专用地址重叠。MPLS/BGP VPN 通过添加路由识别器来 解决此问题。路由区分符是添加到特定 VPN 站点每个地址的 VPN 标识符前缀,从而创建 VPN 内部和 Internet 中唯一的地址。
此外,每个 VPN 都有其自己的 VPN 特定路由表,仅包含该 VPN 的路由信息。为了将 VPN 的路由与公共互联网中的路由或其他 VPN 中的路由分开,PE 路由器为每个 VPN 创建称为 VPN 路由和转发 (VRF) 表的单独路由表。PE 路由器为每个与客户边缘 (客户边缘) 路由器连接的 VPN 创建一个 VRF 表。属于 VPN 的任何客户或站点只能访问该 VPN 的 VRF 表中路由。每个 VRF 表都有一个或多个与之关联的扩展社区属性,用于将路由识别为属于特定路由器集合。其中一个路由 目标 属性标识 PE 路由器用于分配路由的站点(VRF 表)集合。PE 路由器使用路由目标约束将远程路由导入其 VRF 表中。
当入口 PE 路由器接收直接从直接客户边缘路由器播发的路由时,它根据该 VPN 的 VRF 导出策略检查收到的路由。
如果匹配,则路由转换为 VPN-IPv4 格式 — 即将路由识别器添加到路由中。然后,PE 路由器会向远程 PE 路由器公布 VPN-IPv4 格式的路由。它还将路由目标连接到从直接连接站点学习的每个路由。连接到路由的路由目标基于 VRF 表的已配置导出目标策略的值。然后,路由使用 IBGP 会话进行分配,这些会话在提供商的核心网络中配置。
如果 客户边缘 路由器中的路由不匹配,它不会导出到其他 PE 路由器,但仍可在本地使用路由,例如,如果相同 VPN 中的两个 客户边缘 路由器直接连接到同一 PE 路由器。
当出口 PE 路由器收到路由时,会根据 PE 路由器之间的 IBGP 会话上的导入策略检查路由。如果接受,路由器将路由放入其 bgp.l3vpn.0 表中。同时,路由器根据 VPN 的 VRF 导入策略检查路由。如果匹配,则从路由中移除路由识别器,且路由以 IPv4 格式置入 VRF routing-instance-name表(.inet.0 表)。
拓扑
图 1 显示了第 2 层 VPN 到第 3 层 VPN 互连的物理拓扑。

图 2 中显示了第 2 层 VPN 至第 3 层 VPN 互连的逻辑 拓扑。

客户边缘 (客户边缘) 设备 — 客户场所的设备,通过数据链路连接到一个或多个提供商边缘 (PE) 路由器,提供对服务提供商 VPN 的访问。
通常,客户边缘设备是一个 IP 路由器,用于建立与直接连接的 PE 路由器的邻接关系。建立邻接关系后,客户边缘路由器将站点的本地 VPN 路由播发至 PE 路由器,从 PE 路由器学习远程 VPN 路由。
提供商边缘 (PE) 设备—提供商网络边缘的一台设备或一组设备,用于显示提供商的客户站点视图。
PE 路由器与 客户边缘交换路由信息。PE 路由器会注意到通过 VPN 连接的 VPN,PE 路由器则维护 VPN 状态。PE 路由器只需为直接连接的 VPN 维护 VPN 的 VPN 路由。从路由器学习客户边缘 VPN 路由后,PE 路由器使用 IBGP 与其他 PE 路由器交换 VPN 路由信息。最后,使用 MPLS 通过提供商的主干转发 VPN 数据流量时,入口 PE 路由器将用作入口 标签交换路由器 (标签交换路由器),出口 PE 路由器将用作出口标签交换路由器。
提供商 (P) 设备 — 在提供商核心网络内部操作的设备,不直接连接到任何客户边缘。
虽然 P 设备是服务提供商客户实施 VPN 的关键部分,可为许多提供商运营的隧道(属于不同 VPN)提供路由,但它本身无法感知 VPN,不维护 VPN 状态。其主要角色是允许服务提供商扩展其 VPN 产品,例如,充当多个 PE 路由器的聚合点。
P 路由器在 PE MPLS之间转发 VPN 数据流量时,用作传输 LSR。P 路由器只需维护到提供商 PE 路由器的路由;不需要为每个客户站点维护特定的 VPN 路由信息。
配置
要第 2 层 VPN 与 3 层 VPN 互连,请执行以下任务:
配置基本协议和接口
逐步过程
在每个 PE 和 P 路由器上,OSPF所有接口上的信息流工程扩展来配置路由。禁用OSPF fxp0.0 接口上的配置。
[edit protocols] ospf { traffic-engineering; area 0.0.0.0 { interface all; interface fxp0.0 { disable; } } }
在所有核心路由器上,在所有MPLS均启用配置。禁用MPLS fxp0.0 接口上的配置。
[edit protocols] mpls { interface all; interface fxp0.0 { disable; } }
在所有核心路由器上,创建BGP 对等体组,将路由反射器地址 (192.0.2.7) 指定为邻接方。此外,BGP层次结构级别包含 语句,允许管理员为此对等组承载第 2 层 VPLS 网络层可达性信息 (NLRI)
signaling
[edit protocols bgp group group-name family l2vpn]
消息。[edit protocols] bgp { group RR { type internal; local-address 192.0.2.2; family l2vpn { signaling; } neighbor 192.0.2.7; } }
在路由器 PE3 上,创建BGP 对等体组,将路由反射器 IP 地址 (192.0.2.7) 指定为邻接方。允许BGP此对等组承载第 2 层 VPLS NLRI 消息,并且支持在 层次结构级别包含 语句,以处理 VPN-IPv4
unicast
[edit protocols bgp group group-name family inet-vpn]
地址。[edit protocols] bgp { group RR { type internal; local-address 192.0.2.3; family inet-vpn { unicast; } family l2vpn { signaling; } neighbor 192.0.2.7; } }
对于路由器 PE3 和路由器 PE5 上的第 3 层 VPN 域,在所有接口上启用 RSVP。禁用 fxp0.0 接口上的 RSVP。
[edit protocols] rsvp { interface all; interface fxp0.0 { disable; } }
在路由器 PE3 和路由器 PE5 上,创建到路由反射器和其他 PE 路由器的标签交换路径 (LSP)。以下示例显示路由器 PE5 上的配置。
[edit protocols] mpls { label-switched-path to-RR { to 192.0.2.7; } label-switched-path to-PE2 { to 192.0.2.2; } label-switched-path to-PE3 { to 192.0.2.3; } label-switched-path to-PE4 { to 192.0.2.4; } label-switched-path to-PE1 { to 192.0.2.1; } }
在路由器 PE1、PE2、PE3 和 PE5 上,使用 IPv4 地址配置核心接口并启用MPLS地址族。以下示例显示路由器 PE2 上的 xe-0/1/0 接口配置。
[edit] interfaces { xe-0/1/0 { unit 0 { family inet { address 10.10.2.2/30; } family mpls; } } }
在路由器 PE2 和路由器 PE3 上,为所有接口的 L2 VPN MPLS信号协议配置 LDP。禁用 fxp0.0 接口上的 LDP。(也可使用 RSVP。)
[edit protocols] ldp { interface all; interface fxp0.0 { disable; } }
在路由反射器上,创建BGP 对等体组,将 PE 路由器 IP 地址指定为邻设备。
[edit] protocols { bgp { group RR { type internal; local-address 192.0.2.7; family inet { unicast; } family inet-vpn { unicast; } family l2vpn { signaling; } cluster 192.0.2.7; neighbor 192.0.2.1; neighbor 192.0.2.2; neighbor 192.0.2.4; neighbor 192.0.2.5; neighbor 192.0.2.3; } } }
在路由反射器上,配置MPLS路由器 PE3 和 PE5 的 LSP,以从 inet.3 路由表BGP下一跃点。
[edit] protocols { mpls { label-switched-path to-pe3 { to 192.0.2.3; } label-switched-path to-pe5 { to 192.0.2.5; } interface all; } }
配置 VPN 接口
逐步过程
路由器 PE2 是 2 层 VPN 的一端。路由器 PE3 正在第 2 层 VPN 和第 3 层 VPN 之间执行第 2 层 VPN 拼接。路由器 PE3 使用使用两个不同的第 2 层 VPN 实例下应用的不同逻辑接口单元配置的逻辑隧道接口 (lt 接口)。数据包通过路由器 PE3 上配置的 lt 接口循环。路由器 PE5 的配置包含 PE-客户边缘接口。
在路由器 PE2 上,配置 ge-1/0/2 接口封装。包括封装语句,在 层次结构
ethernet-ccc
级别指定 选项vlan-ccc
( 支持[edit interfaces ge-1/0/2]
封装)。整个第 2 层 VPN 域(路由器 PE2 和 PE3)中的封装应相同。此外,配置接口 lo0。[edit] interfaces { ge-1/0/2 { encapsulation ethernet-ccc; unit 0; } lo0 { unit 0 { family inet { address 192.0.2.2/24; } } } }
在路由器 PE2 上,将路由实例配置为 [
edit routing-instances]
层次结构级别。此外,还可在 [ 层次结构级别配置第edit routing-instances routing-instances-name protocols]
2 层 VPN 协议。将远程站点 ID 配置为 3。站点 ID 3 表示路由器 PE3 (中心-PE)。第 2 层 VPN 使用 LDP 作为信号协议。请注意,在下面的示例中,路由实例和协议均命名为l2vpn
。[edit] routing-instances {
l2vpn
{ # routing instance instance-type l2vpn; interface ge-1/0/2.0; route-distinguisher 65000:2; vrf-target target:65000:2; protocols {l2vpn
{ # protocol encapsulation-type ethernet; site CE2 { site-identifier 2; interface ge-1/0/2.0 { remote-site-id 3; } } } } } }在路由器 PE5 上,为 PE-客户边缘
ge-2/0/0
配置千兆位以太网接口并配置lo0
接口。[edit interfaces] ge-2/0/0 { unit 0 { family inet { address 198.51.100.8/24; } } } lo0 { unit 0 { } }
在路由器 PE5 上,在 层次结构级别配置第 3 层 VPN 路由
[edit routing-instances]
实例 (L3VPN
)。还要在BGP级别配置[edit routing-instances L3VPN protocols]
。[edit] routing-instances { L3VPN { instance-type vrf; interface ge-2/0/0.0; route-distinguisher 65000:5; vrf-target target:65000:2; vrf-table-label; protocols { bgp { group ce5 { neighbor 198.51.100.2 { peer-as 200; } } } } } }
在 MX 系列路由器(如路由器 PE3)中,您必须创建用于通道服务的通道服务接口。要创建通道服务接口
bandwidth
[edit chassis fpc slot-number pic slot-number tunnel-services]
,请包含 该语句并指定在层次结构级别中为隧道服务保留的带宽量(以千兆位/秒)。[edit] chassis { dump-on-panic; fpc 1 { pic 1 { tunnel-services { bandwidth 1g; } } } }
在路由器 PE3 上,配置千兆以太网接口。
在 层次结构
address
级别中包括[edit interfaces ge-1/0/1.0 family inet]
语句,并指定为198.51.100.9/24
IP 地址。[edit] interfaces { ge-1/0/1 { unit 0 { family inet { address 198.51.100.9/24; } } } }
在路由器 PE3 上,在
lt-1/1/10.0
层次结构级别配置逻辑[edit interfaces lt-1/1/10 unit 0]
隧道接口。路由器 PE3 是使用逻辑隧道接口 将 第 2 层 VPN 拼接到第 3 层 VPN 的路由器。对等方单元接口的配置就是实现互连。要配置接口,请包含 语句
encapsulation
并指定ethernet-ccc
选项。包括 语句peer-unit
,将逻辑接口单元指定为1
对等通道接口。包括 语句family
并指定ccc
选项。[edit] interfaces { lt-1/1/10 { unit 0 { encapsulation ethernet-ccc; peer-unit 1; family ccc; } } }
在路由器 PE3 上,在
lt-1/1/10.1
层次结构级别配置逻辑[edit interfaces lt-1/1/10 unit 1]
隧道接口。要配置接口,请包含 语句
encapsulation
并指定ethernet
选项。包括 语句peer-unit
,将逻辑接口单元指定为0
对等通道接口。包括 语句family
并指定inet
选项。在 层次结构address
级别中包括[edit interfaces lt-1/1/10 unit 0]
语句,并指定为198.51.100.7/24
IPv4 地址。[edit] interfaces { lt-1/1/10 { unit 1 { encapsulation ethernet; peer-unit 0; family inet { address 198.51.100.7/24; } } } }
在路由器 PE3 上,将
lt
接口单元 1 添加到层级的路由[edit routing-instances L3VPN]
实例中。将实例类型vrf
与对等lt
方单元 1 配置为 PE-客户边缘 接口,以将路由器 PE2 上的 2 层 VPN 端入路由器 PE3 上的第 3 层 VPN。[edit] routing-instances { L3VPN { instance-type vrf; interface ge-1/0/1.0; interface lt-1/1/10.1; route-distinguisher 65000:33; vrf-target target:65000:2; vrf-table-label; protocols { bgp { export direct; group ce3 { neighbor 198.51.100.10 { peer-as 100; } } } } } }
在路由器 PE3 上,将
lt
接口单元 0 添加到层次结构级别的路由[edit routing-instances protocols l2vpn]
实例。还要为第 2 层 VPN 和 3 层 VPN 路由实例配置相同的 vrf 目标,使路由可在实例之间泄露。上一步中的配置示例显示路由实例的L3VPN
vrf 目标。以下示例显示路由实例的 vrfl2vpn
目标。[edit] routing-instances { l2vpn { instance-type l2vpn; interface lt-1/1/10.0; route-distinguisher 65000:3; vrf-target target:65000:2; protocols { l2vpn { encapsulation-type ethernet; site CE3 { site-identifier 3; interface lt-1/1/10.0 { remote-site-id 2; } } } } } }
在路由器 PE3
policy-statement
上,配置 语句,以将lt
从直接连接的接口单元 1 学到的路由导出到所有 客户边缘 路由器,以根据需要实现连接。[edit] policy-options { policy-statement direct { term 1 { from protocol direct; then accept; } } }
结果
以下输出显示路由器 PE2 的完整配置:
路由器 PE2
interfaces { xe-0/1/0 { unit 0 { family inet { address 10.10.2.2/30; } family mpls; } } xe-0/2/0 { unit 0 { family inet { address 10.10.5.1/30; } family mpls; } } xe-0/3/0 { unit 0 { family inet { address 10.10.4.1/30; } family mpls; } } ge-1/0/2 { encapsulation ethernet-ccc; unit 0; } fxp0 { apply-groups [ re0 re1 ]; } lo0 { unit 0 { family inet { address 192.0.2.2/24; } } } } routing-options { static { route 172.0.0.0/8 next-hop 172.19.59.1; } autonomous-system 65000; } protocols { mpls { interface all; interface fxp0.0 { disable; } } bgp { group RR { type internal; local-address 192.0.2.2; family l2vpn { signaling; } neighbor 192.0.2.7; } } ospf { traffic-engineering; area 0.0.0.0 { interface all; interface fxp0.0 { disable; } } } ldp { interface all; interface fxp0.0 { disable; } } } routing-instances { l2vpn { instance-type l2vpn; interface ge-1/0/2.0; route-distinguisher 65000:2; vrf-target target:65000:2; protocols { l2vpn { encapsulation-type ethernet; site CE2 { site-identifier 2; interface ge-1/0/2.0 { remote-site-id 3; } } } } } }
以下输出显示路由器 PE5 的最终配置:
路由器 PE5
interfaces { ge-0/0/0 { unit 0 { family inet { address 10.10.4.2/30; } family mpls; } } xe-0/1/0 { unit 0 { family inet { address 10.10.6.2/30; } family mpls; } } ge-1/0/0 { unit 0 { family inet { address 10.10.9.1/30; } family mpls; } } xe-1/1/0 { unit 0 { family inet { address 10.10.3.2/30; } family mpls; } } ge-2/0/0 { unit 0 { family inet { address 198.51.100.8/24; } } } lo0 { unit 0 { family inet { address 192.0.2.5/24; } } } } routing-options { static { route 172.0.0.0/8 next-hop 172.19.59.1; } autonomous-system 65000; } protocols { rsvp { interface all { link-protection; } interface fxp0.0 { disable; } } mpls { label-switched-path to-RR { to 192.0.2.7; } label-switched-path to-PE2 { to 192.0.2.2; } label-switched-path to-PE3 { to 192.0.2.3; } label-switched-path to-PE4 { to 192.0.2.4; } label-switched-path to-PE1 { to 192.0.2.1; } interface all; interface fxp0.0 { disable; } } bgp { group to-rr { type internal; local-address 192.0.2.5; family inet-vpn { unicast; } family l2vpn { signaling; } neighbor 192.0.2.7; } } ospf { traffic-engineering; area 0.0.0.0 { interface all; interface fxp0.0 { disable; } } } ldp { interface all; interface fxp0.0 { disable; } } } routing-instances { L3VPN { instance-type vrf; interface ge-2/0/0.0; route-distinguisher 65000:5; vrf-target target:65000:2; vrf-table-label; protocols { bgp { group ce5 { neighbor 198.51.100.2 { peer-as 200; } } } } } }
以下输出显示路由器 PE3 的最终配置:
路由器 PE3
chassis { dump-on-panic; fpc 1 { pic 1 { tunnel-services { bandwidth 1g; } } } network-services ip; } interfaces { ge-1/0/1 { unit 0 { family inet { address 198.51.100.9/24; } } } lt-1/1/10 { unit 0 { encapsulation ethernet-ccc; peer-unit 1; family ccc; } unit 1 { encapsulation ethernet; peer-unit 0; family inet { address 198.51.100.7/24; } } } xe-2/0/0 { unit 0 { family inet { address 10.10.20.2/30; } family mpls; } } xe-2/1/0 { unit 0 { family inet { address 10.10.6.1/30; } family mpls; } } xe-2/2/0 { unit 0 { family inet { address 10.10.5.2/30; } family mpls; } } xe-2/3/0 { unit 0 { family inet { address 10.10.1.2/30; } family mpls; } } lo0 { unit 0 { family inet { address 192.0.2.3/24; } } } } routing-options { static { route 172.0.0.0/8 next-hop 172.19.59.1; } autonomous-system 65000; } protocols { rsvp { interface all; interface fxp0.0 { disable; } } mpls { label-switched-path to-RR { to 192.0.2.7; } label-switched-path to-PE2 { to 192.0.2.2; } label-switched-path to-PE5 { to 192.0.2.5; } label-switched-path to-PE4 { to 192.0.2.4; } label-switched-path to-PE1 { to 192.0.2.1; } interface all; interface fxp0.0 { disable; } } bgp { group RR { type internal; local-address 192.0.2.3; family inet-vpn { unicast; } family l2vpn { signaling; } neighbor 192.0.2.7; } } ospf { traffic-engineering; area 0.0.0.0 { interface all; interface fxp0.0 { disable; } } } ldp { interface all; interface fxp0.0 { disable; } } } policy-options { policy-statement direct { term 1 { from protocol direct; then accept; } } } routing-instances { L3VPN { instance-type vrf; interface ge-1/0/1.0; interface lt-1/1/10.1; route-distinguisher 65000:33; vrf-target target:65000:2; vrf-table-label; protocols { bgp { export direct; group ce3 { neighbor 198.51.100.10 { peer-as 100; } } } } } l2vpn { instance-type l2vpn; interface lt-1/1/10.0; route-distinguisher 65000:3; vrf-target target:65000:2; protocols { l2vpn { encapsulation-type ethernet; site CE3 { site-identifier 3; interface lt-1/1/10.0 { remote-site-id 2; } } } } } }
验证
验证 2 层 VPN 到第 3 层 VPN 的互连:
验证路由器 PE2 VPN 接口
目的
检查第 2 层 VPN 是否已启动且在路由器 PE2 接口上工作,以及所有路由都在那里。
行动
show l2vpn connections
使用 命令验证连接站点 ID 对于路由器 PE3 为 3,以及状态为Up
。user@PE2> 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 Legend for interface status Up -- operational Dn -- down Instance: l2vpn Local site: CE2 (2) connection-site Type St Time last up # Up trans 3 rmt Up Jan 7 14:14:37 2010 1 Remote PE: 192.0.2.3, Negotiated control-word: Yes (Null) Incoming label: 800000, Outgoing label: 800001 Local interface: ge-1/0/2.0, Status: Up, Encapsulation: ETHERNET
show route table
使用 命令验证第 2 层 VPN 路由是否存在,以及接口是否有下一10.10.5.2
跃xe-0/2/0.0
点。以下输出验证 l2vpn.l2vpn.0 表中是否包含第 2 层 VPN 路由。应该为路由器 PE3 显示类似输出。user@PE2> show route table l2vpn.l2vpn.0 l2vpn.l2vpn.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 65000:2:2:3/96 *[L2VPN/170/-101] 02:40:35, metric2 1 Indirect 65000:3:3:1/96 *[BGP/170] 02:40:35, localpref 100, from 192.0.2.7 AS path: I > to 10.10.5.2 via xe-0/2/0.0
验证路由器 PE2 是否具有两个方向(PUSH 和 MPLS 都指向路由器 PE3 的 LDP 标签 2 层 VPN 接入点。
user@PE2> show route table mpls.0 mpls.0: 13 destinations, 13 routes (13 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 0 *[MPLS/0] 1w3d 08:57:41, metric 1 Receive 1 *[MPLS/0] 1w3d 08:57:41, metric 1 Receive 2 *[MPLS/0] 1w3d 08:57:41, metric 1 Receive 300560 *[LDP/9] 19:45:53, metric 1 > to 10.10.2.1 via xe-0/1/0.0, Pop 300560(S=0) *[LDP/9] 19:45:53, metric 1 > to 10.10.2.1 via xe-0/1/0.0, Pop 301008 *[LDP/9] 19:45:53, metric 1 > to 10.10.4.2 via xe-0/3/0.0, Swap 299856 301536 *[LDP/9] 19:45:53, metric 1 > to 10.10.4.2 via xe-0/3/0.0, Pop 301536(S=0) *[LDP/9] 19:45:53, metric 1 > to 10.10.4.2 via xe-0/3/0.0, Pop 301712 *[LDP/9] 16:14:52, metric 1 > to 10.10.5.2 via xe-0/2/0.0, Swap 315184 301728 *[LDP/9] 16:14:52, metric 1 > to 10.10.5.2 via xe-0/2/0.0, Pop 301728(S=0) *[LDP/9] 16:14:52, metric 1 > to 10.10.5.2 via xe-0/2/0.0, Pop 800000 *[L2VPN/7] 02:40:35 > via ge-1/0/2.0, Pop Offset: 4 ge-1/0/2.0 *[L2VPN/7] 02:40:35, metric2 1 > to 10.10.5.2 via xe-0/2/0.0, Push 800001 Offset: -4
意义
路由 l2vpn
实例在接口上已启动 ge-1/0/2
,第 2 层 VPN 路由显示在表 l2vpn.l2vpn.0 中。表 mpls.0
显示了第 2 层 VPN 路由,用于使用 LDP 标签转发信息流。
验证路由器 PE3 VPN 接口
目的
检查路由器 PE2 和路由器 PE3 之间的第 2 层 VPN 连接是否工作正常 Up
。
行动
验证与BGP及家族的路由反射
l2vpn-signaling
inet-vpn
器之间的已建立会话。user@PE3> show bgp summary Groups: 2 Peers: 2 Down peers: 0 Table Tot Paths Act Paths Suppressed History Damp State Pending bgp.l2vpn.0 1 1 0 0 0 0 bgp.L3VPN.0 1 1 0 0 0 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active /Received/Accepted/Damped... 192.0.2.7 65000 2063 2084 0 1 15:35:16 Establ bgp.l2vpn.0: 1/1/1/0 bgp.L3VPN.0: 1/1/1/0 L3VPN.inet.0: 1/1/1/0 l2vpn.l2vpn.0: 1/1/1/0
以下输出用于验证第 2 层 VPN 路由及关联的标签。
user@PE3> show route table l2vpn.l2vpn.0 detail l2vpn.l2vpn.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden) 65000:2:2:3/96 (1 entry, 1 announced) *BGP Preference: 170/-101 Route Distinguisher: 65000:2 Next hop type: Indirect Next-hop reference count: 4 Source: 192.0.2.7 Protocol next hop: 192.0.2.2 Indirect next hop: 2 no-forward State: <Secondary Active Int Ext> Local AS: 65000 Peer AS: 65000 Age: 2:45:52 Metric2: 1 Task: BGP_65000.192.0.2.7+60585 Announcement bits (1): 0-l2vpn-l2vpn AS path: I (Originator) Cluster list: 192.0.2.7 AS path: Originator ID: 192.0.2.2 Communities: target:65000:2 Layer2-info: encaps:ETHERNET, control flags:Control-Word, mtu: 0, site preference: 100 Accepted Label-base: 800000, range: 2, status-vector: 0x0 Localpref: 100 Router ID: 192.0.2.7 Primary Routing Table bgp.l2vpn.0
以下输出显示 mpls.0 路由表中的 L2VPN MPLS.0 路由。
user@PE3> show route table mpls.0 mpls.0: 21 destinations, 21 routes (21 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 0 *[MPLS/0] 1w3d 09:05:41, metric 1 Receive 1 *[MPLS/0] 1w3d 09:05:41, metric 1 Receive 2 *[MPLS/0] 1w3d 09:05:41, metric 1 Receive 16 *[VPN/0] 15:59:24 to table L3VPN.inet.0, Pop 315184 *[LDP/9] 16:21:53, metric 1 > to 10.10.20.1 via xe-2/0/0.0, Pop 315184(S=0) *[LDP/9] 16:21:53, metric 1 > to 10.10.20.1 via xe-2/0/0.0, Pop 315200 *[LDP/9] 01:13:44, metric 1 to 10.10.20.1 via xe-2/0/0.0, Swap 625297 > to 10.10.6.2 via xe-2/1/0.0, Swap 299856 315216 *[LDP/9] 16:21:53, metric 1 > to 10.10.6.2 via xe-2/1/0.0, Pop 315216(S=0) *[LDP/9] 16:21:53, metric 1 > to 10.10.6.2 via xe-2/1/0.0, Pop 315232 *[LDP/9] 16:21:45, metric 1 > to 10.10.1.1 via xe-2/3/0.0, Pop 315232(S=0) *[LDP/9] 16:21:45, metric 1 > to 10.10.1.1 via xe-2/3/0.0, Pop 315248 *[LDP/9] 16:21:53, metric 1 > to 10.10.5.1 via xe-2/2/0.0, Pop 315248(S=0) *[LDP/9] 16:21:53, metric 1 > to 10.10.5.1 via xe-2/2/0.0, Pop 315312 *[RSVP/7] 15:02:40, metric 1 > to 10.10.6.2 via xe-2/1/0.0, label-switched-path to-pe5 315312(S=0) *[RSVP/7] 15:02:40, metric 1 > to 10.10.6.2 via xe-2/1/0.0, label-switched-path to-pe5 315328 *[RSVP/7] 15:02:40, metric 1 > to 10.10.20.1 via xe-2/0/0.0, label-switched-path to-RR 315360 *[RSVP/7] 15:02:40, metric 1 > to 10.10.20.1 via xe-2/0/0.0, label-switched-path to-RR 316272 *[RSVP/7] 01:13:27, metric 1 > to 10.10.6.2 via xe-2/1/0.0, label-switched-path Bypass->10.10.9.1 316272(S=0) *[RSVP/7] 01:13:27, metric 1 > to 10.10.6.2 via xe-2/1/0.0, label-switched-path Bypass->10.10.9.1 800001 *[L2VPN/7] 02:47:33 > via lt-1/1/10.0, Pop Offset: 4 lt-1/1/10.0 *[L2VPN/7] 02:47:33, metric2 1 > to 10.10.5.1 via xe-2/2/0.0, Push 800000 Offset: -4
show route table mpls.0
使用 命令和 选项detail
查看BGP属性,例如下一跃点类型和标签操作。user@PE5> show route table mpls.0 detail lt-1/1/10.0 (1 entry, 1 announced) *L2VPN Preference: 7 Next hop type: Indirect Next-hop reference count: 2 Next hop type: Router, Next hop index: 607 Next hop: 10.10.5.1 via xe-2/2/0.0, selected Label operation: Push 800000 Offset: -4 Protocol next hop: 192.0.2.2 Push 800000 Offset: -4 Indirect next hop: 8cae0a0 1048574 State: <Active Int> Age: 2:46:34 Metric2: 1 Task: Common L2 VC Announcement bits (2): 0-KRT 2-Common L2 VC AS path: I Communities: target:65000:2 Layer2-info: encaps:ETHERNET, control flags:Control-Word, mtu: 0, site preference: 100
验证从路由器 CE2 到路由器 CE5 和路由器 CE3 的端到端连接
目的
检查路由器 CE2、CE3 和 CE5 之间的连接。
行动
对路由器 CE2 中的路由器 CE3 IP 地址执行 Ping。
user@CE2> ping 198.51.100.10 # CE3 IP address PING 198.51.100.10 (198.51.100.10): 56 data bytes 64 bytes from 198.51.100.10: icmp_seq=0 ttl=63 time=0.708 ms 64 bytes from 198.51.100.10: icmp_seq=1 ttl=63 time=0.610 ms
对路由器 CE2 中的路由器 CE5 IP 地址执行 Ping。
user@CE2> ping 198.51.100.2 # CE5 IP address PING 198.51.100.2 (198.51.100.2): 56 data bytes 64 bytes from 198.51.100.2: icmp_seq=0 ttl=62 time=0.995 ms 64 bytes from 198.51.100.2: icmp_seq=1 ttl=62 time=1.005 ms