Track and SLA Configuration Guide
此内容尚不支持你的语言。
To further improve network reliability, redundancy protection methods are commonly used in practice, where two devices backup each other and can also share the workload. When one of the switches experiences a link failure, the other device can take over to continue forwarding user traffic. This results in a situation where a device accesses both primary and backup devices. This also creates issues of link reliability and load balancing between devices. When part or all of the network-side links fail, the bandwidth of these links’ decreases, and the access side may not immediately detect the occurrence of this failure, leading to network congestion or loss of traffic. Therefore, by configuring TRACK monitoring groups, routes can be withdrawn promptly after a link failure to prevent traffic from being forwarded through the failed link.
Link quality metrics serve as criteria for judging whether the links of intelligent route selection meet quality requirements. When health checks and link quality metrics are referenced in global route selection policies or multi-exit policy routing, the switch continuously checks whether the quality of interface links (delay, jitter, and packet loss rate) meets the quality requirements specified by the link quality metrics. Links that do not meet the requirements do not participate in intelligent route selection until the link quality meets the requirements again.
Explanation of Principles
Section titled “Explanation of Principles”The network administrator configures static routes on the router, instructing the switch how to forward packets to the destination network. Additionally, the administrator configures route monitoring groups. After configuring the route monitoring group, the switch actively sends ICMP request packets to the specified IP address. Based on network performance and packet loss rate information, it determines whether the IP address is reachable. When the target address is unreachable, the switch proactively withdraws the statically configured route, enabling fault tolerance in the network and ensuring high availability and stability.
Track and SLA configuration
Section titled “Track and SLA configuration”Configure SLA
Section titled “Configure SLA”Configure SLA policies to detect information such as network performance, reliability, and packet loss rate. Detect if the IP address is reachable by sending ICMP request messages to the specified IP address. This helps network administrators determine the optimal data transmission path.
Table 1 Configure SLA instance
| Purpose | Command | Description |
|---|---|---|
| Enter global configuration view. | configure terminal | - |
| Create an SLA instance. | sla sla-id icmp_echo {A.B.C.D|A::B} | id: sla instance id,the value range is 1-4294967295.ip address: Specify the destination IP address |
| (Optional) Configure the source port for sending probes. | set src_port {ethernet interface-name[.subinterface-number ]|link-aggregation lag-id[.subinterface-number ]| vlan vlan-id} | - |
| (Optional) Configure the ICMP packet transmission interval. | set interval milliseconds | milliseconds:the range is [200,3000]. The default value is 200. |
| (Optional)Configure the number of ICMP probe packets. | set count count | count: the range is [1,100]. The default value is 5. |
| (Optional) Configure the interval between two SLA probes. | set frequency interval | interval: the range is [1,3600]. The default value is 10. |
| (Optional) Configure the SLA timeout duration. | set timeout seconds | seconds: the range is [1,3600]. The default value is 1. |
Configure track
Section titled “Configure track”Create track monitoring instance and bind it with a static route and SLA instance. When the destination IP address probed by SLA is unreachable, use the track to notify the static route to delete, ensuring that packets are no longer forwarded through that route. When the probing result of SLA is restored, the static route is automatically restored.
Table 2 Create track instance and bind SLA instance
| Purpose | Command | Description |
|---|---|---|
| Enter global configuration view. | configure terminal | - |
| Create a track instance and bind sla instance. | track track_id sla sla_id | track_id: track instance id, the value range is 1-4294967295.sla_id: sla instance id, the value range is 1-4294967295 |
| Create static route and bind track instance | ip route A.B.C.D/M A.B.C.D track track-id | - |
Display and Maintenance
Section titled “Display and Maintenance”Table 3 SLA and track display and maintenance
| Purpose | Command | Description |
|---|---|---|
| Display SLA info. | show sla summary | - |
| Display TRACK info. | show track summary | - |
Typical Configuration Example
Section titled “Typical Configuration Example”- Networking Requirements In the network topology, switches use static routes for packet forwarding, and on Switch1 and Switch4, Equal-Cost Multi-Path (ECMP) is configured, with the next hops being Switch2 and Switch3 respectively. When there is a link failure on either Switch2 or Switch3, Switch1 and Switch4 can promptly detect the link failure using track and SLA functionalities and quickly converge the routes.

