如何在 IS-IS 中启用链路延迟测量和广告
了解 IS-IS 中的链路延迟测量和广告
IS-IS 中的链路延迟测量和广告的优势
IS-IS 中的链路延迟测量和广告具有以下优势:
- 对于某些网络(如股票市场数据提供商)非常有益,因此必须实时访问市场数据,使交易比竞争对手更快。这就是网络性能标准或延迟对于数据路径选择至关重要的地方。
- 有助于以经济高效且可扩展的方式根据性能数据(如延迟)做出路径选择决策。
- 使用跃点计数或成本等指标作为路由指标的出色替代方案。
IS-IS 中的链路延迟测量和广告概述
网络性能是通过使用 TWAMP -Light 来衡量的。从 Junos OS 21.1R1 版开始,您可以使用探测消息来测量 IP 网络中的各种性能指标。IS-IS 流量工程扩展有助于以可扩展方式分发网络性能信息。然后,此信息可用于根据网络性能做出路径选择决策。
边界网关协议链路状态 (BGP-LS) 允许 BGP 携带从 IGP 获取的链路状态信息,然后,互联网服务提供商 (ISP) 可以通过正常的 BGP 对等互连选择性地与其他 ISP、服务提供商、CDN 等公开信息。新的 BGP 链路状态 (BGP-LS) TLV 被定义为承载 IGP 流量工程指标扩展。
下图描述了由核心、城域和接入网络组成的网络中的最低 IGP 指标和最小延迟指标。

