基于应用程序的多路径路由
基于应用程序的多路径路由概述
视频和语音流量对丢包、延迟和抖动十分敏感。丢包直接会导致语音和视频通话质量下降。语音或视频通话。
为了确保及时交付这些敏感应用程序流量,SRX 系列设备支持基于应用程序的多路径路由(在本文档中也称为多路径路由),以便发送设备能够创建数据包副本,并通过两个或多个 WAN 链路发送每个副本。
多路径根据 SLA 配置识别两个或多个路径,并在所有已识别的路径上发送原始流量的副本。
另一方面,在收到的数据包的多个副本中,接收设备选择第一个收到的数据包,并丢弃后续的数据包。在接收设备上,当数据包的副本正在进行中时,多路径会计算组合链路的抖动和数据包丢失,然后估算单个链路上相同流量的抖动和丢包情况。您可以比较使用组合链路而不是用于流量的单个链路时数据包丢失的减少情况。
发送应用程序流量的多个副本可确保在发生丢包或延迟时,另一个链路仍可能将数据包发送到端点。
SRX 系列设备支持基于应用程序的多路径路由,从 Junos OS 15.1X49-D160 版开始,以独立模式运行。
SRX 系列设备支持基于应用程序的多路径路由,从 Junos OS 19.2R1 版和 Junos OS 15.1X49-D170 版开始,机箱群集模式。
多路径路由利用以下功能:
-
来自深度包检测 (DPI) 的应用程序识别详细信息
-
用于数据包转发功能的 APBR 功能
-
用于 SLA 关联的 AppQoE 服务。
支持的用例
-
SD-WAN 中心辐射型拓扑
-
SD-WAN 网格拓扑
限制
-
所有选定 WAN 链路都必须是目标的 ECMP 路径。
-
需要成为多路径路由会话一部分的所有选定 WAN 接口都必须属于一个单一区域
-
仅在两台书端安全设备之间支持多路径路由功能。
多路径路由的优势
-
SD-WAN 用例中的多路径支持通过减少丢包、加快数据包交付以及减少抖动来增强应用程序体验,从而为流量(尤其是语音和视频流量)提供更优质的服务质量。
了解多路径路由中的工作流程
应用多路径路由涉及以下顺序:
-
Junos OS 应用程序标识可识别应用程序,一旦识别出应用程序,其信息将保存在应用程序系统缓存 (ASC) 中。
-
基于应用程序策略的路由 (APBR) 查询应用程序系统缓存 (ASC) 模块,以获取应用程序属性的详细信息。
-
APBR 使用应用程序详细信息在 APBR 配置文件(应用程序配置文件)中查找匹配规则。如果找到匹配规则,流量将重定向到指定的路由实例,以便进行路由查找。
-
AppQoE 检查会话是否启用了 SLA。如果会话是 SLA 测量的候选会话,并且配置了多路径路由,则触发多路径路由。
-
根据 SLA 规则,多路径路由获取需要执行数据包复制的底层链路类型和相应的叠加。可以根据 SLA 规则的配置触发多路径路由。在特定应用程序的 SLA 规则中配置多路径路由时,将针对该应用匹配 SLA 规则的应用程序的所有会话禁用 AppQoE 功能。
-
根据应用程序流量和配置的带宽限制,多路径会识别两条或更多条路径,并在所有已识别的路径上触发原始流量的副本。多路径路由路径选择在叠加路径上完成。限制带宽的参数基于底层链路速度,选择基于链路类型。
-
在接收设备上,当数据包的副本正在进行中时,多路径会计算组合链路的抖动和数据包丢失,然后估算单个链路上相同流量的抖动和丢包情况。
-
在接收设备上,多路径路由接受通过不同链路到达的会话的数据包,保持到达不同 CoS 队列的数据包序列,并丢弃任何重复数据包。
多路径路由会将属于规则的所有链路上的数据包复制,直至达到带宽限制。带宽限制是根据为该规则识别的最小链路速度计算得出的。这适用于与多路径路由规则匹配的所有应用程序的所有会话。达到限制后,多路径路由将停止数据包复制,并在多路径路由配置中的“最大时间等待”选项中配置的时间段内启动计时器。计时器到期后,会再次重新启动数据包复制。
AMR 改进
从 Junos OS 21.2R1 版开始,AMR 引入了以下增强功能:
- 反向流量的 AMR 支持
- 无序数据包的排队机制
- APBR 配置文件的 AMR 支持
- 链路选择
- 在 SLA 违规模式或独立模式下的 AMR
- 支持 IPv6 流量
- 支持基于 IPsec 的 AMR 和通用路由封装 (GRE) 会话
反向流量的 AMR 支持
您可以在反向流量上应用多路径功能现在,发送设备和接收设备都可以创建数据包的副本,并通过两个 WAN 链路将每个副本发送到目标设备。这种增强功能可确保敏感应用程序流量在两个方向不间断地交付。
默认情况下,禁用反向流量的 AMR。您可以使用以下 CLI 选项启用它:
set security advance-policy-based-routing multipath-rule rule-name enable-reverse-wing
要为反向流量禁用 AMR,请使用以下 CLI 选项:
delete security advance-policy-based-routing multipath-rule rule-name enable-reverse-wing
当设备在 HA 模式下工作时,可用对反向机翼流量的 AMR 支持。请注意,在 HA 故障转移期间,队列中的数据包会丢弃。
无序数据包的排队机制
从 Junos OS 21.2R1 版开始,接收设备上无序数据包的排队机制得到了改进。
以前,AMR 接收设备被丢弃的不规范数据包,导致数据包丢失并降低服务质量。使用队列机制,当接收设备收到无序数据包时,它会进一步等待更多数据包到达,然后在队列中短时间内对这些数据包进行缓冲。这种缓冲有助于对数据包进行重新订购,防止丢弃数据包。
APBR 配置文件的 AMR 支持
从 Junos OS 21.2R1 版开始,当与配置了 APBR 策略的 APBR 配置文件一起使用时,安全设备支持 AMR。您可以将源地址、目标地址和应用程序定义为匹配条件,从而创建 APBR 策略。
在前一个版本的 Junos OS 中,您可以将 APBR 配置文件连接到入口流量的传入安全区域。在这种情况下,按安全区域应用 APBR。
以下示例显示了 APBR 策略的配置片段,将源地址、目标地址和应用程序定义为匹配条件。SLA 规则适用于与 APBR 策略规则匹配的流量。与 SLA 规则关联的多路径规则将得到应用,并为该会话启用多路径路由功能。
set security advance-policy-based-routing multipath-rule amr-rule1 number-of-paths 2 set security advance-policy-based-routing multipath-rule amr-rule1 bandwidth-limit 30 set security advance-policy-based-routing multipath-rule amr-rule1 max-time-to-wait 60 set security advance-policy-based-routing multipath-rule amr-rule1 application junos:SSH set security advance-policy-based-routing multipath-rule amr-rule1 application junos:HTTP set security advance-policy-based-routing multipath-rule amr-rule1 link-type MPLS set security advance-policy-based-routing multipath-rule amr-rule1 link-type IP set security advance-policy-based-routing profile apbr1 rule rule1 match dynamic-application junos:RTP set security advance-policy-based-routing profile apbr1 rule rule1 then routing-instance TC1_VPN set security advance-policy-based-routing profile apbr1 rule rule1 then sla-rule sla1 set security advance-policy-based-routing sla-rule sla1 multipath-rule amr-rule1 set security zones security-zone trust advance-policy-based-routing-profile apbr1 set security advance-policy-based-routing from-zone trust policy sla_policy1 match source-address 10.4.0.1 set security advance-policy-based-routing from-zone trust policy sla_policy1 match destination-address 10.5.0.1 set security advance-policy-based-routing from-zone trust policy sla_policy1 match application junos-RTP set security advance-policy-based-routing from-zone trust policy sla_policy1 then application-services advance-policy-based-routing-profile apbr1
链路选择
在之前版本中,对于基于应用程序的多路径路由,链路选择机制可以是默认的(前两个可用链路之一),要么基于链路类型 (IP/MPLS) 配置 AppQoE 底层接口配置。
从 Junos OS 21.2R1 版开始,您可以将链路优先级选项指定为通用路由封装 (GRE) 和安全隧道 (st)。设备直接选择其中一个指定的接口进行多路径路由。
如果未配置 , link-preference
则 AMR 将从配置的路径的前两个可用链路中选择链路。
您可以使用以下 CLI 选项指定链路优先级:
set security advance-policy-based-routing multipath-rule rule-name link-preferences [st0.0 | st0.1}
在 SLA 违规模式或独立模式下的 AMR
从 Junos OS 21.2R1 版开始,AMR 会以以下两种模式之一启用:
-
SLA 违规模式 — 当 AppQoE 检测到所有链路上的 SLA 违规时,它将启用 AMR。当根据计时器配置在任何链路上满足 SLA 时,AMR 将被禁用。
-
独立模式 — 配置 AMR 而不配置 SLA 指标时,启用 AMR 与 AppQoE 状态无关。在此模式下,当达到带宽限制时,AMR 将暂停默认持续时间,然后重新启动。
例子:
以下是 SLA 指标的抽样配置。SLA 指标指定需求参数,AppQoE 使用这些参数评估链路的 SLA。为了实现 SLA,AppQoE 会监控网络故障或拥塞的来源。如果链路性能低于 SLA 指定的可接受级别,则此情况被视为违反 SLA。如果所有链路上都注意到 LA 违规,则 AMR 在 SLA 违规模式下启用。
set security advance-policy-based-routing metrics-profile metric1 sla-threshold delay-round-trip 50000 set security advance-policy-based-routing metrics-profile metric1 sla-threshold jitter 10000 set security advance-policy-based-routing metrics-profile metric1 sla-threshold jitter-type egress-jitter set security advance-policy-based-routing metrics-profile metric1 sla-threshold packet-loss 4 set security advance-policy-based-routing metrics-profile metric1 sla-threshold match all set security advance-policy-based-routing sla-rule sla1 metrics-profile metric1
如果 SLA 指标配置(如上例所示)在 AMR 配置中不可用,则在独立模式下启用 AMR。
支持 IPv6 流量
基于应用程序的多路径路由支持 IPv6 流量:
- 基于 IPv4 隧道的 IPv6 流量(Junos OS 21.2R1 版)
- 基于 IPv6 隧道的 IPv6 流量(Junos OS 21.3R1 版)
支持基于 IPsec 的 AMR 和通用路由封装 (GRE) 会话
- 在没有 GRE 的直接 IPsec 隧道上基于应用程序的多路径路由(Junos OS 21.2R1 版)
- 无 IPsec 的直接通用路由封装 (GRE) 隧道上的基于应用程序的多路径路由(Junos OS 21.2R1 版)
- 基于应用程序的直接 IPsec 隧道的多路径路由,无 GRE,适用于 IPv6 流量(Junos OS 21.3R1 版)
- 基于应用程序的多路径路由,直接 GRE 隧道,无 IPsec,适用于 IPv6 流量(Junos OS 21.3R1 版)
- 基于应用程序的多路径路由,基于 MPLS-over-GRE-over-IPsec,适用于 IPv6 流量(Junos OS 21.3R1 版)
另请参阅
基于应用程序的多路径路由示例配置
基于应用程序多路径路由配置示例(中心辐射型拓扑)
本节介绍中心辐射型拓扑基于应用程序的多路径路由配置示例。配置使用 APBR 设置的 SLA,并且独立于 APPQoE 工作。有关 APPQoE SLA,请参阅 应用程序体验质量。 您可以为设备配置其他功能,例如,基于优先级的链路选择、基于链路类型的路径选择以及通过 IPsec 和 GRE 隧道的多路径路由支持。可使用 Contrail 服务编排器配置多路径路由。有关详细信息 ,请参阅 Contrail 服务编排 (CSO) 部署指南 。
辐射端设备基本配置
user@host#
set security advance-policy-based-routing profile profile1 rule r1 match dynamic-application junos:HTTPuser@host#
set security advance-policy-based-routing profile profile1 rule r1 match dynamic-application junos:SIPuser@host#
set security advance-policy-based-routing profile profile1 rule r1 then routing-instance TC1_VPNuser@host#
set security advance-policy-based-routing profile profile1 rule r1 sla-rule sla_rule1user@host#
set security advance-policy-based-routing sla-rule sla_rule1 multipath-rule mult1user@host#
set security advance-policy-based-routing multipath-rule mult1 number-of-paths 2user@host#
set security advance-policy-based-routing multipath-rule mult1 bandwidth-limit 90user@host#
set security advance-policy-based-routing multipath-rule mult1 application junos:HTTPuser@host#
set security advance-policy-based-routing multipath-rule mult1 application junos:SIP
中枢端设备基本配置
user@host#
set security advance-policy-based-routing multipath-rule mult1 number-of-paths 2user@host#
set security advance-policy-based-routing multipath-rule mult1 bandwidth-limit 90user@host#
set security advance-policy-based-routing multipath-rule mult1 enable-reverse-winguser@host#
set security advance-policy-based-routing multipath-rule mult1 application junos:HTTPuser@host#
sset security advance-policy-based-routing multipath-rule mult1 application junos:SIP
链路优先级配置
user@host#
set security advance-policy-based-routing multipath-rule mult1 link-preferences gr-0/0/0.0user@host#
set security advance-policy-based-routing multipath-rule mult1 link-preferences gr-0/0/0.1
基于链路类型的路径选择配置
user@host#
set security advance-policy-based-routing multipath-rule mult1 link-type MPLSuser@host#
set security advance-policy-based-routing multipath-rule mult1 link-type IP
在基于应用的多路径路由级别基于接口的配置
user@host#
set security advance-policy-based-routing interface gr-0/0/0.0 link-tag IPuser@host#
set security advance-policy-based-routing interface gr-0/0/0.1 link-tag MPLS
在辐射端设备上使用 IPv6 隧道和 IPv4 流量进行 IPsec VPN 配置,适用于基于应用程序的多路径路由
user@host#
set groups ipsec-groups security ike proposal salausehdotp1 authentication-method pre-shared-keysuser@host#
set groups ipsec-groups security ike proposal salausehdotp1 dh-group group5user@host#
set groups ipsec-groups security ike proposal salausehdotp1 encryption-algorithm aes-256-gcmuser@host#
set groups ipsec-groups security ike policy salauspolitiikkap1 mode mainuser@host#
set groups ipsec-groups security ike policy salauspolitiikkap1 proposals salausehdotp1user@host#
set groups ipsec-groups security ike policy salauspolitiikkap1 pre-shared-key ascii-text "$9$1-7ESeLxd2oGdbPQnCB1-VwYgJDi.TF/aZ"user@host#
set groups ipsec-groups security ike gateway gateway1 ike-policy salauspolitiikkap1user@host#
set groups ipsec-groups security ike gateway gateway1 version v2-onlyuser@host#
set groups ipsec-groups security ipsec proposal salausehdotp2 protocol espuser@host#
set groups ipsec-groups security ipsec proposal salausehdotp2 encryption-algorithm aes-256-gcmuser@host#
set groups ipsec-groups security ipsec policy salauspolitiikkap2 perfect-forward-secrecy keys group5user@host#
set groups ipsec-groups security ipsec policy salauspolitiikkap2 proposals salausehdotp2user@host#
set groups ipsec-groups security ipsec vpn vpn1 df-bit clearuser@host#
set groups ipsec-groups security ipsec vpn vpn1 ike ipsec-policy salauspolitiikkap2user@host#
set groups ipsec-groups security ipsec vpn vpn1 establish-tunnels immediatelyuser@host#
set system host-name SRX345-2user@host#
set system root-authentication encrypted-password "$ABC123"user@host#
set system services ssh root-login allowuser@host#
set services application-identificationuser@host#
set security apply-groups ipsec-groupsuser@host#
set security ike gateway SRX345-1-A address fdf:a::1user@host#
set security ike gateway SRX345-1-A external-interface ge-0/0/0.0user@host#
set security ike gateway SRX345-1-B address fdf:b::1user@host#
set security ike gateway SRX345-1-B external-interface ge-0/0/1.0user@host#
set security ipsec vpn SRX345-1-A bind-interface st0.0user@host#
set security ipsec vpn SRX345-1-A ike gateway SRX345-1-Auser@host#
set security ipsec vpn SRX345-1-B bind-interface st0.1user@host#
set security ipsec vpn SRX345-1-B ike gateway SRX345-1-Buser@host#
set security application-tracking first-updateuser@host#
set security application-tracking session-update-interval 1user@host#
set security forwarding-options family inet6 mode flow-baseduser@host#
set security forwarding-options family mpls mode flow-baseduser@host#
set security flow allow-dns-replyuser@host#
set security flow allow-embedded-icmpuser@host#
set security flow sync-icmp-sessionuser@host#
set security flow tcp-mss all-tcp mss 1300user@host#
set security flow tcp-mss ipsec-vpn mss 1350user@host#
set security flow tcp-session no-syn-checkuser@host#
set security flow tcp-session no-syn-check-in-tunneluser@host#
set security flow tcp-session no-sequence-checkuser@host#
set security policies default-policy permit-alluser@host#
set security zones security-zone Untrust host-inbound-traffic system-services alluser@host#
set security zones security-zone Untrust host-inbound-traffic protocols alluser@host#
set security zones security-zone Untrust interfaces ge-0/0/0.0user@host#
set security zones security-zone Untrust interfaces ge-0/0/1.0user@host#
set security zones security-zone Untrust application-trackinguser@host#
set security zones security-zone Untrust enable-reverse-rerouteuser@host#
set security zones security-zone trust host-inbound-traffic system-services alluser@host#
set security zones security-zone trust host-inbound-traffic protocols alluser@host#
set security zones security-zone trust interfaces ge-0/0/6.0user@host#
set security zones security-zone trust application-trackinguser@host#
set security zones security-zone trust advance-policy-based-routing-profile apbruser@host#
set security zones security-zone trust enable-reverse-rerouteuser@host#
set security zones security-zone VPN host-inbound-traffic system-services alluser@host#
set security zones security-zone VPN host-inbound-traffic protocols alluser@host#
set security zones security-zone VPN interfaces st0.0user@host#
set security zones security-zone VPN interfaces st0.1user@host#
set security zones security-zone VPN application-trackinguser@host#
set security zones security-zone VPN enable-reverse-rerouteuser@host#
set security zones security-zone test interfaces ge-0/0/7.0 host-inbound-traffic system-services alluser@host#
set security zones security-zone test interfaces ge-0/0/7.0 host-inbound-traffic protocols alluser@host#
set security advance-policy-based-routing profile apbr rule r1 match dynamic-application junos:ICMPuser@host#
set security advance-policy-based-routing profile apbr rule r1 match dynamic-application junos:SSHuser@host#
set security advance-policy-based-routing profile apbr rule r1 match dynamic-application junos:ICMP-ECHOuser@host#
set security advance-policy-based-routing profile apbr rule r1 then routing-instance apbruser@host#
set security advance-policy-based-routing profile apbr rule r1 then sla-rule sla1user@host#
set security advance-policy-based-routing sla-rule sla1 multipath-rule amr-rule1user@host#
set security advance-policy-based-routing multipath-rule amr-rule1 number-of-paths 2user@host#
set security advance-policy-based-routing multipath-rule amr-rule1 bandwidth-limit 30user@host#
set security advance-policy-based-routing multipath-rule amr-rule1 enable-reverse-winguser@host#
set security advance-policy-based-routing multipath-rule amr-rule1 max-time-to-wait 60user@host#
set security advance-policy-based-routing multipath-rule amr-rule1 application junos:ICMPuser@host#
set security advance-policy-based-routing multipath-rule amr-rule1 application junos:SSHuser@host#
set security advance-policy-based-routing multipath-rule amr-rule1 application junos:ICMP-ECHOuser@host#
set security advance-policy-based-routing multipath-rule amr-rule1 link-preferences st0.0user@host#
set security advance-policy-based-routing multipath-rule amr-rule1 link-preferences st0.1user@host#
set interfaces ge-0/0/0 unit 0 family inet6 address fdf:a::2/64user@host#
set interfaces ge-0/0/1 unit 0 family inet6 address fdf:b::2/640user@host#
set interfaces ge-0/0/6 unit 0 family inet address 10.0.12.1/24user@host#
set interfaces ge-0/0/7 unit 0 family inet address 10.0.12.10/24user@host#
set interfaces fxp0 unit 0 family inet address 192.168.123.2/24user@host#
set interfaces st0 unit 0 family inet address 10.0.0.2/30user@host#
set interfaces st0 unit 1 family inet address 10.0.1.2/30user@host#
set policy-options policy-statement ecmp then load-balance per-packetuser@host#
set routing-instances IPSEC protocols ospf area 0.0.0.0 interface st0.0 interface-type p2puser@host#
set routing-instances IPSEC protocols ospf area 0.0.0.0 interface st0.1 interface-type p2puser@host#
set routing-instances IPSEC protocols ospf area 0.0.0.0 interface ge-0/0/6.0 passiveuser@host#
set routing-instances IPSEC interface ge-0/0/6.0user@host#
set routing-instances IPSEC interface st0.0user@host#
set routing-instances IPSEC interface st0.1user@host#
set routing-instances IPSEC instance-type virtual-routeruser@host#
set routing-instances IPSEC routing-options interface-routes rib-group inet apbr-groupuser@host#
set routing-instances apbr instance-type forwardinguser@host#
set routing-instances apbr routing-options static route 0.0.0.0/0 next-hop st0.0user@host#
set routing-instances apbr routing-options static route 0.0.0.0/0 next-hop st0.1user@host#
set routing-instances test interface ge-0/0/7.0user@host#
set routing-instances test instance-type virtual-routeruser@host#
set routing-instances test routing-options static route 0.0.0.0/0 next-hop 10.0.12.1user@host#
set routing-options rib-groups apbr-group import-rib IPSEC.inet.0user@host#
set routing-options rib-groups apbr-group import-rib apbr.inet.0user@host#
set routing-options forwarding-table export ecmp
对于 GRE 隧道,请替换为ipsec
gre
。对于 IPv4 隧道、IPv4 流量和 IPv6 流量,请相应地将配置替换为 IPv4 和 IPv6。
示例:配置基于应用程序的多路径路由
此示例说明如何配置多路径路由,以便根据指定的 SLA 对应用程序流量进行实时监控,从而提供体验质量 (QoE)。
要求
-
支持的 Junos OS 15.1X49-D160 版、Junos OS 19.2R1 或更高版本的 SRX 系列设备。此配置示例针对 Junos OS 15.1X49-D160 版进行了测试。
-
安全设备上安装的有效应用程序识别功能许可证。
-
针对传输流量可以通过设备的内容以及流量在通过设备时需要在流量上进行的操作实施适当的安全策略。
-
为区域启用应用程序跟踪支持。请参阅 应用程序跟踪。
-
确保配置了以下功能:
概述
为了确保这些敏感应用程序流量的不间断传输,安全设备支持基于应用程序的多路径路由,以允许发送设备创建数据包的副本,并通过两个 WAN 链路将每个副本发送到目标。
多路径路由根据 SLA 配置识别两个路径,并创建应用程序流量的复制副本,并同时在不同物理路径上发送流量。在接收设备上,当数据包的副本正在进行中时,多路径路由会估计抖动、RTT 和数据包丢失的减少情况,并分析将流量路由到最佳链路的服务质量,从而向最终用户提供 SLA。这还有助于估计抖动、RTT 和丢包的减少量。如果两个副本都是在远程端接收的,则会考虑第一个收到的数据包,并丢弃后续数据包。
表 1 提供了此示例中使用的参数的详细信息。
参数 |
选项 |
值 |
---|---|---|
多路径规则 (多1) |
路径数 |
2 |
带宽限制 |
60 |
|
最长等待时间 |
60 |
|
链路类型 |
MPLS,IP |
|
应用 |
junos:YAHOO, junos:GOOGLE |
|
应用程序组 |
junos:Web |
|
SLA 规则 (sla1) |
关联多路径规则 |
多1 |
APBR 配置文件 (apbr1) |
匹配应用程序 |
junos:YAHOO |
APBR 规则 |
规则1 |
|
SLA 规则 |
sla1 |
|
底层接口 |
ge-0/0/2 和 ge-0/0/3
|
在此示例中,您将为 junos:YAHOO 和 junos:GOOGLE 应用程序流量配置多路径规则。然后,配置 SLA 规则并将多路径规则与多路径规则相关联。
接下来,将 SLA 规则与为 Yahoo 应用程序创建的 APBR 规则相关联。APBR 使用应用程序详细信息在 APBR 配置文件(应用程序配置文件)中查找匹配规则。
多路径规则应用于与流量匹配的 junos:YAHOO 或 junos:GOOGLE,并按照路由实例中规定的转发至下一跃点地址。
多路径路由根据 SLA 规则获取需要数据包复制的底层链路类型和相应的叠加层。根据应用程序流量和配置的带宽限制,多路径会识别两条或更多条路径,并在所有已识别的路径上触发原始流量的副本。
当流量到达接收端时,接收设备会接受通过不同链路到达的会话数据包,并维护到达不同 CoS 队列的数据包序列,并丢弃任何重复的数据包。
确保发送方和接收方设备上的配置相同,以便设备可以同时充当发送方和接收方。
配置
为应用程序流量配置多路径规则(配置为发送流量的设备)
逐步过程
为不同的应用程序流量配置 APBR 配置文件,并关联 SLA 规则和多路径规则。
-
创建路由实例。
user@host#
set routing-instances TC1_VPN instance-type vrfuser@host#
set routing-instances TC1_VPN route-distinguisher 10.150.0.1:101user@host#
set routing-instances TC1_VPN vrf-target target:100:101user@host#
set routing-instances TC1_VPN vrf-table-labeluser@host#
set routing-instances TC1_VPN routing-options static route 10.19.0.0/8 next-table Default_VPN.inet.0 -
对一个或多个路由表进行分组以组成 RIB 组,并将路由导入路由表中。
user@host#
set routing-options rib-groups Default-VPN-to-TC1_VPN import-rib [ Default_VPN.inet.0 TC1_VPN.inet.0 ] -
配置 AppQoE 即服务。您必须为所需区域的主机入站流量配置 AppQoE 即服务。
user@host#
set security zones security-zone untrust1 host-inbound-traffic system-services appqoe -
创建 APBR 配置文件并定义规则。
user@host#
set security advance-policy-based-routing profile apbr1 rule rule1 match dynamic-application junos:GOOGLEuser@host#
set security advance-policy-based-routing profile apbr1 rule rule1 match dynamic-application junos:YAHOOuser@host#
set security advance-policy-based-routing profile apbr1 rule rule1 match dynamic-application-group junos:webuser@host#
set security advance-policy-based-routing profile apbr1 rule rule1 then routing-instance TC1_VPNuser@host#
set security advance-policy-based-routing profile apbr1 rule rule1 then sla-rule sla1 -
配置活动探测参数。
user@host#
set security advance-policy-based-routing active-probe-params probe1 settings data-fill juniperuser@host#
set security advance-policy-based-routing active-probe-params probe1 settings data-size 100user@host#
set security advance-policy-based-routing active-probe-params probe1 settings probe-interval 30user@host#
set security advance-policy-based-routing active-probe-params probe1 settings probe-count 30user@host#
set security advance-policy-based-routing active-probe-params probe1 settings burst-size 1user@host#
set security advance-policy-based-routing active-probe-params probe1 settings sla-export-interval 60user@host#
set security advance-policy-based-routing active-probe-params probe1 settings dscp-code-points 000110 -
配置指标配置文件。
user@host#
set security advance-policy-based-routing metrics-profile metric1 sla-threshold delay-round-trip 120000user@host#
set security advance-policy-based-routing metrics-profile metric1 sla-threshold jitter 21000user@host#
set security advance-policy-based-routing metrics-profile metric1 sla-threshold jitter-type egress-jitteruser@host#
set security advance-policy-based-routing metrics-profile metric1 sla-threshold packet-loss 2 -
配置底层接口。
如果未在底层接口选项下配置链路类型,则使用默认链路类型 IP,并考虑默认链路速度为 1000 Mbps。
user@host#
set security advance-policy-based-routing underlay-interface ge-0/0/2 unit 0 link-type MPLSuser@host#
set security advance-policy-based-routing underlay-interface ge-0/0/2 unit 0 speed 800user@host#
set security advance-policy-based-routing underlay-interface ge-0/0/3 unit 0 link-type MPLSuser@host#
set security advance-policy-based-routing underlay-interface ge-0/0/3 unit 0 speed 500 -
配置叠加路径。
user@host#
set security advance-policy-based-routing overlay-path overlay-path1 tunnel-path local ip-address 10.40.1.2user@host#
set security advance-policy-based-routing overlay-path overlay-path1 tunnel-path remote ip-address 10.40.1.1user@host#
set security advance-policy-based-routing overlay-path overlay-path1 probe-path local ip-address 10.40.1.2user@host#
set security advance-policy-based-routing overlay-path overlay-path1 probe-path remote ip-address 10.40.1.1user@host#
set security advance-policy-based-routing overlay-path overlay-path2 tunnel-path local ip-address 10.41.1.2user@host#
set security advance-policy-based-routing overlay-path overlay-path2 tunnel-path remote ip-address 10.41.1.1user@host#
set security advance-policy-based-routing overlay-path overlay-path2 probe-path local ip-address 10.41.1.2user@host#
set security advance-policy-based-routing overlay-path overlay-path2 probe-path remote ip-address 10.41.1.1user@host#
set security advance-policy-based-routing overlay-path overlay-path3 tunnel-path local ip-address 10.42.1.2user@host#
set security advance-policy-based-routing overlay-path overlay-path3 tunnel-path remote ip-address 10.42.1.1user@host#
set security advance-policy-based-routing overlay-path overlay-path3 probe-path local ip-address 10.42.1.2user@host#
set security advance-policy-based-routing overlay-path overlay-path3 probe-path remote ip-address 10.42.1.1 -
配置目标路径组。
user@host#
set security advance-policy-based-routing destination-path-group site1 probe-routing-instance transituser@host#
set security advance-policy-based-routing destination-path-group site1 overlay-path overlay-path1user@host#
set security advance-policy-based-routing destination-path-group site1 overlay-path overlay-path2user@host#
set security advance-policy-based-routing destination-path-group site1 overlay-path overlay-path3 -
配置多路径规则。
user@host#
set security advance-policy-based-routing multipath-rule multi1 bandwidth-limit 60user@host#
set security advance-policy-based-routing multipath-rule multi1 application junos:YAHOOuser@host#
set security advance-policy-based-routing multipath-rule multi1 application junos:GOOGLEuser@host#
set security advance-policy-based-routing multipath-rule multi1 application-group junos:webuser@host#
set security advance-policy-based-routing multipath-rule multi1 link-type MPLSuser@host#
set security advance-policy-based-routing multipath-rule multi1 link-type IPuser@host#
set security advance-policy-based-routing multipath-rule multi1 max-time-to-wait 30user@host#
set security advance-policy-based-routing multipath-rule multi1 number-of-paths 2 -
配置 SLA 规则。
user@host#
set security advance-policy-based-routing sla-rule sla1 switch-idle-time 40user@host#
set security advance-policy-based-routing sla-rule sla1 metrics-profile metric1user@host#
set security advance-policy-based-routing sla-rule sla1 active-probe-params probe1user@host#
set security advance-policy-based-routing sla-rule sla1 passive-probe-params sampling-percentage 25user@host#
set security advance-policy-based-routing sla-rule sla1 passive-probe-params violation-count 2user@host#
set security advance-policy-based-routing sla-rule sla1 passive-probe-params sampling-period 60000user@host#
set security advance-policy-based-routing sla-rule sla1 passive-probe-params type book-ended -
将 SLA 规则与多路径规则相关联。
user@host#
set security advance-policy-based-routing sla-rule sla1 multipath-rule multi1
为应用程序流量配置多路径规则(配置为接收流量的设备))
逐步过程
这一步中为发送和接收设备配置的变量相同。
-
在接收设备上配置多路径规则。
user@host#
set security advance-policy-based-routing multipath-rule multi1 bandwidth-limit 60user@host#
set security advance-policy-based-routing multipath-rule multi1 application junos:YAHOOuser@host#
set security advance-policy-based-routing multipath-rule multi1 application junos:GOOGLEuser@host#
set security advance-policy-based-routing multipath-rule multi1 application-group junos:webuser@host#
set security advance-policy-based-routing multipath-rule multi1 link-type MPLSuser@host#
set security advance-policy-based-routing multipath-rule multi1 link-type IP
结果
在配置模式下,输入命令以确认 show
您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明,以便进行更正。
中心端设备多路径规则配置
[edit security]
user@host#
show advance-policy-based-routing multipath-rule multi1 multipath-rule multi1 { bandwidth-limit 60; application [ junos:YAHOO junos:GOOGLE ]; application-group junos:web; link-type [ MPLS IP ]; number-of-paths 2; }
[edit security]
user@host#
show advance-policy-based-routing profile apbr1 { rule rule1 { match { dynamic-application [ junos:GOOGLE, junos:YAHOO ]; dynamic-application-group [ junos:web ]; } then { routing-instance TC1_VPN; sla-rule { sla1; } } } } active-probe-params probe1 { settings { data-fill { juniper; } data-size { 100; } probe-interval { 30; } probe-count { 30; } burst-size { 1; } sla-export-interval { 60; } dscp-code-points { 000110; } } } metrics-profile metric1 { sla-threshold { delay-round-trip { 120000; } jitter { 21000; } jitter-type { egress-jitter; } packet-loss { 2; } } } underlay-interface ge-0/0/2 { unit 0 { link-type MPLS; speed 800; } } underlay-interface ge-0/0/3 { unit 0 { link-type MPLS; speed 500; } } overlay-path overlay-path1 { tunnel-path { local { ip-address { 10.40.1.2; } } remote { ip-address { 10.40.1.1; } } } probe-path { local { ip-address { 10.40.1.2; } } remote { ip-address { 10.40.1.1; } } } } overlay-path overlay-path2 { tunnel-path { local { ip-address { 10.41.1.2; } } remote { ip-address { 10.41.1.1; } } } probe-path { local { ip-address { 10.41.1.2; } } remote { ip-address { 10.41.1.1; } } } } overlay-path overlay-path3 { tunnel-path { local { ip-address { 10.42.1.2; } } remote { ip-address { 10.42.1.1; } } } probe-path { local { ip-address { 10.42.1.2; } } remote { ip-address { 10.42.1.1; } } } } destination-path-group site1 { probe-routing-instance { transit; } overlay-path overlay-path1; overlay-path overlay-path2; overlay-path overlay-path3; } sla-rule sla1 { switch-idle-time { 40; } metrics-profile { metric1; } active-probe-params { probe1; } passive-probe-params { sampling-percentage { 25; } violation-count { 2; } sampling-period { 60000; } type { book-ended; } } multipath-rule { multi1; } } multipath-rule multi1 { bandwidth-limit 60; application [ junos:YAHOO junos:GOOGLE ]; application-group junos:web; link-type [ MPLS IP ]; number-of-paths 2; }
完成设备配置后,请从配置模式进入 commit
。
验证
显示多路径规则状态
目的
显示配置为发送流量的设备上的多路径规则的详细信息。
行动
在操作模式下,输入 show security advance-policy-based-routing multipath rule
命令。
user@host>
show security advance-policy-based-routing multipath rule multi1
Multipath Rule Status:
Multipath Rule Information:
Multipath rule name multi1
Multipath rule type Packet-Copy
Multipath rule state Active
Configured number of paths 2
Configured application groups junos:web
Configured applications junos:GOOGLE, junos:YAHOO
Path Group Information:
Total path groups : 1
Path-Group-Id State Avl-Num-Paths
1 Active 3
Receiver Information:
Path Groups Information:
Total receiver path groups : 1
Path-Group-Id : 1, Avg-Pkt-Loss(%) : 0, Avg-Ingress-Jitter(us) : 171
Path Information:
Dst-IP Pkts-Rcvd Pkt-Loss(%) Ingress-Jitter(us) Reduction-Pkt-Loss(%) Reduction-Ingress-Jitter(us)
10.40.1.2 2442 0 165 0 -6
10.41.1.2 2442 0 158 0 -13
Cos Q Statistics:
Total receiver cos queues: 8
COS-Q-Id Pkts-Rcvd Out-Of-Seq-Drop
0 4884 2442
1 0 0
2 0 0
3 0 0
4 0 0
5 0 0
6 0 0
7 0 0
意义
命令输出显示多路径规则详细信息。
显示应用程序的多路径规则统计信息
目的
显示配置为接收流量的设备上应用程序流量的详细信息
行动
在操作模式下,输入 show security advance-policy-based-routing multipath rule rule-name application application-name
命令。
user@host>
show security advance-policy-based-routing multipath rule multi1 application junos:YAHOO
Multipath Rule Status:
Multipath Rule Information:
Multipath rule name multi1
Multipath rule type Packet-Copy
Multipath rule state Active
Configured number of paths 2
Configured applications junos:YAHOO
Sender Information:
Statistics:
Current Sessions 0
Ignored Sessions 1
Applications Matched 1
Applications Switched 0
Stopped due to Bandwidth Limit 0
Packets in path inactive state 0
Packets in path active state 627
Midstream Packets Ignored 0
Total Packets Processed 627
Total Packets Copied 627
意义
命令输出显示应用程序的多路径规则。
显示多路径规则策略
目的
显示配置为发送流量的设备上的多路径规则的详细信息。
行动
在操作模式下,输入 show security advance-policy-based-routing multipath rule
命令。
user@host>
show security advance-policy-based-routing multipath policy statistics application junos:YAHOO multipath-name multi1 profile apbr1 rule rule1 zone trust
Sender Information:
Statistics:
Current Sessions 0
Ignored Sessions 0
Applications Matched 1
Applications Switched 0
Stopped due to Bandwidth Limit 0
Packets in path inactive state 26
Packets in path active state 2416
Less than Configured Paths 0
Midstream Packets Ignored 0
Total Packets Processed 2442
Total Packets Copied 2442
意义
命令输出显示应用多路径规则处理流量的详细信息。
显示多路径规则状态
目的
显示配置为接收流量的设备上的多路径规则的详细信息
行动
在操作模式下,输入 show security advance-policy-based-routing multipath rule
命令。
user@host>
show security advance-policy-based-routing multipath rule multi1
Multipath Rule Status:
Multipath Rule Information:
Multipath rule name multi1
Multipath rule type Packet-Copy
Multipath rule state Active
Configured number of paths 2
Configured application groups junos:web
Configured applications junos:GOOGLE, junos:YAHOO
Path Group Information:
Total path groups : 1
Path-Group-Id State Avl-Num-Paths
1 Active 3
Receiver Information:
Path Groups Information:
Total receiver path groups : 1
Path-Group-Id : 1, Avg-Pkt-Loss(%) : 0, Avg-Ingress-Jitter(us) : 171
Path Information:
Dst-IP Pkts-Rcvd Pkt-Loss(%) Ingress-Jitter(us) Reduction-Pkt-Loss(%) Reduction-Ingress-Jitter(us)
10.40.1.1 2442 0 165 0 -6
10.41.1.1 2442 0 158 0 -13
Cos Q Statistics:
Total receiver cos queues: 8
COS-Q-Id Pkts-Rcvd Out-Of-Seq-Drop
0 4884 2442
1 0 0
2 0 0
3 0 0
4 0 0
5 0 0
6 0 0
7 0 0
意义
输出显示与多路径规则相关的详细信息。