- Configure Roadmap (1) Connect the links according to the topology diagram and verify that all switch ports are up. (2) Configure IP for interfaces. (3) Configure SLA. (4) Configure Track. (5) Configure Static routes.
- Procedure Switch 1 Configure IP for interfaces.
sonic(config)# interface ethernet 0/20sonic(config-if-0/20)# ip address 172.16.10.1/24sonic(config-if-0/20)# exitsonic(config)# interface ethernet 0/21sonic(config-if-0/21)# ip address 10.0.2.1/24sonic(config-if-0/21)# exitsonic(config)# interface ethernet 0/22sonic(config-if-0/22)# ip address 10.0.3.1/24sonic(config-if-0/22)# exitConfigure SLA.
sonic(config)# sla 1 icmp_echo 10.0.2.2sonic(config-sla-icmp_echo)# set src_port ethernet 0/21sonic(config-sla-icmp_echo)# exitsonic(config)# sla 2 icmp_echo 10.0.3.2sonic(config-sla-icmp_echo)# set src_port ethernet 0/22sonic(config-sla-icmp_echo)# exitConfigure TRACK.
sonic(config)# track 1 sla 1sonic(config)# track 2 sla 2Configure routes.
sonic(config)# ip route 172.16.20.1/24 10.0.2.2 track 1sonic(config)# ip route 172.16.20.1/24 10.0.3.2 track 2Switch2 Configure IP for interfaces.
sonic(config)# interface ethernet 0/0sonic(config-if-0/0)# ip address 10.0.2.2/24sonic(config-if-0/0)# exitsonic(config)# interface ethernet 0/4sonic(config-if-0/4)# ip address 10.0.12.2/24sonic(config-if-0/4)# exitConfigure routes.
sonic(config)# ip route 172.16.20.1/24 10.0.12.1sonic(config)# ip route 172.16.10.1/24 10.0.2.1Switch3 Configure IP for interfaces.
sonic(config)# interface ethernet 0/0sonic(config-if-0/0)# ip address 10.0.3.2/24sonic(config-if-0/0)# exitsonic(config)# interface ethernet 0/4sonic(config-if-0/4)# ip address 10.0.13.2/24sonic(config-if-0/4)# exitConfigure routes.
sonic(config)# ip route 172.16.20.1/24 10.0.13.1sonic(config)# ip route 172.16.10.1/24 10.0.3.1Switch4 Configure IP for interfaces.
sonic(config)# interface ethernet 0/20sonic(config-if-0/20)# ip address 172.16.20.1/24sonic(config-if-0/20)# exitsonic(config)# interface ethernet 0/21sonic(config-if-0/21)# ip address 10.0.12.1/24sonic(config-if-0/21)# exitsonic(config)# interface ethernet 0/22sonic(config-if-0/22)# ip address 10.0.13.1/24sonic(config-if-0/22)# exitConfigure SLA.
sonic(config)# sla 1 icmp_echo 10.0.12.2sonic(config-sla-icmp_echo)# set src_port ethernet 0/21sonic(config-sla-icmp_echo)# exitsonic(config)# sla 2 icmp_echo 10.0.13.2sonic(config-sla-icmp_echo)# set src_port ethernet 0/22sonic(config-sla-icmp_echo)# exitConfigure TRACK.
sonic(config)# track 1 sla 1sonic(config)# track 2 sla 2Configure routes.
sonic(config)# ip route 172.16.10.1/24 10.0.12.2 track 1sonic(config)# ip route 172.16.10.1/24 10.0.13.2 track 2- Verify the configuration.
Switch1 Display track and sla configuration.
sonic# show track summary Track_id bind_sla_id state---------- ------------- ------- 1 1 success 2 2 successsonic# show sla summary===================================icmp_echo==================================== Sla_id type dst_ip min_time avg_time max_time packt_loss-------- --------- -------- ---------- ---------- ---------- ------------ 1 icmp_echo 10.0.2.2 0.223 0.321 0.398 0.0% 2 icmp_echo 10.0.3.2 0.199 0.243 0.295 0.0%Switch 1 has ECMP routes to Switch 4.
sonic# show ip routeCodes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR, f - OpenFabric, > - selected route, * - FIB route, q - queued, r - rejected, b - backup t - trapped, o - offload failureS>* 172.16.20.0/24 [1/0] via 10.0.2.2, Ethernet21, weight 1, 00:00:14 * via 10.0.3.2, Ethernet22, weight 1, 00:00:14A link failure occurs on the path from Switch 1 to Switch 2 to Switch 4, SLA1 packet loss rate reaches 100%, and Switch 1 withdraws the route from Switch 2 to Switch 4.
sonic# show sla summary===================================icmp_echo==================================== Sla_id type dst_ip min_time avg_time max_time packt_loss-------- --------- -------- ---------- ---------- ---------- ------------ 1 icmp_echo 10.0.2.2 0 0 0 100% 2 icmp_echo 10.0.3.2 0.729 1.273 1.673 0%sonic# show track summary Track_id bind_sla_id state---------- ------------- ------- 1 1 failure 2 2 successsonic(config)# do show ip routeCodes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR, f - OpenFabric, > - selected route, * - FIB route, q - queued, r - rejected, b - backup t - trapped, o - offload failureS>* 172.16.20.0/24 [1/0] via 10.0.2.2, Ethernet21, weight 1, 00:00:14(unreachable) * via 10.0.3.2, Ethernet22, weight 1, 00:00:14