Smart Policy Routing
Smart policy routing (SPR) allows devices to select routes based on link quality and requirements for link quality.
Background
As network service requirements vary widely and service data is stored in a centralized manner, network services increasingly depend on high link quality. Users stress more importance on service availability, service response speed, and service quality than network connectivity. Diversified service requirements pose a challenge to per-hop-based routing protocols. Devices that use per-hop-based routing protocols are unaware of link quality and service requirements, so they cannot deliver satisfying service experience. Even though routes are reachable, low link quality may cause a packet forwarding failure. SPR resolves this problem. SPR selects optimal links to forward packets based on link quality and service requirements. This mechanism prevents network black holes and flappings.
Service Classification
SPR classifies services based on the following attributes:
- Protocol types: IP, TCP, UDP, GRE, IGMP, IPINIP, OSPF, and ICMP
- Packet applications: DSCP, TOS, IP precedence, fragment, VPN, and TCP-flag
- Packet fields: source IP address, destination IP address, protocol, source port, destination port, source IP prefix, and destination IP prefix
Different services have different requirements for link quality indicators: delay, jitter, packet loss rate, and composite measure indicator (CMI). If services are insensitive to a link quality indicator, no threshold needs to be configured for this indicator.
When SPR selects links for services based on NQA detection results, the CMI is calculated as follows:
- On a device, the maximum delay is 5000 ms, the maximum jitter is 3000 ms, and the maximum packet loss rate is 1000‰. These maximum values are also the default values. Smaller values of the preceding indicators indicate better link quality.
- The CMI is calculated using the following formula: CMI = 9000 – cmi-method. The default value of cmi-method is the sum of delay (D), jitter (J), and packet loss rate (L).
The cmi-method parameter is configurable. For example, if cmi-method is set to D+10*J, the delay is 1000 ms, and the jitter is 10 ms, the CMI is calculated as follows:
CMI = 9000 – (D + 10 * J) = 9000 – (1000 + 100) = 7900
In the CMI calculation formula, if there is a coefficient before a link quality indicator (delay, jitter, or packet loss rate), the product of the link quality indicator and the coefficient must be less than or equal to the maximum value of the indicator. For example, if cmi-method is set to 10*D+10*J+10*L, the delay is 1000 ms, the jitter is 100 ms, and the packet loss rate is 10‰, then the CMI is calculated as follows:
CMI = 9000 – (5000 + 1000 + 100) = 2900
In the preceding formula, 10*D is 10000, which exceeds the maximum value of 5000. Therefore, the delay takes the maximum value 5000.
Detection Link and Link Group
SPR uses detection links to implement intelligent route selection. Each detection link has a unique probe, which is a network quality analysis (NQA) test instance. If an NQA test fails, the corresponding detection link is unavailable. A probe obtains quality indicators of the corresponding detection link. Then SPR selects an optimal link based on the link quality indicators.
SPR uses link groups instead of detection links to measure link quality. A detection link can be added to different link groups, and a link group can have one or more detection links.
SPR defines three roles for links: active link group, standby link group, and best-effort link. When no suitable link is available in the active and standby link groups, SPR activates the best-effort link to forward service data.
A link group can be bound to different services. For example, link group 1 can be used as the active link group for service 1 and as the standby link group for service 2.
Link Selection
If a link is transmitting services, the probability that this link is selected to transmit new services is lower. This ensures load balancing among links.
Switchover Timer
SPR uses a switchover timer to control link switchovers when the link quality does not meet service requirements.
- If SPR obtains NQA test results indicating that the link meets service requirements, SPR resets the timer.
- If SPR does not obtain NQA test results indicating that the link meets service requirements, SPR triggers a link switchover.
Flapping Suppression Timer
When a network is unstable, SPR triggers link switchovers frequently, which degrades service experience. SPR provides the flapping suppression function to address this problem.
- If SPR still does not obtain NQA test results indicating that the link meets service requirements within a switchover period, SPR performs a link switchover.
- If SPR obtains NQA test results indicating that the link meets service requirements within a switchover period, SPR retains traffic on the link.
Related Documents
Video: Introduction to Smart Policy Routing Feature of Huawei AR Routers