Setting SPR Routing Parameters
Context
You can configure SPR routing parameters, including the SPR switchover period, detection link, interface that can be automatically shut down when the backup link is not selected in SPR, delay in automatically shutting down the interface, and best-effort link. Additionally, you can enable redirection enhancement for a redirect-link so that SPR can still guide packet forwarding when there are only non-equal-cost routes on the device.
Before configuring detection links, configure NQA test instances. For details, see Configuring an NQA Test Instance.
Procedure
- Run system-view
The system view is displayed.
- Run smart-policy-route
An SPR is created and the SPR view is displayed.
- Set the SPR switchover period, flapping suppression period, waiting time before SPR switches from the backup link to the primary
link, interface that can be automatically
shut down when the backup link is not selected in SPR, delay in automatically
shutting down the interface, a best-effort link, detection
links, and link groups, and enable redirection enhancement for a redirect-link.
(Optional) Run period period-value
The SPR switchover period is set.
The default SPR switchover period is 60 seconds.
(Optional) Run redirect enhance enable
Redirection enhancement is enabled for a redirect-link.
By default, redirection enhancement is not enabled for a redirect-link.
If you want to use SPR when there are only non-equal-cost routes on the device, run this command to ensure that traffic is still forwarded over the link selected in SPR even if this link does not have a higher route priority.
(Optional) Run route flapping suppression period-value
The flapping suppression period is set.
By default, the flapping suppression period is not set for SPR.
When a network is unstable, SPR may switch links frequently, reducing service forwarding efficiency. After the flapping suppression period is set, SPR switches services to another link after the configured flapping suppression period expires, preventing frequent link switchovers.
- The minimum flapping suppression period is two times the SPR switchover period.
- The shortest interval of SPR switchover is the flapping suppression period plus the SPR switchover period.
(Optional) Run wtr period { seconds | days days | hours hours | minutes minutes }
The waiting time before the SPR switches from the backup link to the primary link is configured.
By default, SPR switches traffic from the backup link to the primary link immediately after it detects that the primary link recovers.
When the primary link fails, SPR switches from the primary link to the backup link. When the primary link recovers, SPR switches back from the backup link to the primary link immediately. If some important services are being transmitted on the backup link, some traffic is lost in the switchover process. To ensure transmission reliability for important services on the backup link, configure the waiting time before traffic is switched from the backup link to the primary link.
(Optional) Run backup-interface interface-type interface-number [ next-hop-address ]
The next-hop IPv4 address of the outbound interface of a best-effort link in SPR is configured.
By default, no next-hop IPv4 address of the outbound interface of a best-effort link in SPR is configured.
After a best-effort link is configured, SPR allows service flows to be transmitted over the best-effort link when links in the active and standby link groups are unavailable, ensuring high-reliability transmission.
When the best-effort link is a PPP link, you can specify only the outbound interface but not the next hop IP address for the best-effort link. If the best-effort link is a non-PPP link, for example, an Ethernet link, you must specify both the outbound interface and next hop IP address for the best-effort link. Otherwise, packets cannot be forwarded.(Optional) Run backup-ipv6-interface interface-type interface-number [ next-hop-address ]
The next-hop IPv6 address of the outbound interface of a best-effort link in SPR is configured.
By default, no next-hop IPv6 address of the outbound interface of the best-effort link is configured in SPR.
The next-hop IPv6 address configured using the backup-ipv6-interface command and next-hop IPv4 address configured using the backup-interface can belong to the same outbound interface.
If you run the backup-ipv6-interface command multiple times, only the latest configuration takes effect.
Configure a detection link, create a link group, and add the detection link to the link group.
Run prober interface-type interface-number nqa admin-name test-name
A detection link is configured.
Run link-group name
A link group is created and the link group view is displayed.
By default, no link group is created for SPR.
Run link-member { interface-type interface-number } &<1-8>
The specified detection link is added to the link group.
By default, detection links are not added to the link group.
Only interfaces having detection links configured can be added to link groups.
Run quit
Exit from the link group view.
(Optional) Configure the interface that can be automatically shut down when the backup link is not selected in SPR and set the delay in automatically shutting down the interface.
Run prober interface-type interface-number nqa admin-name test-name
A detection link is configured.
Run standby-interface { interface-type interface-number } [ track nqa admin-name test-name re-probe interface-type interface-number ]
The interface that can be automatically shut down when the backup link is not selected in SPR is configured.
By default, no interface is automatically shut down when the backup link is not selected in SPR.
In SPR, an NQA test instance is automatically performed on the master link at a long interval, failing to meet complex scenario requirements. If you select the track nqa admin-name test-name re-probe interface-type interface-number parameter, the device adds an associated NQA test instance for the specified master link interface according to the re-probe interface-type interface-number parameter. The added NQA test instance can work with the NQA test instance on the master link to provide more frequent link detection, removing the need to change the interval for performing the NQA test instance on the master link. Subsequently, link information can be obtained in a more timely manner.
Run standby-limit-time standby-limit-time
The delay in automatically shutting down an interface when the backup link is not selected is set.
By default, the delay in automatically shutting down an interface when the backup link is not selected in SPR is 3600 seconds.