TRACK and SLA Configuration Guide
此内容尚不支持你的语言。
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 | Index |
|---|---|---|
| Create an SLA Instance | Required | Creating an SLA Instance |
| Create a TRACK Route Monitoring Instance | Required | Create a TRACK Route Monitoring Instance |
| Bind the SLA Instance to the TRACK Route Monitoring Instance | Required | Bind the SLA Instance to the TRACK Route Monitoring Instance |
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 | 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 | |
| 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 | |
| Binding the SLA instance | sla |
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 setup, packets are forwarded between devices via static routing, with ECMP (Equal-Cost Multi-Path) configured on both Device1 and Device4, where the next hops are set to Device2 and Device3 respectively. When a link failure occurs on either Device2 or Device3, the track and SLA (Service Level Agreement) functions on Device1 and Device4 can promptly detect the link outage and trigger rapid route convergence.

Procedure
- The configuration process for interconnecting IP addresses between devices is omitted here.
- Configuration on Device 1:
# Configure SLA
sonic(config)# sla 1 icmp-echo dst-ip 10.1.1.2 src-port ethernet 5sonic(config)# sla 2 icmp-echo dst-ip 20.1.1.2 src-port ethernet 6# 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 briefTrack_id bind_sla_id state---------- ------------- -------1 1 success2 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 - backupt - trapped, o - offload failureS>\* 150.1.0.0/24 \[1/0\] via 10.1.1.2, Ethernet5, weight 1, 00:00:14\* via 20.1.1.2, Ethernet6, weight 1, 00:00:14- When the link between Device 1, Device 2, and Device 4 encounters an obstacle, and SLA1 detects a packet loss rate of 100%, the route from Device 2 to Device 4 on Device 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 briefTrack_id bind_sla_id state---------- ------------- -------1 1 failure2 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 - backupt - trapped, o - offload failureS>\* 150.1.0.0/24 \[1/0\] via 20.1.1.2, Ethernet6, weight 1, 00:00:51