在这种情况下,核心网络更便宜,但延迟更长。延迟最低的访问捷径成本很高。由于核心网络成本更低,因此大部分流量通常通过使用最小 IGP 指标从 1>2>3>4>5> 到 6。如场景 a 所示,您可以通过运行 IS-IS(配置适当的成本并将默认 IS-IS 算法设置为零)来实现最低 IGP 要求。在超低延迟至关重要的企业中,数据包需要从 1 到 6。如场景 b 中所示,您可以通过定义具有最小延迟的 IS-IS flex 算法来达到最小延迟指标,从而将端点的延迟降至最低。此 flex 算法仅包含节点 1 和节点 6。
示例:通过第 3 层虚拟专用网络 (VPN) 中的网络中的源数据包路由 (SPRING) 启用 IS-IS 链路延迟
此示例说明如何在 L3 VPN 场景中使用 SPRING 配置 IS-IS 链路延迟。在此示例中,您可以在 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 中使用了静态路由。这样就不需要 CE 设备和 PE-CE 路由协议(如 EBGP)。
您的目标是配置网络,以便 PE2 为 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 指标中继传统路径优化。优化路径以降低延迟可以极大地改善实时语音和视频等应用。它还可以实现对金融市场数据的高性能访问,其中毫秒可以转化为重大的收益或损失。
从 Junos OS 21.1R1 版开始,您可以在 IP 网络中启用 IS-IS 链路延迟。您可以使用默认的 IS-IS 算法 (0) 以适当的链路成本配置 IS-IS,从而实现最小 IGP 指标路径。这样做可以严格基于链路指标之和来优化到端点的路径。通过使用 IS-IS 延迟 flex 算法,您可以根据路径的端到端延迟来优化路径。
可以使用双向主动测量探针 (TWAMP) 动态测量链路延迟。然后,路由器为其链路延迟参数泛洪。区域内的路由器将这些参数存储在共享链路状态数据库 (LSDB) 中。入口节点针对 LSDB 运行 SPF 算法,以计算针对各种属性(如链路颜色、IGP 指标、流量工程 (TE) 指标或此示例所示的链路延迟)优化的路径。
出口路由器通过将关联的颜色社区连接到通过 BGP 播发的路由,发出需要哪个 flex 算法的信号。在发送端(接收远程 PE 播发的标记路由的本地 PE),这些颜色社区用于将颜色表索引到一个颜色表中,用于将远程协议下一跃点(PE 的环路地址)解析为 flex 算法标识符。在第 3 层 VPN 的上下文中,入口节点使用颜色映射策略,以选择应通过颜色表解析哪些前缀的下一跃点。
然后,本地 PE 使用其本地 Flex 算法定义 (FAD) 将 flex 算法标识符映射到一组路径选择标准中,例如“使用蓝色链路并针对延迟进行优化”。入口 PE 根据 LSDB 中的值计算最优路径,将相关的 MPLS 标签堆栈推送到数据包上,并将其发送至关联的下一跃点。这就产生了使用 IS-IS 作为信令协议的流量设计的 MPLS 路径。
配置
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 地址、环路接口地址、
enhanced-ip
模式,并在所有 4 个路由器的所有接口上启用 ISO 和 MPLS 协议家族。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 接口上使用 TWAMP 探测器(P2 和 PE2 之间的链路除外,在此示例中使用静态延迟值),配置动态 IS-IS 链路延迟测量。
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 测试连接。如果第 3 层 VPN 在 PE 和所连接的 CE 设备之间使用动态路由协议,则 IS-IS 延迟功能的操作方式相同。在此示例中,我们使用静态路由来保持拓扑简单,以便将重点放在 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 颜色表进行匹配。这允许您基于每个前缀来唤起 flex 路径转发算法。解析 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 路径 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
-
配置 PE 设备和路由反射器之间的 BGP 对等互连。配置单播网络层可达性信息 (NLRI),以支持 PE 设备上的扩展颜色下一跃点。启用此选项后,带有颜色社区的路由可以通过颜色表解析下一跃点。如果没有扩展的下一跃点设置路由,色群将经历正常的下一跃点解析,并且不会使用 flex 算法路径。
-
您还可以启用对 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 隧道,以在基于 MPLS 的第 3 层 VPN 环境中支持追踪路由。
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
-
在层次结构下的
routing-options
入口 PE 设备 (PE1) 上配置 FAD。在这种情况下,您分配 flex 算法 128 以基于delay-metric
和 129 优化igp-metric
路径。在此示例中,flex 算法 128 只能采用蓝色路径,而 flex 算法 129 可以采用蓝色或红色路径。在此示例中,仅在 PE1 上定义 FAD,因为我们仅关注从 PE1 到 PE2 的转发路径。要支持双向 flex 路径转发,您需要在 PE2 设备上定义所需的 FAD。P 路由器不需要 FAD 定义,因为只有入口节点在计算出口节点的路径时才会使用 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 上运行命令,因为它提供了一个方便的位置,可以使用单个命令确认来自两个 SE 的两个对等会话。
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 路由表
目的
验证 inetcolor.0
路由表是否正确填充了所有路由器 ID(环路地址),显示对 128 和 129 flex 算法的支持。
此 inet6color.0
表支持 IPv6 路由。您可以使用与本部分 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
接口作为一个可行的路径。
相比之下,路由 192.168.255.3-129<c>
能够同时通过 ge-0/0/0.0
接口到 P1 和 P2 实现 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: . . .
验证路由解析
目的
验证 VPN1 和 VPN2 通过预期的 flex 算法路径解析的路由。
行动
使用 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 路由使用 FAD 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 算法路径转发。
行动
使用 ping
和 trace route
操作模式命令验证可访问性,并确认 PE1 在将流量以 PE2 发送到 VPN 目标时使用的 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 之间的直接链路。
相比之下,为 172.16.2.0/24 路由采用的路径(与 VPN2 和 flex 算法 129 相关联)能够采用 PE1 和 PE2 之间的任一直接路径。在这种情况下,转发路径是从 PE1 到 P1,然后是目标 (PE2),如上一个跃点超时。对于指向 CE 设备的路由(与此示例中使用的静态接收路由相反),不会在最后一跃点上发生此超时。
虽然此处没有为简洁起见,但您希望为 IPv6 VPN 路由提供相同的转发路径,具体取决于这些路由是映射到 flex 算法 128 还是 129,这在本例中分别表示与 VPN1 和 VPN2 相关联。