提高第 3 层 VPN 性能
本主题介绍链式复合下一跃点 (CNH),并提供如何在背靠背 PE 路由器上启用链式 CNH 的示例。
用于 VPN 和第 2 层电路的链式复合下一跳
瞻博网络 PTX 系列数据包传输路由器、带 MIC 和 MPC 接口的 MX 系列 5G 通用路由平台以及 T4000 核心路由器主要设计用于处理大型网络核心中的大量流量。链式 CNH 允许路由器处理更大量的路由,从而有助于提升此功能。链式 CNH 允许路由器将共享同一目的地的路由集定向到公共转发下一跳,而不是让每个路由也包含该目标。如果网络目标发生更改,则不必使用新信息更新共享该目标的所有路由,只需使用新信息更新共享的转发下一跃点。链式 CNH 继续指向此转发下一跃点,该跃点现在包含新目标。
在路由器上为 MPLS LSP 创建下一跃点时,与最里面的 MPLS 标签对应的标记信息将被提取到链式 CNH 中。链接的 CNH 存储在入口数据包转发引擎中。链式 CNH 指向位于出口数据包转发引擎上的下一跃点,称为转发下一跃点。转发下一跃点包含所有其他信息(除最里面的标签以及与实际下一跃点节点对应的 IFA/IP 信息外的所有标签)。许多链接的复合下一跃点可以共享相同的转发下一跃点。此外,将最内层标签(即 VPN 标签)与转发下一跃点分离,并将其存储在入口 PFE(在链式复合下一跃点内)上,有助于通过减少存储在出口数据包转发引擎上的重写字符串数来节省出口数据包转发引擎内存。
表 1 显示了对 MPLS 网络上入口或中转路由器的链式 CNH 的支持。
平台 |
L2 VPN |
L3 VPN |
L2 CKT(英语:L2 CKT) |
---|---|---|---|
PTX 系列 |
入口和中转 |
入口和中转 |
仅入口 |
MX 系列 |
仅入口 |
仅入口 |
仅入口 |
要在 T4000 路由器上启用链式 CNH,必须将机箱配置为在网络服务模式下使用选项 enhanced-mode
。
链式复合下一跳的优势
链式 CNH 通过减小转转发表的大小来优化路由器的内存和性能。当下一跃点相同时,路由器可以对具有不同目的地的路转发表中的相同下一跃点条目。这将减少转发表中的条目数,并减少必须修改下一跃点条目时的更改数。
接受第 3 层 VPN 中具有唯一内部 VPN 标签的路由更新
对于在瞻博网络路由器上配置的第 3 层 VPN,Junos OS 通常会为提供商边缘 (PE) 路由器的每个面向客户边缘 (CE) 的虚拟路由和转发 (VRF) 接口分配一个内部 VPN 标签。但是,其他供应商会为通过 PE 路由器面向 CE 的接口获知的每条路由分配一个 VPN 标签。这种做法会成倍增加 VPN 标签的数量,从而导致系统处理速度变慢和收敛时间变慢。
链式 CNH 是一种组合函数,它将与单个下一跃点关联的部分重写字符串连接起来,形成一个更大的重写字符串,并将其添加到数据包中。通过使用此功能,瞻博网络路由器可处理的具有唯一内部 VPN 标签的路由数量大幅增加。这些元素会组合与第 3 层 VPN 关联的通用路由更新元素,从而减少路由更新次数和瞻博网络路由器必须维护的单个状态,从而增强扩展和融合性能。
ACX 系列路由器仅在第 3 层 VPN 中[edit routing-options forwarding-table]
支持chained-composite-next-hop ingress
层级的 CLI 语句。chained-composite-next-hop ingress
不支持第 2 层服务的 CLI 语句。
您可以根据要管理的 VPN 标签数量以及是否要为 IPv6 标记的路由创建链式 CNH 来配置路由器:
接受多达 100 万个第 3 层 VPN 路由更新
对于加入拥有多达 100 万个第 3 层 VPN 标签的混合供应商网络的瞻博网络路由器,请在[edit routing-options forwarding-table chained-composite-next-hop ingress]
层次结构级别包含该l3vpn
语句。默认情况下,该l3vpn
语句处于禁用状态。
ACX 系列路由器不支持 chained-composite-next-hop ingress
CLI 语句,请访问 [edit routing-options forwarding-table] hierarchy level.
每当在多达 100 万路由的混合供应商网络中部署瞻博网络路由器以支持第 3 层 VPN 时,建议您配置该 l3vpn
语句。
由于在仅部署了瞻博网络路由器的网络中,使用此语句还可以增强瞻博网络路由器的第 3 层 VPN 性能,因此我们建议也在这些网络中配置这些语句。
您可以在以下路由器上配置该 l3vpn
语句:
ACX 系列路由器
MX 系列路由器
M120 路由器
具有一个或多个增强型 III FPC 的 M320 路由器
T Series 路由器(适用于 Junos OS 10.4 及更高版本)
要接受多达 100 万个带有唯一内部 VPN 标签的第 3 层 VPN 路由更新,请配置语 l3vpn
句。此语句仅在间接连接的 PE 路由器上受支持。在直接连接到 PE 路由器的路由器上配置此语句没有任何好处。您可以在路由器上使用指向直接连接和间接连接的 PE 路由器的混合链路来配置 l3vpn
语句。
您不能在配置 vpn-unequal-cost 语句的同时配置l3vpn
语句和子语句。
要将路由器配置为接受多达 100 万个具有唯一内部 VPN 标签的第 3 层 VPN 路由更新:
配置 l3vpn
语句后,可以通过检查以下命令的显示输出来确定第 3 层 VPN 路由是否是链式 CNH 的一部分:
show route route-value extensive
show route forwarding-table destination destination-value extensive
接受超过 100 万次 3 层 VPN 路由更新
对于加入拥有超过 100 万个第 3 层 VPN 标签的混合供应商网络的瞻博网络路由器,请在[edit routing-options forwarding-table chained-composite-next-hop ingress l3vpn]
层次结构级别包含该extended-space
语句。默认情况下,该extended-space
语句处于禁用状态。
chained-composite-next-hop ingress
ACX 系列路由器不支持和 extended-space
语句。
我们建议在包含超过 100 万条路由的混合供应商网络中配置该 extended-space
语句,以支持第 3 层 VPN。
由于在仅部署了瞻博网络路由器的网络中使用此语句还可以增强瞻博网络路由器的第 3 层 VPN 性能,因此我们建议在这些网络中也配置该语句。
使用该 extended-space
语句可将瞻博网络路由器可处理的具有唯一内部 VPN 标签的路由数量增加一倍。但是,在配置此类超大规模第 3 层 VPN 场景时,请记住以下准则:
extended-space
该语句仅在仅包含 MPC 的 MX 系列路由器上受支持。机箱必须配置为在网络服务模式下使用选项
enhanced-ip
。有关配置机箱网络服务的详细信息,请参阅 Junos OS 管理库。
确保为关联的策略配置按数据包的负载平衡。
有关配置策略的详细信息,请参阅 《路由策略、防火墙过滤器和流量监管器用户指南》。
强烈建议使用运行 64 位 Junos OS 的 64 位路由引擎,以更大规模地支持具有唯一内部 VPN 标签的第 3 层 VPN 前缀。
要将路由器配置为接受超过 100 万次具有唯一内部 VPN 标签的第 3 层 VPN 路由更新:
完成配置后,您可以通过检查以下命令的显示输出来确定第 3 层 VPN 路由是否是 CNH 的一部分:
show route route-value extensive
show route forwarding-table destination destination-value extensive
为 IPv6 标记的单播路由启用链式复合下一跳
您可以通过配置 labeled-bgp 和 inet6 语句,为 IPv6 标记的单播路由启用链式 CNH:
[edit routing-options forwarding-table chained-composite-next-hop ingress labeled-bgp]
层次结构级别包括 inet6 语句。默认情况下,此语句处于禁用状态。
示例:为 VPN 中的直接 PE-PE 连接配置链式复合下一跃点
此示例说明如何为 MX 系列和 T4000 路由器上的 MIC 和 MPC 接口使用链式 CNH 启用背对背提供商边缘 (PE) 路由器第 3 层虚拟专用网络 (VPN) 连接。
要求
此示例使用以下硬件和软件组件:
-
六台路由器,可以是 MX240、MX480、MX960 或 T4000 路由器的组合。
-
在所有设备上运行 Junos OS 13.3 版。
开始之前:
-
配置设备接口。
-
在所有路由器上配置以下路由协议:
-
MPLS 的比较
-
边界网关协议
-
LDP LSP 用作 PE 设备之间的隧道
-
OSPF 或任何其他 IGP 协议
-
概述
Junos OS 13.3 之前的版本在没有 MPLS 核心路由器的退化第 3 层 VPN 情况下,由于背靠背 PE-PE 连接中没有可用的外部标签,且入口 PE 设备仅推送单个 VPN 标签,因此会使用扁平化的间接下一跳和单播下一跳。在 PE-PE 和 PE-P-PE 路径混合的第 3 层 VPN 多路径场景中,也无法使用链式 CNH。
在仅支持 MIC 和 MPC 接口的平台上,默认情况下会启用链式 CNH。在同时支持 DPC 和 MPC 接口的平台上,第 3 层 VPN 配置要求语 pe-pe-connection
句支持用于 PE-PE 连接的链式 CNH。但是,仅具有 MIC 和 FPC 接口的平台不支持该 pe-pe-connection
语句。
作为对这些限制的解决方案,从 Junos OS 13.3 版开始,对链式 CNH 的支持得到了增强,可以在启动时自动识别链式 CNH 上的底层平台功能,而无需依赖用户配置,并决定要嵌入到第 3 层 VPN 标签中的下一跃点类型(复合或间接)。这增强了在具有链式 CNH 的第 3 层 VPN 中对背靠背 PE-PE 连接的支持,并且不再需要语 pe-pe-connection
句。
要为直接连接的 PE 设备启用链式 CNH,除了在[edit routing-options forwarding-table chained-composite-next-hop ingress]
层次结构级别包含l3vpn
语句外,还应进行以下更改:
-
在同时包含 DPC 和 MPC FPC 的 MX 系列 5G 通用路由平台上,链式 CNH 默认处于禁用状态。要在 MX240、MX480 和 MX960 上启用链式 CNH,必须将机箱配置为在网络服务模式下使用选项
enhanced-ip
。 -
在包含 MPC 和 FPC 的 T4000 核心路由器上,链式 CNH 默认处于禁用状态。要在 T4000 路由器上启用链式 CNH,必须将机箱配置为在网络服务模式下使用选项
enhanced-mode
。
拓扑学

