TRACK and SLA Configuration
Introduction
Section titled “Introduction”TRACK: In order 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 devices 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.
SLA: Link quality metrics serve as criteria for judging whether the links of intelligent route selection member meet quality requirements. When health checks and link quality metrics are referenced in global route selection policies or multi-exit policy routing, the device 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 device 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 device 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 Tasks | Instructions |
|---|---|
| Create an SLA Instance | Required |
| Create a TRACK Route Monitoring Instance | Required |
| Bind the SLA Instance to the TRACK Route Monitoring Instance | Required |
Creating an SLA Instance
Section titled “Creating an SLA Instance”| Operation | Command | Description |
|---|---|---|
| Enter the system configuration view | configure terminal | |
| Create an SLA Instance | sla id icmp-echo dst-ip A.B.C.D|A::B [src-port ethernet|lag|vlan ] [timeout time ] [frequency time ] | dst-ip:Specify the destination IP address |
| src-port:Set the source port for sending probes | ||
| timeout:Probe timeout wait time range: 1-3600 seconds, default value is 5 | ||
| frequency:Probe packet sending interval, range: 1-3600 seconds, default value is 5 |
Creating a TRACK Route Monitoring Instance
Section titled “Creating a TRACK Route Monitoring Instance”Create a 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.
| Operation | Command | Description |
|---|---|---|
| Enter the system configuration view | configure terminal | |
| Create a TRACK route monitoring instance | track id | |
| Add monitored routers to the route monitoring group | route A.B.C.D/M A.B.C.D [vrf-name] |
Binding the SLA Instance to the TRACK Route Monitoring Instance
Section titled “Binding the SLA Instance to the TRACK Route Monitoring Instance”| Operation | Command | Description |
|---|---|---|
| Enter track configuration view | track id | |
| Binding the SLA instance | sla id |
Display and Maintenance
Section titled “Display and Maintenance”| Operation | Command |
|---|---|
| Display track instance info | show track brief |
| Display SLA info | show sla brief |
Configuration Example
Section titled “Configuration Example”Network 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.

Procedure
- The configuration process for interconnecting IP addresses between devices is omitted here.
- Configuration on Switch 1: # Configure SLA
sonic(config)# sla 1 icmp-echo dst-ip 10.1.1.2 src-port ethernet 21sonic(config)# sla 2 icmp-echo dst-ip 20.1.1.2 src-port ethernet 22# Configure Track
sonic(config)# track 1sonic(config-track-1)# sla 1sonic(config-track-1)# route 150.1.0.1/24 10.1.1.2sonic(config)# track 2sonic(config-track-2)# sla 2sonic(config-track-2)# route 150.1.0.1/24 20.1.1.2Verify Configuration
- Display SLA and Track configuration
sonic(config)# do show sla brief===================================icmp_echo==================================== Sla_id type dst_ip min_time avg_time max_time packt_loss-------- --------- -------- ---------- ---------- ---------- ------------ 1 icmp_echo 10.1.1.2 0.772 1.089 1.431 0%
2 icmp_echo 20.1.1.2 0.849 1.128 1.446 0%
sonic(config)# do show track brief Track_id bind_sla_id state---------- ------------- ------- 1 1 success 2 2 success- Display the route info on switch1
sonic(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>* 150.1.0.0/24 [1/0] via 10.1.1.2, Ethernet21, weight 1, 00:00:14 \* via 20.1.1.2, Ethernet22, weight 1, 00:00:14- When the link between Switch 1, Switch 2, and Switch 4 encounters an obstacle, and SLA1 detects a packet loss rate of 100%, the route from Switch 2 to Switch 4 on Switch 1 will be withdrawn.
sonic(config)# do show sla brief===================================icmp_echo==================================== Sla_id type dst_ip min_time avg_time max_time packt_loss-------- --------- -------- ---------- ---------- ---------- ------------ 1 icmp_echo 10.1.1.2 0 0 0 100% 2 icmp_echo 20.1.1.2 0.729 1.273 1.673 0%
sonic(config)# do show track brief Track_id bind_sla_id state---------- ------------- ------- 1 1 failure 2 2 success
sonic(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 failure
S>* 150.1.0.0/24 [1/0] via 20.1.1.2, Ethernet22, weight 1, 00:00:51