示例:IS-IS第 3 层虚拟专用网 (VPN) 中的源数据包路由启用链路延迟(SPRING)
此示例展示如何在第 3 层 VPN 情景IS-IS SPRING 配置链路延迟。在这种情况下,您可以在 PE1 和 PE2 之间创建两个 VPN。VPN1 可优化链路延迟,而 VPN2 可优化IGP指标。尽管您可以配置功能以在测试拓扑中启用双向流量,但此示例主要关注单向流量情景。具体来说,您的任务就是控制 PE1 发送至 PE2 通告目的地的 3 层 VPN 流量的转发路径。
要求
此示例具有以下硬件和软件组件:
-
四台 MX 系列路由器
-
Junos OS 21.1R1 或更高版本在所有设备上运行
拓扑

在拓扑中,大多数链路都有一个(默认)IGP度量值为 10、动态延迟度量和蓝色着色。PE1 和 P1 之间的红色路径以及 P2 到 PE2 链路上的静态延迟配置例外。
我们已配置测试拓扑,以支持 IPv4 和 IPv6 IS-IS链路延迟。我们将 P2 路由器配置为路由反射器,将 PE 设备配置为客户端。为简化拓扑结构,我们在 PE2 路由器的 VRF 中采用静态路由。这样就无需任何客户边缘 PE-客户边缘路由协议(如 EBGP)。
您的目标是配置网络,以便 PE2 for VPN1 通告的路由采用可优化延迟的路径,同时仅局限于使用蓝色链路。相反,发送至与 VPN2 关联的路由的流量可以使用蓝色或红色链路,并基于其策略指标IGP优化。
- VPN1 的 Flex 算法定义 (FAD) 使用算法 128。我们已配置为在经过优化减少延迟的路径上仅使用蓝色链路 (PE1>P2>P1>PE2)。为了帮助展示正确的路径选择,您可以在 P2 和 PE2 之间配置 20000 微秒的静态延迟。此延迟明显高于在其余链路上测量的动态延迟。因此,您可希望 flex 算法 128 信息流能够避开 P2 到 PE2 链路,而不是首选是沿蓝色路径 (PE1>P2>P1>PE2)添加附加跳跃。
- VPN2 的 Flex 算法定义 (FAD) 使用算法 129。我们将它配置为使用蓝色或红色链路 (PE1>P1>PE2 或 PE1>P2>PE2),并基于 IGP 指标优化路径。因此,使用 flex 算法 129 的流量在 PE1 和 PE2 之间具有两条相等的成本路径,两者均会导致两跳,因此度量值为 20。
概述
在 IP 网络中,大部分流量通常通过核心网络,这可降低成本,但可能会导致延迟增加。但是,业务流量通常受益于基于其他性能指标(例如路径延迟)制定路径选择决策的能力,而不是仅基于 IGP 指标中继传统路径优化。优化路径以降低延迟会给实时语音和视频等应用带来巨大优势。它还支持高性能地访问金融市场数据,其中毫秒可转换为重大收益或损失。
从 21.1R1 Junos OS版本开始,您可以在 IP 网络中启用IS-IS延迟。通过使用默认路由IGP (0) 将IS-IS成本配置为一个适当的链路成本,可以实现最小IS-IS指标路径。这样可优化严格基于链路指标总和的端点路径。通过使用延迟IS-IS算法,您可以基于其端到端延迟优化路径。
链路延迟可通过双向主动测量探测 (TWAMP) 动态测量。然后,路由器将泛洪其链路延迟参数。该区域中的路由器将这些参数存储在共享链路状态数据库 (LSDB) 中。入口节点根据 LSDB 运行 SPF 算法,以计算在各种属性上优化的路径,例如链路颜色、IGP 指标、流量工程 (流量工程) 指标或链路延迟(如此示例中所示)。
出口路由器通过将关联的颜色社区连接到通过路由通告的路由来发出所需 flex 算法BGP。在发送端(接收远程 PE 通告的标记路由的本地 PE),这些颜色社区用于索引到颜色表中,将远程协议下一跃点(PE 的环路地址)解析为 Flex 算法标识符。在 3 层 VPN 环境中,在入口节点使用颜色映射策略来选择哪些前缀应该通过颜色表解析其下一跳跃。
然后,本地 PE 使用其本地 Flex 算法定义 (FAD) 将 Flex 算法标识符映射为一组路径选择标准,例如"使用蓝色链路并针对延迟进行优化"。入口 PE 基于 LSDB 中的值计算最优路径,将相关 MPLS 标签堆栈推至数据包,并将其发送到相关联的下一跳跃。这导致使用 MPLS 作为信号IS-IS流量设计路径。
配置
CLI快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以匹配网络配置,然后将命令复制并粘贴到 [edit] 层次结构级别的 CLI 中。
根据 MX 系列路由器中的 MPC 类型,可能需要显式启用增强型 IP 服务以支持IS-IS功能。提交配置 set chassis network-services enhanced-ip
语句时,系统将提示您重新启动系统。
PE1
set system host-name PE1 set chassis network-services enhanced-ip set services rpm twamp server authentication-mode none set services rpm twamp server light set interfaces ge-0/0/0 description To_R1 set interfaces ge-0/0/0 unit 0 family inet address 10.0.1.10/24 set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/0 unit 0 family inet6 address 2001:db8:10:0:1::10/80 set interfaces ge-0/0/0 unit 0 family mpls maximum-labels 16 set interfaces ge-0/0/1 description To_R2 set interfaces ge-0/0/1 unit 0 family inet address 10.0.2.10/24 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family inet6 address 2001:db8:10:0:2::10/80 set interfaces ge-0/0/1 unit 0 family mpls maximum-labels 16 set interfaces lo0 unit 0 family inet address 192.168.255.10/32 set interfaces lo0 unit 0 family inet address 127.0.0.1/32 set interfaces lo0 unit 0 family iso address 49.0001.000a.0a0a.0a00 set interfaces lo0 unit 0 family inet6 address 2001:db8:192:168:255::10/128 set interfaces lo0 unit 1 family inet address 172.16.10.1/32 set interfaces lo0 unit 1 family inet6 address 2001:db8:172:16:10::1/128 set interfaces lo0 unit 2 family inet address 172.16.10.2/32 set interfaces lo0 unit 2 family inet6 address 2001:db8:172:16:10::2/128 set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement prefix-sid term 1 from route-filter 192.168.255.10/32 exact set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 128 index 1280 set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 129 index 1290 set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 1 then prefix-segment index 1000 set policy-options policy-statement prefix-sid term 1 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 1 then accept set policy-options policy-statement prefix-sid term 2 from route-filter 2001:db8:192:168:255::10/128 exact set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 128 index 4280 set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 129 index 4290 set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 2 then prefix-segment index 4000 set policy-options policy-statement prefix-sid term 2 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 2 then accept set policy-options policy-statement v6vpn1_res_map1 from route-filter 2001:db8:172:16:1::/80 orlonger set policy-options policy-statement v6vpn1_res_map1 then accept set policy-options policy-statement v6vpn1_res_map1 then resolution-map map1 set policy-options policy-statement v6vpn2_res_map1 from route-filter 2001:db8:172:16:2::/80 orlonger set policy-options policy-statement v6vpn2_res_map1 then accept set policy-options policy-statement v6vpn2_res_map1 then resolution-map map1 set policy-options policy-statement vpn1_res_map1 term 1 from route-filter 172.16.1.0/24 orlonger set policy-options policy-statement vpn1_res_map1 term 1 then accept set policy-options policy-statement vpn1_res_map1 term 1 then resolution-map map1 set policy-options policy-statement vpn2_res_map1 term 1 from route-filter 172.16.2.0/24 orlonger set policy-options policy-statement vpn2_res_map1 term 1 then accept set policy-options policy-statement vpn2_res_map1 term 1 then resolution-map map1 set policy-options resolution-map map1 mode ip-color set routing-instances vpn1 instance-type vrf set routing-instances vpn1 interface lo0.1 set routing-instances vpn1 route-distinguisher 64512:1 set routing-instances vpn1 vrf-target target:64512:1 set routing-instances vpn1 vrf-table-label set routing-instances vpn2 instance-type vrf set routing-instances vpn2 interface lo0.2 set routing-instances vpn2 route-distinguisher 64512:2 set routing-instances vpn2 vrf-target target:64512:2 set routing-instances vpn2 vrf-table-label set protocols bgp group to-RRv6 type internal set protocols bgp group to-RRv6 local-address 2001:db8:192:168:255::10 set protocols bgp group to-RRv6 import v6vpn1_res_map1 set protocols bgp group to-RRv6 import v6vpn2_res_map1 set protocols bgp group to-RRv6 family inet6 unicast extended-nexthop-color set protocols bgp group to-RRv6 family inet6-vpn unicast set protocols bgp group to-RRv6 neighbor 2001:db8:192:168:255::2 set protocols bgp group to-RR type internal set protocols bgp group to-RR local-address 192.168.255.10 set protocols bgp group to-RR import vpn1_res_map1 set protocols bgp group to-RR import vpn2_res_map1 set protocols bgp group to-RR family inet unicast extended-nexthop-color set protocols bgp group to-RR family inet-vpn unicast set protocols bgp group to-RR family traffic-engineering unicast set protocols bgp group to-RR neighbor 192.168.255.2 set protocols bgp group to-RR vpn-apply-export set protocols isis interface ge-0/0/0.0 level 2 post-convergence-lfa node-protection set protocols isis interface ge-0/0/0.0 delay-measurement advertisement periodic threshold 100 set protocols isis interface ge-0/0/0.0 point-to-point set protocols isis interface ge-0/0/1.0 level 2 post-convergence-lfa node-protection set protocols isis interface ge-0/0/1.0 delay-measurement advertisement periodic threshold 100 set protocols isis interface ge-0/0/1.0 point-to-point set protocols isis interface lo0.0 passive set protocols isis source-packet-routing srgb start-label 80000 set protocols isis source-packet-routing srgb index-range 5000 set protocols isis source-packet-routing flex-algorithm 128 set protocols isis source-packet-routing flex-algorithm 129 set protocols isis level 1 disable set protocols isis backup-spf-options use-post-convergence-lfa maximum-backup-paths 8 set protocols isis backup-spf-options use-source-packet-routing set protocols isis traffic-engineering l3-unicast-topology set protocols isis traffic-engineering advertisement always set protocols isis export prefix-sid set protocols mpls traffic-engineering set protocols mpls admin-groups RED 0 set protocols mpls admin-groups BLUE 1 set protocols mpls icmp-tunneling set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols mpls interface ge-0/0/0.0 admin-group RED set protocols mpls interface ge-0/0/1.0 admin-group BLUE set routing-options flex-algorithm 128 definition metric-type delay-metric set routing-options flex-algorithm 128 definition spf set routing-options flex-algorithm 128 definition admin-group include-any BLUE set routing-options flex-algorithm 129 definition metric-type igp-metric set routing-options flex-algorithm 129 definition spf set routing-options flex-algorithm 129 definition admin-group include-any RED set routing-options flex-algorithm 129 definition admin-group include-any BLUE set routing-options router-id 192.168.255.10 set routing-options autonomous-system 64512 set routing-options forwarding-table export pplb set routing-options forwarding-table ecmp-fast-reroute set routing-options forwarding-table chained-composite-next-hop ingress l3vpn
P1
set system host-name P1 set chassis network-services enhanced-ip set services rpm twamp server authentication-mode none set services rpm twamp server light set interfaces ge-0/0/0 description To_R0 set interfaces ge-0/0/0 unit 0 family inet address 10.0.1.1/24 set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/0 unit 0 family inet6 address 2001:db8:10:0:1::1/80 set interfaces ge-0/0/0 unit 0 family mpls maximum-labels 16 set interfaces ge-0/0/1 description To_R2 set interfaces ge-0/0/1 unit 0 family inet address 10.0.12.1/24 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family inet6 address 2001:db8:10:0:12::1/80 set interfaces ge-0/0/1 unit 0 family mpls maximum-labels 16 set interfaces ge-0/0/2 description To_R3 set interfaces ge-0/0/2 unit 0 family inet address 10.0.13.1/24 set interfaces ge-0/0/2 unit 0 family iso set interfaces ge-0/0/2 unit 0 family inet6 address 2001:db8:10:0:13::1/80 set interfaces ge-0/0/2 unit 0 family mpls maximum-labels 16 set interfaces lo0 unit 0 family inet address 192.168.255.1/32 set interfaces lo0 unit 0 family iso address 49.0001.0005.0505.0500 set interfaces lo0 unit 0 family inet6 address 2001:db8:192:168:255::1/128 set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement prefix-sid term 1 from route-filter 192.168.255.1/32 exact set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 128 index 1281 set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 129 index 1291 set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 1 then prefix-segment index 1001 set policy-options policy-statement prefix-sid term 1 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 1 then accept set policy-options policy-statement prefix-sid term 2 from route-filter 2001:db8:192:168:255::1/128 exact set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 128 index 4281 set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 129 index 4291 set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 2 then prefix-segment index 4001 set policy-options policy-statement prefix-sid term 2 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 2 then accept set protocols isis interface ge-0/0/0.0 level 2 post-convergence-lfa node-protection set protocols isis interface ge-0/0/0.0 delay-measurement advertisement periodic threshold 100 set protocols isis interface ge-0/0/0.0 point-to-point set protocols isis interface ge-0/0/1.0 level 2 post-convergence-lfa node-protection set protocols isis interface ge-0/0/1.0 delay-measurement advertisement periodic threshold 100 set protocols isis interface ge-0/0/1.0 point-to-point set protocols isis interface ge-0/0/2.0 level 2 post-convergence-lfa node-protection set protocols isis interface ge-0/0/2.0 delay-measurement advertisement periodic threshold 100 set protocols isis interface ge-0/0/2.0 point-to-point set protocols isis interface lo0.0 passive set protocols isis source-packet-routing srgb start-label 80000 set protocols isis source-packet-routing srgb index-range 5000 set protocols isis source-packet-routing flex-algorithm 128 set protocols isis source-packet-routing flex-algorithm 129 set protocols isis level 1 disable set protocols isis backup-spf-options use-post-convergence-lfa maximum-backup-paths 8 set protocols isis backup-spf-options use-source-packet-routing set protocols isis traffic-engineering l3-unicast-topology set protocols isis traffic-engineering advertisement always set protocols isis export prefix-sid set protocols mpls admin-groups RED 0 set protocols mpls admin-groups BLUE 1 set protocols mpls icmp-tunneling set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols mpls interface ge-0/0/0.0 admin-group RED set protocols mpls interface ge-0/0/1.0 admin-group BLUE set protocols mpls interface ge-0/0/2.0 admin-group BLUE set routing-options router-id 192.168.255.1 set routing-options autonomous-system 65412 set routing-options forwarding-table export pplb
P2
set system host-name P2 set chassis network-services enhanced-ip set services rpm twamp server authentication-mode none set services rpm twamp server light set interfaces ge-0/0/0 unit 0 family inet address 10.0.2.2/24 set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/0 unit 0 family inet6 address 2001:db8:10:0:2::2/80 set interfaces ge-0/0/0 unit 0 family mpls maximum-labels 16 set interfaces ge-0/0/1 description To_R1 set interfaces ge-0/0/1 unit 0 family inet address 10.0.12.2/24 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family inet6 address 2001:db8:10:0:12::2/80 set interfaces ge-0/0/1 unit 0 family mpls maximum-labels 16 set interfaces ge-0/0/2 description To_R3 set interfaces ge-0/0/2 unit 0 family inet address 10.0.23.2/24 set interfaces ge-0/0/2 unit 0 family iso set interfaces ge-0/0/2 unit 0 family inet6 address 2001:db8:10:0:23::2/80 set interfaces ge-0/0/2 unit 0 family mpls maximum-labels 16 set interfaces lo0 unit 0 family inet address 192.168.255.2/32 set interfaces lo0 unit 0 family iso address 49.0001.0002.0202.0200 set interfaces lo0 unit 0 family inet6 address 2001:db8:192:168:255::2/128 set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement prefix-sid term 1 from route-filter 192.168.255.2/32 exact set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 128 index 1282 set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 129 index 1292 set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 1 then prefix-segment index 1002 set policy-options policy-statement prefix-sid term 1 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 1 then accept set policy-options policy-statement prefix-sid term 2 from route-filter 2001:db8:192:168:255::2/128 exact set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 128 index 4282 set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 129 index 4292 set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 2 then prefix-segment index 4002 set policy-options policy-statement prefix-sid term 2 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 2 then accept set policy-options policy-statement ted2nlri_igp term 1 from family traffic-engineering set policy-options policy-statement ted2nlri_igp term 1 from protocol isis set policy-options policy-statement ted2nlri_igp term 1 then accept set protocols bgp group to-RRv6 type internal set protocols bgp group to-RRv6 local-address 2001:db8:192:168:255::2 set protocols bgp group to-RRv6 family inet6 unicast set protocols bgp group to-RRv6 family inet6-vpn unicast set protocols bgp group to-RRv6 neighbor 2001:db8:192:168:255::10 set protocols bgp group to-RRv6 neighbor 2001:db8:192:168:255::3 set protocols bgp group to-RR type internal set protocols bgp group to-RR local-address 192.168.255.2 set protocols bgp group to-RR family inet unicast set protocols bgp group to-RR family inet-vpn unicast set protocols bgp group to-RR neighbor 192.168.255.10 set protocols bgp group to-RR neighbor 192.168.255.3 set protocols bgp cluster 192.168.255.2 set protocols isis interface ge-0/0/0.0 level 2 post-convergence-lfa node-protection set protocols isis interface ge-0/0/0.0 delay-measurement advertisement periodic threshold 100 set protocols isis interface ge-0/0/0.0 point-to-point set protocols isis interface ge-0/0/1.0 level 2 post-convergence-lfa node-protection set protocols isis interface ge-0/0/1.0 delay-measurement advertisement periodic threshold 100 set protocols isis interface ge-0/0/1.0 point-to-point set protocols isis interface ge-0/0/2.0 level 2 post-convergence-lfa node-protection set protocols isis interface ge-0/0/2.0 delay-metric 20000 set protocols isis interface ge-0/0/2.0 delay-measurement advertisement periodic threshold 100 set protocols isis interface ge-0/0/2.0 point-to-point set protocols isis interface lo0.0 passive set protocols isis source-packet-routing srgb start-label 80000 set protocols isis source-packet-routing srgb index-range 5000 set protocols isis source-packet-routing flex-algorithm 128 set protocols isis source-packet-routing flex-algorithm 129 set protocols isis level 1 disable set protocols isis backup-spf-options use-post-convergence-lfa maximum-backup-paths 8 set protocols isis backup-spf-options use-source-packet-routing set protocols isis traffic-engineering l3-unicast-topology set protocols isis traffic-engineering advertisement always set protocols isis export prefix-sid set protocols mpls traffic-engineering set protocols mpls admin-groups RED 0 set protocols mpls admin-groups BLUE 1 set protocols mpls icmp-tunneling set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols mpls interface ge-0/0/0.0 admin-group BLUE set protocols mpls interface ge-0/0/1.0 admin-group BLUE set protocols mpls interface ge-0/0/2.0 admin-group BLUE set routing-options router-id 192.168.255.2 set routing-options autonomous-system 64512 set routing-options forwarding-table export pplb
PE2
set system host-name PE2 set chassis network-services enhanced-ip set services rpm twamp server authentication-mode none set services rpm twamp server light set interfaces ge-0/0/0 description To_R1 set interfaces ge-0/0/0 unit 0 family inet address 10.0.13.3/24 set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/0 unit 0 family inet6 address 2001:db8:10:0:13::3/80 set interfaces ge-0/0/0 unit 0 family mpls maximum-labels 16 set interfaces ge-0/0/1 description To_R2 set interfaces ge-0/0/1 unit 0 family inet address 10.0.23.3/24 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family inet6 address 2001:db8:10:0:23::364/128 set interfaces ge-0/0/1 unit 0 family mpls maximum-labels 16 set interfaces lo0 unit 0 family inet address 192.168.255.3/32 set interfaces lo0 unit 0 family inet address 127.0.0.1/32 set interfaces lo0 unit 0 family iso address 49.0001.0007.0707.0700 set interfaces lo0 unit 0 family inet6 address 2001:db8:192:168:255::3/128 set interfaces lo0 unit 1 family inet address 172.16.3.1/32 set interfaces lo0 unit 1 family inet6 address 2001:db8:172:16:3::1/128 set interfaces lo0 unit 2 family inet address 172.16.3.2/32 set interfaces lo0 unit 2 family inet6 address 2001:db8:172:16:3::2/128 set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement prefix-sid term 1 from route-filter 192.168.255.3/32 exact set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 128 index 1283 set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 129 index 1293 set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 1 then prefix-segment index 1003 set policy-options policy-statement prefix-sid term 1 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 1 then accept set policy-options policy-statement prefix-sid term 2 from route-filter 2001:db8:192:168:255::3/128 exact set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 128 index 4283 set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 129 index 4293 set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 2 then prefix-segment index 4003 set policy-options policy-statement prefix-sid term 2 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 2 then accept set policy-options policy-statement vpn_1_export term 1 from route-filter 172.16.1.0/24 orlonger set policy-options policy-statement vpn_1_export term 1 then community add color128 set policy-options policy-statement vpn_1_export term 1 then next-hop 192.168.255.3 set policy-options policy-statement vpn_1_export term 1 then accept set policy-options policy-statement vpn_1_export_v6 term 1 from route-filter 2001:db8:172:16:1::/80 orlonger set policy-options policy-statement vpn_1_export_v6 term 1 then community add color128 set policy-options policy-statement vpn_1_export_v6 term 1 then next-hop 2001:db8:192:168:255::3 set policy-options policy-statement vpn_1_export_v6 term 1 then accept set policy-options policy-statement vpn_1_export_v6 term 2 from route-filter 2001:db8:172:16:3::1/128 exact set policy-options policy-statement vpn_1_export_v6 term 2 then community add color128 set policy-options policy-statement vpn_1_export_v6 term 2 then next-hop 2001:db8:192:168:255::3 set policy-options policy-statement vpn_1_export_v6 term 2 then accept set policy-options policy-statement vpn_2_export term 1 from route-filter 172.16.2.0/24 orlonger set policy-options policy-statement vpn_2_export term 1 then community add color129 set policy-options policy-statement vpn_2_export term 1 then next-hop 192.168.255.3 set policy-options policy-statement vpn_2_export term 1 then accept set policy-options policy-statement vpn_2_export_v6 term 1 from route-filter 2001:db8:172:16:2::/80 orlonger set policy-options policy-statement vpn_2_export_v6 term 1 then community add color129 set policy-options policy-statement vpn_2_export_v6 term 1 then next-hop 2001:db8:192:168:255::3 set policy-options policy-statement vpn_2_export_v6 term 1 then accept set policy-options community color128 members color:0:128 set policy-options community color129 members color:0:129 set policy-options resolution-map map1 mode ip-color set routing-instances vpn1 instance-type vrf set routing-instances vpn1 routing-options rib vpn1.inet6.0 static route 2001:db8:172:16:1::/80 receive set routing-instances vpn1 routing-options static route 172.16.1.0/24 receive set routing-instances vpn1 interface lo0.1 set routing-instances vpn1 route-distinguisher 64512:1 set routing-instances vpn1 vrf-target target:64512:1 set routing-instances vpn1 vrf-table-label set routing-instances vpn2 instance-type vrf set routing-instances vpn2 routing-options rib vpn2.inet6.0 static route 2001:db8:172:16:2::/80 receive set routing-instances vpn2 routing-options static route 172.16.2.0/24 receive set routing-instances vpn2 interface lo0.2 set routing-instances vpn2 route-distinguisher 64512:2 set routing-instances vpn2 vrf-target target:64512:2 set routing-instances vpn2 vrf-table-label set protocols bgp group to-RRv6 type internal set protocols bgp group to-RRv6 local-address 2001:db8:192:168:255::3 set protocols bgp group to-RRv6 family inet6 unicast extended-nexthop-color set protocols bgp group to-RRv6 family inet6-vpn unicast set protocols bgp group to-RRv6 export vpn_1_export_v6 set protocols bgp group to-RRv6 export vpn_2_export_v6 set protocols bgp group to-RRv6 neighbor 2001:db8:192:168:255::2 set protocols bgp group to-RRv6 vpn-apply-export set protocols bgp group to-RR type internal set protocols bgp group to-RR local-address 192.168.255.3 set protocols bgp group to-RR family inet unicast extended-nexthop-color set protocols bgp group to-RR family inet-vpn unicast set protocols bgp group to-RR export vpn_1_export set protocols bgp group to-RR export vpn_2_export set protocols bgp group to-RR neighbor 192.168.255.2 set protocols bgp group to-RR vpn-apply-export set protocols isis interface ge-0/0/0.0 level 2 post-convergence-lfa node-protection set protocols isis interface ge-0/0/0.0 delay-measurement advertisement periodic threshold 100 set protocols isis interface ge-0/0/0.0 point-to-point set protocols isis interface ge-0/0/1.0 level 2 post-convergence-lfa node-protection set protocols isis interface ge-0/0/1.0 delay-measurement advertisement periodic threshold 100 set protocols isis interface ge-0/0/1.0 point-to-point set protocols isis interface ge-0/0/2.0 delay-metric 20000 set protocols isis interface lo0.0 passive set protocols isis source-packet-routing srgb start-label 80000 set protocols isis source-packet-routing srgb index-range 5000 set protocols isis source-packet-routing flex-algorithm 128 set protocols isis source-packet-routing flex-algorithm 129 set protocols isis level 1 disable set protocols isis backup-spf-options use-post-convergence-lfa maximum-backup-paths 8 set protocols isis backup-spf-options use-source-packet-routing set protocols isis traffic-engineering l3-unicast-topology set protocols isis traffic-engineering advertisement always set protocols isis export prefix-sid set protocols mpls admin-groups RED 0 set protocols mpls admin-groups BLUE 1 set protocols mpls icmp-tunneling set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols mpls interface ge-0/0/0.0 admin-group BLUE set protocols mpls interface ge-0/0/1.0 admin-group BLUEset routing-options router-id 192.168.255.3 set routing-options autonomous-system 64512 set routing-options forwarding-table export pplb set routing-options forwarding-table ecmp-fast-reroute set routing-options forwarding-table chained-composite-next-hop ingress l3vpn
逐步过程
-
配置主机名、IPv4、IPv6 地址、环路接口地址、模式等基本设备设置,并在所有 4 个路由器的所有接口上启用 ISO 和 MPLS 协议族。
enhanced-ip
user@PE1# set system host-name PE1 set chassis network-services enhanced-ip set interfaces ge-0/0/0 description To_R1 set interfaces ge-0/0/0 unit 0 family inet address 10.0.1.10/24 set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/0 unit 0 family inet6 address 2001:db8:10:0:1::10/80 set interfaces ge-0/0/0 unit 0 family mpls maximum-labels 16 set interfaces ge-0/0/1 description To_R2 set interfaces ge-0/0/1 unit 0 family inet address 10.0.2.10/24 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family inet6 address 2001:db8:10:0:2::10/80 set interfaces ge-0/0/1 unit 0 family mpls maximum-labels 16 set interfaces lo0 unit 0 family inet address 192.168.255.10/32 set interfaces lo0 unit 0 family inet address 127.0.0.1/32 set interfaces lo0 unit 0 family iso address 49.0001.000a.0a0a.0a00 set interfaces lo0 unit 0 family inet6 address 2001:db8:192:168:255::10/128 set interfaces lo0 unit 1 family inet address 172.16.10.1/32 set interfaces lo0 unit 1 family inet6 address 2001:db8:172:16:10::1/128 set interfaces lo0 unit 2 family inet address 172.16.10.2/32 set interfaces lo0 unit 2 family inet6 address 2001:db8:172:16:10::2/128
-
配置路由器 ID、自治系统 (AS) 编号,将负载平衡导出策略应用到所有路由器上的转发表中,以启用信息流负载平衡。
user@PE1# set routing-options router-id 192.168.255.10 set routing-options autonomous-system 64512 set routing-options forwarding-table export pplb
-
在 PE1 和 PE2 上,配置等价多路径 (ECMP)以启用快速重新路由保护。还要配置链接的复合下一跳跃,以允许路由器将共享相同目标的路由点到一个通用转发下一跳跃。此选项可改进转发信息库 (FIB) 扩展。
user@PE1# set routing-options forwarding-table ecmp-fast-reroute set routing-options forwarding-table chained-composite-next-hop ingress l3vpn
-
在所有MPLS接口上启用协议处理。还支持信息流工程。
user@PE1# set protocols mpls interface fxp0.0 disable set protocols mpls interface all set protocols mpls traffic-engineering
-
在所有路由器上启用 TWAMP 探测。这些探测器支持动态测量每对路由器之间的链路延迟。
user@PE1# set services rpm twamp server authentication-mode none set services rpm twamp server light
-
配置 IS-IS 协议以执行点到点操作(多点链路不支持基于 TWAMP 的延迟测量),并启用节点保护模式以实现所有接口上独立于拓扑的无环路备选路由 (TILFA) 操作。您还可以在环路接口IS-IS被动模式切换,并禁用IS-IS级别 1 以仅对 IS-IS 2 使用。支持具有第 3 层单播拓扑的流量工程,IGP拓扑下载到 TED 中。配置IS-IS以支持 SPRING 路由路径。在 prefix-sid 后续步骤中定义导出策略。此策略用于让本地节点通告其环路地址,并映射至一个或多个 Flex 算法。
user@PE1# set protocols isis level 1 disable set protocols isis interface ge-0/0/0.0 point-to-point set protocols isis interface ge-0/0/0.0 level 2 post-convergence-lfa node-protection set protocols isis interface ge-0/0/1.0 point-to-point set protocols isis interface ge-0/0/1.0 level 2 post-convergence-lfa node-protection set protocols isis interface lo0.0 passive set protocols isis backup-spf-options use-post-convergence-lfa maximum-backup-paths 8 set protocols isis backup-spf-options use-source-packet-routing set protocols isis traffic-engineering l3-unicast-topology set protocols isis traffic-engineering advertisement always set protocols isis export prefix-sid
-
使用IS-IS路由器上所有 IS-IS 接口上的 TWAMP 探测器(P2 和 PE2 之间的链路(此示例使用静态延迟值)来配置动态路由链路延迟测量。
user@PE1# set protocols isis interface ge-0/0/0.0 delay-measurement advertisement periodic threshold 100 set protocols isis interface ge-0/0/1.0 delay-measurement advertisement periodic threshold 100
user@P1# set protocols isis interface ge-0/0/0.0 delay-measurement advertisement periodic threshold 100 set protocols isis interface ge-0/0/1.0 delay-measurement advertisement periodic threshold 100 set protocols isis interface ge-0/0/2.0 delay-measurement advertisement periodic threshold 100
user@P2# set protocols isis interface ge-0/0/0.0 delay-measurement advertisement periodic threshold 100 set protocols isis interface ge-0/0/1.0 delay-measurement advertisement periodic threshold 100 set protocols isis interface ge-0/0/2.0 delay-measurement advertisement periodic threshold 100
user@PE2# set protocols isis interface ge-0/0/0.0 delay-measurement advertisement periodic threshold 100 set protocols isis interface ge-0/0/1.0 delay-measurement advertisement periodic threshold 100
-
配置 P2 和 PE2 之间的链路上的静态延迟指标。
user@P2# set protocols isis interface ge-0/0/2.0 delay-metric 20000
user@PE2# set protocols isis interface ge-0/0/1.0 delay-metric 20000
-
配置 PE1 和 PE2 以支持两个第 3 层 VPN(VPN1 和 VPN2)。
user@PE1# set routing-instances vpn1 instance-type vrf set routing-instances vpn1 interface lo0.1 set routing-instances vpn1 route-distinguisher 64512:1 set routing-instances vpn1 vrf-target target:64512:1 set routing-instances vpn1 vrf-table-label set routing-instances vpn2 instance-type vrf set routing-instances vpn2 interface lo0.2 set routing-instances vpn2 route-distinguisher 64512:2 set routing-instances vpn2 vrf-target target:64512:2 set routing-instances vpn2 vrf-table-label
注意:请注意,PE2 中的路由实例配置了 IPv4 和 IPv6 静态路由。这些路由配置了
receive
选项,以允许您使用 ping 测试连接。如果 IS-IS 3 层 VPN 在 PE 和所连接的设备之间使用动态路由协议,则延迟客户边缘功能。此示例使用静态路由来简化拓扑结构,以便专注于IS-IS延迟优化功能。user@PE2# set routing-instances vpn1 instance-type vrf set routing-instances vpn1 routing-options rib vpn1.inet6.0 static route 2001:db8:172:16:1::/80 receive set routing-instances vpn1 routing-options static route 172.16.1.0/24 receive set routing-instances vpn1 interface lo0.1 set routing-instances vpn1 route-distinguisher 64512:1 set routing-instances vpn1 vrf-target target:64512:1 set routing-instances vpn1 vrf-table-label set routing-instances vpn2 instance-type vrf set routing-instances vpn2 routing-options rib vpn2.inet6.0 static route 2001:db8:172:16:2::/80 receive set routing-instances vpn2 routing-options static route 172.16.2.0/24 receive set routing-instances vpn2 interface lo0.2 set routing-instances vpn2 route-distinguisher 64512:2 set routing-instances vpn2 vrf-target target:64512:2 set routing-instances vpn2 vrf-table-label
-
在 PE1 配置映射策略,以启用 VPN 路由解析,以便根据颜色表匹配BGP前缀。这能让您根据前缀来建立灵活路径转发算法。解析 map1 策略设置为解析
ip-color
模式。注意:在 3 层 VPN 环境中,需要映射策略来选择允许其下一跃点在颜色表中解析的前缀。如果路由只连接扩展了下一跳跃和颜色社区,则除非使用映射策略,否则不会使用配色表。
user@PE1# set policy-options policy-statement vpn1_res_map1 term 1 from route-filter 172.16.1.0/24 orlonger set policy-options policy-statement vpn1_res_map1 term 1 then accept set policy-options policy-statement vpn1_res_map1 term 1 then resolution-map map1 set policy-options policy-statement vpn2_res_map1 term 1 from route-filter 172.16.2.0/24 orlonger set policy-options policy-statement vpn2_res_map1 term 1 then accept set policy-options policy-statement vpn2_res_map1 term 1 then resolution-map map1 set policy-options policy-statement v6vpn1_res_map1 from route-filter 2001:db8:172:16:1::/80 orlonger set policy-options policy-statement v6vpn1_res_map1 then accept set policy-options policy-statement v6vpn1_res_map1 then resolution-map map1 set policy-options policy-statement v6vpn2_res_map1 from route-filter 2001:db8:172:16:2::/80 orlonger set policy-options policy-statement v6vpn2_res_map1 then accept set policy-options policy-statement v6vpn2_res_map1 then resolution-map map1 set policy-options resolution-map map1 mode ip-color
-
在 PE2 配置 VPN 路由导出策略,将所需颜色社区连接到它通告至 PE1 的 VPN 路由(通过路由反射器)。此处有意义的是 VPN1 中的路由如何附加 Flex path 128(优化延迟)的颜色社区,而从 VPN2 播发的路由已连接 129 个颜色社区(优化 IGP 度量)。
user@PE2# set policy-options policy-statement vpn_1_export term 1 from route-filter 172.16.1.0/24 orlonger set policy-options policy-statement vpn_1_export term 1 then community add color128 set policy-options policy-statement vpn_1_export term 1 then next-hop 192.168.255.3 set policy-options policy-statement vpn_1_export term 1 then accept set policy-options policy-statement vpn_2_export term 1 from route-filter 172.16.2.0/24 orlonger set policy-options policy-statement vpn_2_export term 1 then community add color129 set policy-options policy-statement vpn_2_export term 1 then next-hop 192.168.255.3 set policy-options policy-statement vpn_2_export term 1 then accept set policy-options policy-statement vpn_1_export_v6 term 1 from route-filter 2001:db8:172:16:1::/80 orlonger set policy-options policy-statement vpn_1_export_v6 term 1 then community add color128 set policy-options policy-statement vpn_1_export_v6 term 1 then next-hop 2001:db8:192:168:255::3 set policy-options policy-statement vpn_1_export_v6 term 1 then accept set policy-options policy-statement vpn_2_export_v6 term 1 from route-filter 2001:db8:172:16:2::/80 orlonger set policy-options policy-statement vpn_2_export_v6 term 1 then community add color129 set policy-options policy-statement vpn_2_export_v6 term 1 then next-hop 2001:db8:192:168:255::3 set policy-options policy-statement vpn_2_export_v6 term 1 then accept set policy-options community color128 members color:0:128 set policy-options community color129 members color:0:129
-
配置BGP PE 设备和路由反射器之间的对等连接。配置单播网络层可达性信息 (NLRI),以支持 PE 设备上扩展的颜色下一跳跃。启用此选项允许配色社区的路由通过颜色表解析其下一跳跃。没有扩展的下一跳设置路由,配色社区将进行正常的下一跳解析,并且将使用灵活算法路径。
-
您还可以支持 IPv4 和 IPv6 3 层 VPN 单播路由。在 PE1 上,将颜色映射策略作为导入应用,以便它可操作从远程 PE 设备收到的路由。
user@PE1# set protocols bgp group to-RR type internal set protocols bgp group to-RR local-address 192.168.255.10 set protocols bgp group to-RR neighbor 192.168.255.2 set protocols bgp group to-RR family inet unicast extended-nexthop-color set protocols bgp group to-RR family inet-vpn unicast set protocols bgp group to-RR family traffic-engineering unicast set protocols bgp group to-RR import vpn1_res_map1 set protocols bgp group to-RR import vpn2_res_map1 set protocols bgp group to-RRv6 type internal set protocols bgp group to-RRv6 local-address 2001:db8:192:168:255::10 set protocols bgp group to-RRv6 neighbor 2001:db8:192:168:255::2 set protocols bgp group to-RRv6 family inet6 unicast extended-nexthop-color set protocols bgp group to-RRv6 family inet6-vpn unicast set protocols bgp group to-RRv6 import v6vpn1_res_map1 set protocols bgp group to-RRv6 import v6vpn2_res_map1
user@P2# set protocols bgp group to-RR type internal set protocols bgp group to-RR local-address 192.168.255.2 set protocols bgp group to-RR neighbor 192.168.255.10 set protocols bgp group to-RR neighbor 192.168.255.3 set protocols bgp cluster 192.168.255.2 set protocols bgp group to-RR family inet unicast set protocols bgp group to-RR family inet-vpn unicast
在 PE 2 上,您应用导出策略,将所需颜色社区附加到发送至 PE1 的 VPN 路由广告。
vpn-apply-export
PE2 需要选项,以允许导出策略对通告给远程 PE 的 VPN 路由采取行动。user@PE2# set protocols bgp group to-RR type internal set protocols bgp group to-RR local-address 192.168.255.3 set protocols bgp group to-RR neighbor 192.168.255.2 set protocols bgp group to-RR family inet unicast extended-nexthop-color set protocols bgp group to-RR family inet-vpn unicast set protocols bgp group to-RR export vpn_1_export set protocols bgp group to-RR export vpn_2_export set protocols bgp group to-RR vpn-apply-export set protocols bgp group to-RRv6 type internal set protocols bgp group to-RRv6 local-address 2001:db8:192:168:255::3 set protocols bgp group to-RRv6 neighbor 2001:db8:192:168:255::2 set protocols bgp group to-RRv6 family inet6 unicast extended-nexthop-color set protocols bgp group to-RRv6 family inet6-vpn unicast set protocols bgp group to-RRv6 export vpn_1_export_v6 set protocols bgp group to-RRv6 export vpn_2_export_v6 set protocols bgp group to-RRv6 vpn-apply-export
-
定义所有路由器上的按数据包负载均衡策略。
user@PE1# set policy-options policy-statement pplb then load-balance per-packet
-
在所有路由器上使用两个 flex 算法(128 和 129)配置分段路由支持。
user@PE1# set protocols isis source-packet-routing srgb start-label 80000 set protocols isis source-packet-routing srgb index-range 5000 set protocols isis source-packet-routing flex-algorithm 128 set protocols isis source-packet-routing flex-algorithm 129
-
配置所有路由器以通告其环路地址,同时支持 128 和 129 flex 算法。
prefix-segment index
选项可设置每个路由器的环路地址的基本标签。在此例中,IPv4 基本索引和 IPv6 基本索引设置为反映路由器编号。因此 R0 (PE1) 对 IPv4 使用 1000,而 R1 (P1) 使用 1001。user@PE1# set policy-options policy-statement prefix-sid term 1 from route-filter 192.168.255.10/32 exact set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 128 index 1280 set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 129 index 1290 set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 1 then prefix-segment index 1000 set policy-options policy-statement prefix-sid term 1 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 1 then accept set policy-options policy-statement prefix-sid term 2 from route-filter 2001:db8:192:168:255::10/128 exact set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 128 index 4280 set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 129 index 4290 set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 2 then prefix-segment index 4000 set policy-options policy-statement prefix-sid term 2 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 2 then accept
user@P1# set policy-options policy-statement prefix-sid term 1 from route-filter 192.168.255.1/32 exact set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 128 index 1281 set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 129 index 1291 set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 1 then prefix-segment index 1001 set policy-options policy-statement prefix-sid term 1 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 1 then accept set policy-options policy-statement prefix-sid term 2 from route-filter 2001:db8:192:168:255::1/128 exact set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 128 index 4281 set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 129 index 4291 set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 2 then prefix-segment index 4001 set policy-options policy-statement prefix-sid term 2 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 2 then accept
user@P2# set policy-options policy-statement prefix-sid term 1 from route-filter 192.168.255.2/32 exact set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 128 index 1282 set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 129 index 1292 set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 1 then prefix-segment index 1002 set policy-options policy-statement prefix-sid term 1 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 1 then accept set policy-options policy-statement prefix-sid term 2 from route-filter 2001:db8:192:168:255::2/128 exact set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 128 index 4282 set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 129 index 4292 set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 2 then prefix-segment index 4002 set policy-options policy-statement prefix-sid term 2 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 2 then accept
user@PE2# set policy-options policy-statement prefix-sid term 1 from route-filter 192.168.255.3/32 exact set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 128 index 1283 set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 129 index 1293 set policy-options policy-statement prefix-sid term 1 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 1 then prefix-segment index 1003 set policy-options policy-statement prefix-sid term 1 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 1 then accept set policy-options policy-statement prefix-sid term 2 from route-filter 2001:db8:192:168:255::3/128 exact set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 128 index 4283 set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 129 index 4293 set policy-options policy-statement prefix-sid term 2 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 2 then prefix-segment index 4003 set policy-options policy-statement prefix-sid term 2 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 2 then accept
-
在所有路由器上定义 RED 和 BLUE MPLS管理组,并将所需颜色分配给每个接口。您还可以启用 ICMP 隧道,以在基于第 3 层 VPN 的路由MPLS跟踪路由支持。
user@PE1# set protocols mpls admin-groups RED 0 set protocols mpls admin-groups BLUE 1 set protocols mpls icmp-tunneling set protocols mpls interface ge-0/0/0.0 admin-group RED set protocols mpls interface ge-0/0/1.0 admin-group BLUE
user@P1# set protocols mpls admin-groups RED 0 set protocols mpls admin-groups BLUE 1 set protocols mpls icmp-tunneling set protocols mpls interface ge-0/0/0.0 admin-group RED set protocols mpls interface ge-0/0/1.0 admin-group BLUE set protocols mpls interface ge-0/0/2.0 admin-group BLUE
user@P2# set protocols mpls admin-groups RED 0 set protocols mpls admin-groups BLUE 1 set protocols mpls icmp-tunneling set protocols mpls interface ge-0/0/0.0 admin-group BLUE set protocols mpls interface ge-0/0/1.0 admin-group BLUE set protocols mpls interface ge-0/0/2.0 admin-group BLUE
user@PE2# set protocols mpls admin-groups RED 0 set protocols mpls admin-groups BLUE 1 set protocols mpls icmp-tunneling set protocols mpls interface ge-0/0/0.0 admin-group BLUE set protocols mpls interface ge-0/0/1.0 admin-group BLUE
-
在层次结构下配置入口 PE 设备 (PE1) 中的
routing-options
FAD。在这种情况下,您可分配 flex 算法 128,以便基于 和delay-metric
129 优化路径,以在 上优化igp-metric
。在此例中,flex 算法 128 必须仅采用蓝色路径,而 Flex 算法 129 可采用蓝色或红色路径。此示例仅针对从 PE1 到 PE2 的转发路径来定义 PE1 上的 FAD。要支持双向灵活路径转发,您需要在 PE2 设备上定义所需的 FAD。P 路由器不需要一个一个 FAD 定义,因为一些入口节点在计算到出口节点的路径时,该一部分只能由该入口节点使用。
user@PE1# set routing-options flex-algorithm 128 definition metric-type delay-metric set routing-options flex-algorithm 128 definition spf set routing-options flex-algorithm 128 definition admin-group include-any BLUE set routing-options flex-algorithm 129 definition metric-type igp-metric set routing-options flex-algorithm 129 definition spf set routing-options flex-algorithm 129 definition admin-group include-any RED set routing-options flex-algorithm 129 definition admin-group include-any BLUE
-
从
commit
配置模式输入 到 。
结果
检查配置结果:
user@PE1# show interfaces
ge-0/0/0 { description To_R1; unit 0 { family inet { address 10.0.1.10/24; } family iso; family inet6 { address 2001:db8:10:0:1::10/80; } family mpls { maximum-labels 16; } } } ge-0/0/1 { description To_R2; unit 0 { family inet { address 10.0.2.10/24; } family iso; family inet6 { address 2001:db8:10:0:2::10/80; } family mpls { maximum-labels 16; } } } lo0 { unit 0 { family inet { address 192.168.255.10/32; address 127.0.0.1/32; } family iso { address 49.0001.000a.0a0a.0a00; } family inet6 { address 2001:db8:192:168:255::10/128; } } unit 1 { family inet { address 172.16.10.1/32; } family inet6 { address 2001:db8:172:16:10::1/128; } } unit 2 { family inet { address 172.16.10.2/32; } family inet6 { address 2001:db8:172:16:10::2/128; } } }
user@PE1# show policy-options
policy-statement pplb { then { load-balance per-packet; } } policy-statement prefix-sid { term 1 { from { route-filter 192.168.255.10/32 exact; } then { prefix-segment { algorithm 128 index 1280 node-segment; algorithm 129 index 1290 node-segment; index 1000; node-segment; } accept; } } term 2 { from { route-filter 2001:db8:192:168:255::10/128 exact; } then { prefix-segment { algorithm 128 index 4280 node-segment; algorithm 129 index 4290 node-segment; index 4000; node-segment; } accept; } } } policy-statement v6vpn1_res_map1 { from { route-filter 2001:db8:172:16:1::/80 orlonger; } then { accept; resolution-map map1; } } policy-statement v6vpn2_res_map1 { from { route-filter 2001:db8:172:16:2::/80 orlonger; } then { accept; resolution-map map1; } } policy-statement vpn1_res_map1 { term 1 { from { route-filter 172.16.1.0/24 orlonger; } then { accept; resolution-map map1; } } } policy-statement vpn2_res_map1 { term 1 { from { route-filter 172.16.2.0/24 orlonger; } then { accept; resolution-map map1; } } } resolution-map map1 { mode ip-color; }
user@PE1# show protocols
bgp { group to-RRv6 { type internal; local-address 2001:db8:192:168:255::10; import [ v6vpn1_res_map1 v6vpn2_res_map1 ]; family inet6 { unicast { extended-nexthop-color; } } family inet6-vpn { unicast; } neighbor 2001:db8:192:168:255::2; } group to-RR { type internal; local-address 192.168.255.10; import [ vpn1_res_map1 vpn2_res_map1 ]; family inet { unicast { extended-nexthop-color; } } family inet-vpn { unicast; } family traffic-engineering { unicast; } neighbor 192.168.255.2; } } isis { interface ge-0/0/0.0 { level 2 { post-convergence-lfa { node-protection; } } delay-measurement { advertisement { periodic { threshold 100; } } } point-to-point; } interface ge-0/0/1.0 { level 2 { post-convergence-lfa { node-protection; } } delay-measurement { advertisement { periodic { threshold 100; } } } point-to-point; } interface lo0.0 { passive; } source-packet-routing { srgb start-label 80000 index-range 5000; flex-algorithm [ 128 129 ]; } level 1 disable; backup-spf-options { use-post-convergence-lfa maximum-backup-paths 8; use-source-packet-routing; } traffic-engineering { l3-unicast-topology; advertisement always; } export prefix-sid; } mpls { traffic-engineering; admin-groups { RED 0; BLUE 1; } icmp-tunneling; interface all; interface fxp0.0 { disable; } interface ge-0/0/0.0 { admin-group RED; } interface ge-0/0/1.0 { admin-group BLUE; } }
user@PE1# show routing-options
flex-algorithm 128 { definition { metric-type delay-metric; spf; admin-group include-any BLUE; } } flex-algorithm 129 { definition { metric-type igp-metric; spf; admin-group include-any [ RED BLUE ]; } } router-id 192.168.255.10; autonomous-system 64512; forwarding-table { export pplb; ecmp-fast-reroute; chained-composite-next-hop { ingress { l3vpn; } } }
user@PE1# show routing-instances
vpn1 { instance-type vrf; interface lo0.1; route-distinguisher 64512:1; vrf-target target:64512:1; vrf-table-label; } vpn2 { instance-type vrf; interface lo0.2; route-distinguisher 64512:2; vrf-target target:64512:2; vrf-table-label; }
user@PE1# show services rpm
twamp { server { authentication-mode none; light; } }
验证
验证IS-IS邻接
验证IS-IS数据库
目的
验证服务数据库中是否包含链路IS-IS参数。
行动
使用 show isis database extensive | match delay
操作命令。
user@PE1> show isis database extensive | match delay
Unidirectional link delay: 1041 Min unidirectional link delay: 841 Max unidirectional link delay: 1885 Unidirectional delay variation: 71 Unidirectional link delay: 2469 Min unidirectional link delay: 766 Max unidirectional link delay: 15458 Unidirectional delay variation: 129 Unidirectional link delay: 20000 Min unidirectional link delay: 20000 Max unidirectional link delay: 20000 Unidirectional delay variation: 20000 Unidirectional link delay: 1272 Min unidirectional link delay: 628 Max unidirectional link delay: 3591 Unidirectional delay variation: 1559 Unidirectional link delay: 8470 Min unidirectional link delay: 855 Max unidirectional link delay: 52934 Unidirectional delay variation: 7900 Unidirectional link delay: 5736 Min unidirectional link delay: 3650 Max unidirectional link delay: 7946 Unidirectional delay variation: 4416 Unidirectional link delay: 2312 Min unidirectional link delay: 740 Max unidirectional link delay: 14227 Unidirectional delay variation: 3144 Unidirectional link delay: 1233 Min unidirectional link delay: 711 Max unidirectional link delay: 2833 Unidirectional delay variation: 366 Unidirectional link delay: 928 Min unidirectional link delay: 844 Max unidirectional link delay: 1042 Unidirectional delay variation: 143 Unidirectional link delay: 7570 Min unidirectional link delay: 761 Max unidirectional link delay: 61926 Unidirectional delay variation: 27290
意义
输出显示与拓扑中各种接口相关联的动态延迟。输出的突出显示部分指定了在 P2 到 PE2 链路上配置的 20000 微秒的静态延迟。静态配置的延迟值明显高于任何动态延迟测量值。这种大型延迟的配置使网络能够轻松预测延迟优化的蓝色路径。
验证BGP对等互连
目的
验证两个 PES 是否成功建立了与路由反射器的 IPv4 和 IPv6 对等互连会话。
行动
使用 show bgp summary
操作命令。在这种情况下,我们在路由反射器 P2(路由反射器)上运行命令,因为它提供了一个方便的位置,用于确认两个 PES 都使用单个命令的对等会话。
user@P2 show bgp summary
Threading mode: BGP I/O Default eBGP mode: advertise - accept, receive - accept Groups: 2 Peers: 4 Down peers: 0 Table Tot Paths Act Paths Suppressed History Damp State Pending inet6.0 0 0 0 0 0 0 bgp.l3vpn-inet6.0 6 6 0 0 0 0 inet.0 0 0 0 0 0 0 bgp.l3vpn.0 6 6 0 0 0 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped... 192.168.255.3 64512 2511 2489 0 0 18:49:42 Establ inet.0: 0/0/0/0 bgp.l3vpn.0: 4/4/4/0 192.168.255.10 64512 2511 2491 0 0 18:49:46 Establ inet.0: 0/0/0/0 bgp.l3vpn.0: 2/2/2/0 2001:db8:192:168:255::3 64512 2512 2490 0 0 18:49:46 Establ inet6.0: 0/0/0/0 bgp.l3vpn-inet6.0: 4/4/4/0 2001:db8:192:168:255::10 64512 2510 2490 0 0 18:49:42 Establ inet6.0: 0/0/0/0 bgp.l3vpn-inet6.0: 2/2/2/0
意义
输出将确认所有BGP对等会话已正确建立。显示屏还确认 3 层 VPN 路由正在通过这些对等会话播发/学习。
验证 VPN 路由上的颜色社区
目的
验证 PE2 通告的 VPN 路由是否与颜色社区正确标记。
行动
使用 show route detail <prefix> table <table-name>
PE1 上的操作命令显示有关从 PE2 学习到的 3 层 VPN 路由的详细信息。
user@PE1 show route detail 172.16.1.0 table vpn1
vpn1.inet.0: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden) 172.16.1.0/24 (1 entry, 1 announced) *BGP Preference: 170/-101 Route Distinguisher: 64512:1 Next hop type: Indirect, Next hop index: 0 Address: 0xc5b9d5c Next-hop reference count: 3 Source: 192.168.255.2 Next hop type: Router, Next hop index: 0 Next hop: 10.0.2.2 via ge-0/0/1.0 weight 0x1, selected Label operation: Push 81282 Label TTL action: prop-ttl Load balance label: Label 81282: None; Label element ptr: 0xcbf1440 Label parent element ptr: 0x0 Label element references: 2 Label element child references: 0 Label element lsp id: 0 Session Id: 0x0 Protocol next hop: 192.168.255.3-128<c> Label operation: Push 16 Label TTL action: prop-ttl Load balance label: Label 16: None; Composite next hop: 0xbd50440 665 INH Session ID: 0x0 Indirect next hop: 0xc74e684 1048588 INH Session ID: 0x0 State: <Secondary Active Int Ext ProtectionCand> Local AS: 64512 Peer AS: 64512 Age: 19:10:35 Metric2: 2204 Validation State: unverified ORR Generation-ID: 0 Task: BGP_64512.192.168.255.2 Announcement bits (1): 0-KRT AS path: I (Originator) Cluster list: 192.168.255.2 Originator ID: 192.168.255.3 Communities: target:64512:1 color:0:128 Import Accepted VPN Label: 16 Localpref: 100 Router ID: 192.168.255.2 Primary Routing Table: bgp.l3vpn.0 Thread: junos-main
意义
输出确认 VPN1 路由实例中的 VPN 前缀已连接颜色 color:0:128
公共组。此外,您还可以确认此路由的协议下一跳跃是 PE2 路由器的回环地址,下一跳跃可索引色表中的匹配条目。
虽然未显示,但是您可对 VPN2 表中的前缀重复此命令。您可看到这些路由已 color:0:129
连接
验证 inetcolor.0 路由表
目的
验证路由表已正确填充显示 128 和 129 flex 算法支持的所有路由器 inetcolor.0
ID(回环地址)。
通过表支持 IPv6 inet6color.0
路由。您可对 IPv4 配色表使用本部分中所示的方法验证此表。
行动
使用 show route table inetcolor.0
操作命令。
user@PE1> show route table inetcolor.0
inetcolor.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 192.168.255.1-128<c>/64 *[L-ISIS/14] 6d 14:40:37, metric 1527 > to 10.0.2.2 via ge-0/0/1.0, Push 81281 192.168.255.1-129<c>/64 *[L-ISIS/14] 6d 14:40:35, metric 10 > to 10.0.1.1 via ge-0/0/0.0 to 10.0.2.2 via ge-0/0/1.0, Push 81291 192.168.255.2-128<c>/64 *[L-ISIS/14] 6d 14:40:40, metric 761 > to 10.0.2.2 via ge-0/0/1.0 192.168.255.2-129<c>/64 *[L-ISIS/14] 6d 14:40:35, metric 10 > to 10.0.2.2 via ge-0/0/1.0 to 10.0.1.1 via ge-0/0/0.0, Push 81292 192.168.255.3-128<c>/64 *[L-ISIS/14] 6d 14:40:37, metric 2382 > to 10.0.2.2 via ge-0/0/1.0, Push 81283 192.168.255.3-129<c>/64 *[L-ISIS/14] 6d 14:40:35, metric 20 > to 10.0.1.1 via ge-0/0/0.0, Push 81293 to 10.0.2.2 via ge-0/0/1.0, Push 81293
意义
输出显示路由表中的 inetcolor.0
路由。突出显示的部分表示两个路由源自 PE2。路由 192.168.255.3-128<c>
只有一个可能的路径,将接口作为下一跃点 ge-0/0/1.0
采用 P2。提醒一下,128 flex 算法必须使用蓝色链路,从 PE1 的角度考虑,它只会将蓝色接口作为 ge-0/0/1
可行路径。
相反,的路由能够在到 P1 和 到 P2 的接口上 192.168.255.3-129<c>
ge-0/0/0.0
ge-0/0/1.0
均衡负载。提醒一下,此 Flex 算法路径可以采用蓝色或红色的任何路径,因此在转发至其关联目标时可使用其任一接口。
验证 TWAMP 操作
目的
验证 TWAMP 探测是否在配置了动态链路延迟的路由器之间运行。
行动
使用 show services rpm twamp client
操作模式命令。
user@PE1> show services rpm twamp client
Connection Session Sender Sender Reflector Reflector Name Name address port address port __r__8 __r__9 10.0.1.10 56570 10.0.1.1 862 __r__10 __r__11 10.0.2.10 64074 10.0.2.2 862
意义
输出的突出显示部分表示 PE1 有两个 TWAMP 邻接方:P2 (10.0.1.2) 和 P1 (10.0.1.1)。
如果需要,请使用 show services rpm twamp client probe-results
操作模式命令查看当前和历史延迟测量值。
user@PE1> show services rpm twamp client probe-results
root@PE1# run show services rpm twamp client probe-results Owner: __r__12, Test: __r__13 TWAMP-Server-Status: Light, Number-Of-Retries-With-TWAMP-Server: 0 Reflector address: 10.0.2.2, Reflector port: 862, Sender address: 10.0.2.10, sender-port: 57270 Test size: 10 probes Probe results: Response received Probe sent time: Thu May 6 14:43:26 2021 Probe rcvd/timeout time: Thu May 6 14:43:26 2021 Rtt: 1931 usec, Egress jitter: 259 usec, Ingress jitter: 96 usec, Round trip jitter: 353 usec Egress interarrival jitter: 5489 usec, Ingress interarrival jitter: 855 usec, Round trip interarrival jitter: 6076 usec Results over current test: Probes sent: 8, Probes received: 8, Loss percentage: 0.000000 Measurement: Round trip time Samples: 8, Minimum: 1576 usec, Maximum: 13289 usec, Average: 6100 usec, Peak to peak: 11713 usec, Stddev: 4328 usec, Sum: 48797 usec Measurement: Ingress delay Samples: 2, Minimum: 8466 usec, Maximum: 8488 usec, Average: 8477 usec, Peak to peak: 22 usec, Stddev: 11 usec, Sum: 16954 usec Measurement: Egress delay Samples: 2, Minimum: 118 usec, Maximum: 4801 usec, Average: 2460 usec, Peak to peak: 4683 usec, Stddev: 2342 usec, Sum: 4919 usec Measurement: Positive egress jitter Samples: 4, Minimum: 259 usec, Maximum: 11250 usec, Average: 4465 usec, Peak to peak: 10991 usec, Stddev: 4225 usec, Sum: 17859 usec Measurement: Negative egress jitter Samples: 4, Minimum: 201 usec, Maximum: 6564 usec, Average: 4467 usec, Peak to peak: 6363 usec, Stddev: 2566 usec, Sum: 17869 usec Measurement: Positive ingress jitter Samples: 5, Minimum: 96 usec, Maximum: 4954 usec, Average: 1431 usec, Peak to peak: 4858 usec, Stddev: 1843 usec, Sum: 7155 usec Measurement: Negative ingress jitter Samples: 3, Minimum: 202 usec, Maximum: 4990 usec, Average: 2340 usec, Peak to peak: 4788 usec, Stddev: 1988 usec, Sum: 7021 usec Measurement: Positive round trip jitter Samples: 4, Minimum: 353 usec, Maximum: 11585 usec, Average: 5827 usec, Peak to peak: 11232 usec, Stddev: 4797 usec, Sum: 23309 usec Measurement: Negative round trip jitter Samples: 4, Minimum: 2056 usec, Maximum: 9734 usec, Average: 5831 usec, Peak to peak: 7678 usec, Stddev: 2776 usec, Sum: 23325 usec Results over last test: . . .
验证路由解析
目的
通过预期的 flex 算法路径验证 VPN1 和 VPN2 解析的路由。
行动
使用 show route
操作模式命令。
user@PE1> show route 172.16.1.0
inet.0: 18 destinations, 18 routes (17 active, 0 holddown, 1 hidden) + = Active Route, - = Last Active, * = Both . . . vpn1.inet.0: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 172.16.1.0/24 *[BGP/170] 6d 16:32:32, localpref 100, from 192.168.255.2 AS path: I, validation-state: unverified > to 10.0.2.2 via ge-0/0/1.0, Push 16, Push 81287(top)
user@PE1> show route 172.16.2.0
inet.0: 18 destinations, 18 routes (17 active, 0 holddown, 1 hidden) + = Active Route, - = Last Active, * = Both. . . vpn2.inet.0: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 172.16.2.0/24 *[BGP/170] 6d 16:36:02, localpref 100, from 192.168.255.2 AS path: I, validation-state: unverified to 10.0.1.1 via ge-0/0/0.0, Push 17, Push 81297(top) > to 10.0.2.2 via ge-0/0/1.0, Push 17, Push 81297(top)
意义
突出显示的输出表示,在 PE1 设备上,VPN1 的 172.16.1.0 路由仅使用蓝色路径的一个 128,这使得 P1 (10.0.2.2) 成为其下一跳跃,而 VPN2 的路由则 172.16.2.0 使用 FAD 129,这意味着它可以将红色路径通过 ge-0/0/0.0 接口进入 P1>PE2,或者通过 ge-0/0/1.0 接口进入 P2> PE2。IPv6 路由也是如此,如 VPN1 所示:
user@PE1> show route 2001:db8:172:16:1::/80
vpn1.inet6.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 2001:db8:172:16:1::/80 *[BGP/170] 01:26:27, localpref 100, from 2001:db8:192:168:255::2 AS path: I, validation-state: unverified > to fe80::5668:a5ff:fed1:21d9 via ge-0/0/1.0, Push 16, Push 84287(top)
来自 VPN1 的 IPv6 路由解析到与 IPv4 对应的转发路径,这很有意义,因为它们均使用 flex 算法 128 来强制使用具有延迟优化的蓝色链路。请回忆一下,您配置了 PE2(这些路由的来源)来为 IPv4 路由使用 1287 的标签库,对 IPv6 路由使用 4287 的标签库,对 source-packet-routing srgb start-label
8000 使用标签库。因此,来自 VPN1 的 IPv4 路由的标签为 81287,而来自 VPN1 的 IPv6 路由使用 84287。
验证转发路径
目的
验证 VPN1 和 VPN2 的路由是否通过预期的 Flex 算法路径转发。
行动
使用 和 操作模式命令验证可达性,以及确认 PE1 在以 PE2 形式向 VPN 目标发送流量时所使用的 ping
trace route
IPv4 转发路径。
使用在 PE2 接收下一跳跃的静态路由允许您对远程路由执行 ping 操作。但是,您可以预期跟踪路由的最后一跳超时,因为当针对 IPv4 静态接收路由时,不支持追踪路由处理。
user@PE1> ping 172.16.1.0 routing-instance vpn1 count 2
PING 172.16.1.0 (172.16.1.0): 56 data bytes 64 bytes from 172.16.1.0: icmp_seq=0 ttl=63 time=6.617 ms 64 bytes from 172.16.1.0: icmp_seq=1 ttl=63 time=33.849 ms --- 172.16.1.0 ping statistics --- 2 packets transmitted, 2 packets received, 0% packet loss round-trip min/avg/max/stddev = 6.617/20.233/33.849/13.616 ms
user@PE1> traceroute 172.16.1.0 routing-instance vpn1 no-resolve
traceroute to 172.16.1.0 (172.16.1.0), 30 hops max, 52 byte packets 1 10.0.2.2 (10.0.2.2) 4.729 ms 4.698 ms 4.559 ms MPLS Label=81282 CoS=0 TTL=1 S=0 MPLS Label=16 CoS=0 TTL=1 S=1 2 10.0.12.1 (10.0.12.1) 8.524 ms 7.780 ms 4.338 ms MPLS Label=81282 CoS=0 TTL=1 S=0 MPLS Label=16 CoS=0 TTL=2 S=1 3 * * * *^C user@PE1>
user@PE1> ping 172.16.2.0 routing-instance vpn1 count 2
PING 172.16.2.0 (172.16.2.0): 56 data bytes 64 bytes from 172.16.2.0: icmp_seq=0 ttl=63 time=31.723 ms 64 bytes from 172.16.2.0: icmp_seq=1 ttl=63 time=3.873 ms --- 172.16.2.0 ping statistics --- 2 packets transmitted, 2 packets received, 0% packet loss round-trip min/avg/max/stddev = 3.873/17.798/31.723/13.925 ms
user@PE1> traceroute 172.16.2.0 routing-instance vpn2 no-resolve
traceroute to 172.16.2.0 (172.16.2.0), 30 hops max, 52 byte packets 1 10.0.1.1 7.102 ms 8.746 ms 7.820 ms MPLS Label=81292 CoS=0 TTL=1 S=0 MPLS Label=17 CoS=0 TTL=1 S=1 2 * * * *^C user@PE1>
意义
输出表示使用了预期的转发路径。例如,VPN1 中 172.16.1.0/24 路由的跟踪路由显示已使用蓝色路径,并且避免了 P2 和 PE2 之间的高延迟链路。如果 Flex 算法减少了端到端路径延迟,则确认其首选是具有额外跳跃的路径。在这种情况下,使用 P2 和 P1 之间的 10.0.12.0 链路,同时避免 P2 和 PE2 之间的直接链路。
相比之下,与 VPN2 和 flex 算法 129 关联的 172.16.2.0/24 路由采用的路径可以在 PE1 和 PE2 之间采用任一直接路径。在这种情况下,转发路径为从 PE1 到 P1,然后是到达目标 (PE2),其中标出了最后一跳时间。对于指向路由器的路由(与此示例中使用的静态接收路由客户边缘,不会在最后一跳上超时。
虽然此处没有展示简洁性,但您可根据 IPv6 VPN 路由是否映射到 flex 算法 128 或 129 来为跟踪路由提供相同的转发路径,这个例子分别表示与 VPN1 和 VPN2 关联。