配置
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,然后将命令复制并粘贴到层 [edit]
级的 CLI 中。
CE1
set interfaces ge-1/1/1 unit 0 family inet address 192.0.2.2/24 set interfaces ge-1/1/1 unit 0 family iso set interfaces ge-1/1/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 198.51.100.1/24 set protocols bgp group PE type external set protocols bgp group PE peer-as 200 set protocols bgp group PE neighbor 192.0.2.1 set routing-options autonomous-system 100
PE1型
set interfaces ge-0/0/1 unit 0 family inet address 10.38.0.1/30 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 unit 0 family inet address 10.38.0.5/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 unit 0 family inet address 10.38.0.9/30 set interfaces ge-0/0/3 unit 0 family mpls set interfaces ge-0/0/4 unit 0 family inet address 10.32.0.1/30 set interfaces ge-0/0/4 unit 0 family mpls set interfaces ge-0/1/1 unit 0 family inet address 192.0.2.1/24 set interfaces ge-0/1/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.104.133/32 set chassis network-services enhanced-ip set routing-options forwarding-table chained-composite-next-hop ingress l3vpn set routing-options autonomous-system 200 set routing-options forwarding-table export lbpp set protocols mpls interface 10.38.0.1/30 set protocols mpls interface 10.32.0.1/30 set protocols mpls interface 10.38.0.5/30 set protocols mpls interface 10.38.0.9/30 set protocols bgp group PEs type internal set protocols bgp group PEs local-address 10.255.104.133 set protocols bgp group PEs family inet unicast set protocols bgp group PEs family inet-vpn unicast set protocols bgp group PEs neighbor 10.255.104.134 local-preference 200 set protocols bgp group PEs neighbor 10.255.104.135 set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ldp interface all set protocols ldp interface fxp0.0 disable set policy-options policy-statement lbpp then load-balance per-packet set routing-instances vpn-a instance-type vrf set routing-instances vpn-a interface ge-0/1/1.0 set routing-instances vpn-a route-distinguisher 200:1 set routing-instances vpn-a vrf-target target:200:1 set routing-instances vpn-a vrf-table-label set routing-instances vpn-a protocols bgp group CE type external set routing-instances vpn-a protocols bgp group CE peer-as 100 set routing-instances vpn-a protocols bgp group CE neighbor 192.0.2.2
PE2
set interfaces ge-1/0/2 unit 0 family inet address 10.38.0.13/30 set interfaces ge-1/0/2 unit 0 family mpls set interfaces ge-1/0/3 unit 0 family inet address 10.32.0.17/30 set interfaces ge-1/0/3 unit 0 family mpls set interfaces ge-1/0/5 unit 0 family inet address 192.0.2.3/24 set interfaces ge-1/0/5 unit 0 family mpls set interfaces ge-1/1/0 unit 0 family inet address 10.38.0.2/30 set interfaces ge-1/1/0 unit 0 family mpls set interfaces ge-1/2/0 unit 0 family inet address 10.32.0.2/30 set interfaces ge-1/2/0 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.104.134/32 set chassis network-services enhanced-ip set routing-options forwarding-table chained-composite-next-hop ingress l3vpn set routing-instances vpn-a instance-type vrf set routing-instances vpn-a interface ge-1/0/5.0 set routing-instances vpn-a route-distinguisher 200:2 set routing-instances vpn-a vrf-target target:200:1 set routing-instances vpn-a protocols bgp group CE type external set routing-instances vpn-a protocols bgp group CE peer-as 300 set routing-instances vpn-a protocols bgp group CE neighbor 192.0.2.3 set protocols mpls interface 10.38.0.2/30 set protocols mpls interface 10.32.0.2/30 set protocols mpls interface 10.38.0.13/30 set protocols mpls interface 10.38.0.17/30 set protocols bgp group PEs type internal set protocols bgp group PEs local-address 10.255.104.134 set protocols bgp group PEs family inet unicast set protocols bgp group PEs family inet-vpn unicast set protocols bgp group PEs neighbor 10.255.104.133 set protocols bgp group PEs neighbor 10.255.104.135 set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ldp interface all set protocols ldp interface fxp0.0 disable set routing-options autonomous-system 200
磷
set interfaces ge-2/0/1 unit 0 family inet address 10.38.0.6/30 set interfaces ge-2/0/1 unit 0 family mpls set interfaces ge-2/0/2 unit 0 family inet address 10.38.0.14/30 set interfaces ge-2/0/2 unit 0 family mpls set interfaces ge-2/0/3 unit 0 family inet address 10.38.0.21/30 set interfaces ge-2/0/3 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.104.136/32 set protocols mpls interface 10.38.0.6/30 set protocols mpls interface 10.38.0.14/30 set protocols mpls interface 10.38.0.21/30 set protocols bgp group PEs type internal set protocols bgp group PEs local-address 10.255.104.136 set protocols bgp group PEs family inet unicast set protocols bgp group PEs family inet-vpn unicast set protocols bgp group PEs neighbor 10.255.104.133 set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ldp interface all set protocols ldp interface fxp0.0 disable set routing-options autonomous-system 200
聚乙烯3
set interfaces ge-3/0/0 unit 0 family inet address 10.38.0.10/30r0-r3 set interfaces ge-3/0/0 unit 0 family mpls set interfaces ge-3/0/1 unit 0 family inet address 10.38.0.18/30r0-r1-2 set interfaces ge-3/0/1 unit 0 family mpls set interfaces ge-3/0/2 unit 0 family inet address 10.38.0.22/30 set interfaces ge-3/0/2 unit 0 family mpls set interfaces ge-3/0/5 unit 0 family inet address 192.0.2.6/24r0-r1-1 set interfaces ge-3/0/5 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.104.135/32 set chassis network-services enhanced-mode set routing-options forwarding-table chained-composite-next-hop ingress l3vpn set routing-options autonomous-system 200 set routing-instances vpn-a instance-type vrf set routing-instances vpn-a interface ge-3/0/5.0 set routing-instances vpn-a route-distinguisher 200:3 set routing-instances vpn-a vrf-target target:200:1 set routing-instances vpn-a protocols bgp group CE type external set routing-instances vpn-a protocols bgp group CE peer-as 300 set routing-instances vpn-a protocols bgp group CE neighbor 192.0.2.5 set protocols mpls interface 10.38.0.10/30 set protocols mpls interface 10.38.0.18/30 set protocols mpls interface 10.38.0.22/30 set protocols bgp group PEs type internal set protocols bgp group PEs local-address 10.255.104.135 set protocols bgp group PEs family inet unicast set protocols bgp group PEs family inet-vpn unicast set protocols bgp group PEs neighbor 10.255.104.133 set protocols bgp group PEs neighbor 10.255.104.134 set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ldp interface all set protocols ldp interface fxp0.0 disable
CE2 认证
set interfaces ge-2/2/2 unit 0 family inet address 192.0.2.4/24 set interfaces ge-2/2/2 unit 0 family mpls set interfaces ge-2/2/3 unit 0 family inet address 192.0.2.5/24 set interfaces ge-2/2/3 unit 0 family mpls set interfaces lo0 unit 0 family inet address 198.51.100.2/24 set protocols bgp group PE type external set protocols bgp group PE metric-out 50 set protocols bgp group PE peer-as 200 set protocols bgp group PE export s2b set protocols bgp group PE neighbor 192.0.2.4 set protocols bgp group PE neighbor 192.0.2.5 set policy-options policy-statement s2b from protocol direct set policy-options policy-statement s2b then accept set routing-options autonomous-system 300
使用链式复合下一跃点配置多路径第 3 层 VPN
分步过程
下面的示例要求您在各个配置层级中进行导航。有关 CLI 导航的信息,请参阅 在配置模式下使用 CLI 编辑器。
要在 PE1 路由器上使用链式 CNH 配置基本的第 3 层 VPN,请执行以下作:
在修改每个路由器的相应接口名称、地址和任何其他参数后,对 MPLS 域中的 PE2 和 PE3 路由器重复此过程。
-
配置 PE1 路由器上的接口。
PE1 to CE1
[edit interfaces]
user@PE1 # set ge-0/1/1 unit 0 family inet address 192.0.2.1/24 user@PE1 # set ge-0/1/1 unit 0 family mplsPE1 to PE2
[edit interfaces]
user@PE1 # set ge-0/0/1 unit 0 family inet address 10.38.0.1/30 user@PE1 # set ge-0/0/1 unit 0 family mpls user@PE1 # set ge-0/0/2 unit 0 family inet address 10.38.0.5/30 user@PE1 # set ge-0/0/2 unit 0 family mplsPE1 to P
[edit interfaces]
user@PE1 # set ge-0/0/4 unit 0 family inet address 10.32.0.1/30 user@PE1 # set ge-0/0/4 unit 0 family mplsPE1 to PE3
[edit interfaces]
user@PE1 # set ge-0/0/3 unit 0 family inet address 10.38.0.9/30 user@PE1 # set ge-0/0/3 unit 0 family mplsLoopback interface
[edit interfaces]
user@PE1 # set lo0 unit 0 family inet address 10.255.104.133/32 -
在 PE1 机箱上启用增强型 IP 模式。
[edit chassis]
use@PE1# set network-services enhanced-ip -
在全局第 3 层 VPN 上启用链式 CNH。
[edit routing-options]
use@PE1# set forwarding-table chained-composite-next-hop ingress l3vpn -
为 PE1 配置自治系统。
[edit routing-options]
user@PE1# set autonomous-system 200 -
导出为负载平衡配置的策略。
[edit routing-options]
user@PE1# set forwarding-table export lbpp -
在连接到 P 路由器和其他 PE 路由器的 PE1 接口上配置 MPLS。
[edit protocols]
user@PE1# set mpls interface 10.38.0.1/30 user@PE1# set mpls interface 10.32.0.1/30 user@PE1# set mpls interface 10.38.0.5/30 user@PE1# set mpls interface 10.38.0.9/30 -
为 PE1 配置 IBGP 组,以便与 PE2 和 PE3 路由器对等。
[edit protocols]
user@PE1# set bgp group PEs type internal user@PE1# set bgp group PEs local-address 10.255.104.133 user@PE1# set bgp group PEs family inet unicast user@PE1# set bgp group PEs family inet-vpn unicast user@PE1# set bgp group PEs neighbor 10.255.104.134 local-preference 200 user@PE1# set bgp group PEs neighbor 10.255.104.135 -
在 PE1 的所有接口(管理接口除外)上配置具有流量工程功能的 OSPF。
[edit protocols]
user@PE1# set ospf area 0.0.0.0 interface all user@PE1# set ospf area 0.0.0.0 interface fxp0.0 disable user@PE1# set ospf area 0.0.0.0 interface lo0.0 passive -
在 PE1 的所有接口上配置 LDP,管理接口除外。
[edit protocols]
user@PE1# set ldp interface all user@PE1# set ldp interface fxp0.0 disable -
配置策略以按数据包对流量进行负载均衡。
[edit policy-options]
user@PE1# set policy-statement lbpp then load-balance per-packet -
在PE1面向CE1的接口上配置VRF路由实例。
[edit routing-instances]
user@PE1# set vpn-a instance-type vrf user@PE1# set vpn-a interface ge-0/1/1.0 -
配置路由实例参数。
[edit routing-instances]
user@PE1# set vpn-a route-distinguisher 200:1 user@PE1# set vpn-a vrf-target target:200:1 user@PE1# set vpn-a vrf-table-label -
为路由实例配置 EBGP 组,以便 PE1 可以与 CE1 对等。
[edit routing-instances]
user@PE1# set vpn-a protocols bgp group CE type external user@PE1# set vpn-a protocols bgp group CE peer-as 100 user@PE1# set vpn-a protocols bgp group CE neighbor 192.0.2.2
结果
在配置模式下,输入show chassis
、show interfaces
、show routing-instances
show protocols
show routing-options
和show policy-options
命令,以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明以更正配置。
PE1型
user@PE1# show chassis
network-services enhanced-ip;
user@PE1# show interfaces
ge-0/0/1 {
unit 0 {
family inet {
address 10.38.0.1/30;
}
family mpls;
}
}
ge-0/0/2 {
unit 0 {
family inet {
address 10.38.0.5/30;
}
family mpls;
}
}
ge-0/0/3 {
unit 0 {
family inet {
address 10.38.0.9/30;
}
family mpls;
}
}
ge-0/0/4 {
unit 0 {
family inet {
address 10.32.0.1/30;
}
family mpls;
}
}
ge-0/1/1 {
unit 0 {
family inet {
address 192.0.2.1/24;
}
family mpls;
}
}
lo0 {
unit 0 {
family inet {
address 10.255.104.133/32;
}
}
}
user@PE1# show protocols
mpls {
interface 10.38.0.1/30;
interface 10.32.0.1/30;
interface 10.38.0.5/30;
interface 10.38.0.9/30;
}
bgp {
group PEs {
type internal;
local-address 10.255.104.133;
family inet {
unicast;
}
family inet-vpn {
unicast;
}
neighbor 10.255.104.134 {
local-preference 200;
}
neighbor 10.255.104.135;
}
}
ospf {
area 0.0.0.0 {
interface all;
interface fxp0.0 {
disable;
}
interface lo0.0 {
passive;
}
}
}
ldp {
interface all;
interface fxp0.0 {
disable;
}
}
user@PE1# show routing-options
autonomous-system 200;
forwarding-table {
export lbpp;
chained-composite-next-hop {
ingress {
l3vpn;
}
}
}
user@PE1# show routing-instances
vpn-a {
instance-type vrf;
interface ge-0/1/1.0;
route-distinguisher 200:1;
vrf-target target:200:1;
vrf-table-label;
protocols {
bgp {
group CE {
type external;
peer-as 100;
neighbor 192.0.2.2;
}
}
}
}
user@PE1# show policy-options
policy-statement lbpp {
then {
load-balance per-packet;
}
}
验证
确认配置工作正常。
验证路由
目的
验证指向 PE1-PE2 的第 3 层 VPN 前缀是否指向链接的 CNH。
行动
在作模式下,运行 show route 198.51.100.2 table vpn-a extensive
命令。
user@PE1> show route 198.51.100.2 table vpn-a extensive vpn-a.inet.0: 7 destinations, 10 routes (7 active, 0 holddown, 0 hidden) 198.51.100.2/24 (2 entries, 1 announced) TSI: KRT in-kernel 198.51.100.2/3 -> {composite(720)} Page 0 idx 0, (group CE type External) Type 1 val 938eaa8 (adv_entry) Advertised metrics: Nexthop: Self AS path: [200] 300 I Communities: target:200:1 Path 198.51.100.2 from 10.255.104.133 Vector len 4. Val: 0 *BGP Preference: 170/-101 Route Distinguisher: 200:2 Next hop type: Indirect Address: 0x9391654 Next-hop reference count: 12 Source: 10.255.104.133 Next hop type: Router, Next hop index: 1048580 Next hop: 10.32.0.2 via ge-0/0/2.0 Session Id: 0x1 Next hop: 10.38.0.2 via ge-0/0/1.0, selected Session Id: 0x3 Protocol next hop: 10.255.104.133 Push 300192 Composite next hop: 0x93918a4 718 INH Session ID: 0x9 Indirect next hop: 0x941c000 1048581 INH Session ID: 0x9 State: <Secondary Active Int Ext ProtectionCand> Local AS: 200 Peer AS: 200 Age: 28 Metric: 50 Metric2: 1 Validation State: unverified Task: BGP_203.0.113.1.133+57173 Announcement bits (2): 0-KRT 1-BGP_RT_Background AS path: 300 I Communities: target:200:1 Import Accepted VPN Label: 300192 Localpref: 100 Router ID: 10.255.104.133 Primary Routing Table bgp.l3vpn.0 Composite next hops: 1 Protocol next hop: 10.255.104.133 Metric: 1 Push 300192 Composite next hop: 0x93918a4 718 INH Session ID: 0x9 Indirect next hop: 0x941c000 1048581 INH Session ID: 0x9 Indirect path forwarding next hops: 2 Next hop type: Router Next hop: 10.32.0.2 via ge-1/0/0.0 Session Id: 0x1 Next hop: 10.38.0.2 via ge-1/1/2.0 Session Id: 0x3 10.255.104.133/32 Originating RIB: inet.3 Metric: 1 Node path count: 1 Forwarding nexthops: 2 Nexthop: 10.32.0.2 via ge-0/0/2.0 BGP Preference: 170/-101 Route Distinguisher: 200:3 Next hop type: Indirect Address: 0x9391608 Next-hop reference count: 9 Source: 10.255.104.131 Next hop type: Router, Next hop index: 722 Next hop: 10.38.0.10 via ge-0/0/1.0, selected Session Id: 0x4 Protocol next hop: 10.255.104.131 Push 299936 Composite next hop: 0x9391690 723 INH Session ID: 0xb Indirect next hop: 0x941c0fc 1048583 INH Session ID: 0xb State: <Secondary NotBest Int Ext ProtectionCand> Inactive reason: Not Best in its group - Router ID Local AS: 200 Peer AS: 200 Age: 28 Metric: 50 Metric2: 1 Validation State: unverified Task: BGP_203.0.113.1.131+63797 AS path: 300 I Communities: target:200:1 Import Accepted VPN Label: 299936 Localpref: 100 Router ID: 10.255.104.131 Primary Routing Table bgp.l3vpn.0 Composite next hops: 1 Protocol next hop: 10.255.104.131 Metric: 1 Push 299936 Composite next hop: 0x9391690 723 INH Session ID: 0xb Indirect next hop: 0x941c0fc 1048583 INH Session ID: 0xb Indirect path forwarding next hops: 1 Next hop type: Router Next hop: 10.38.0.10 via ge-1/0/2.0 Session Id: 0x4 10.255.104.131/32 Originating RIB: inet.3 Metric: 1 Node path count: 1 Forwarding nexthops: 1 Nexthop: 10.38.0.10 via ge-1/0/2.0
意义
PE2 路由器是 PE1 到达 CE2 的 CNH。