Configuration Guide
Track and SLA Configuration Guide
17 min
introduction introduction track track 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 sla sla 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 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 track and sla configuration configure sla 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 table 1 configure sla instance true 200,240 90221696690122,220 09778303309878left #4283c7 unhandled content type left #4283c7 unhandled content type left #4283c7 unhandled content type left unhandled content type left unhandled content type left unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type left unhandled content type left unhandled content type left unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type left unhandled content type left unhandled content type left unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type left unhandled content type left unhandled content type left unhandled content type configure track 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 table 2 create track instance and bind sla instance true 189,187 46485260770973,284 53514739229024left #4283c7 unhandled content type left #4283c7 unhandled content type left #4283c7 unhandled content type left unhandled content type left unhandled content type left unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type left unhandled content type left unhandled content type left unhandled content type display and maintenance display and maintenance table 3 sla and track display and maintenance table 3 sla and track display and maintenance true 220,220,221left #4283c7 unhandled content type left #4283c7 unhandled content type left #4283c7 unhandled content type left unhandled content type left unhandled content type left unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type typical configuration example 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/20 sonic(config if 0/20)# ip address 172 16 10 1/24 sonic(config if 0/20)# exit sonic(config)# interface ethernet 0/21 sonic(config if 0/21)# ip address 10 0 2 1/24 sonic(config if 0/21)# exit sonic(config)# interface ethernet 0/22 sonic(config if 0/22)# ip address 10 0 3 1/24 sonic(config if 0/22)# exit configure sla sonic(config)# sla 1 icmp echo 10 0 2 2 sonic(config sla icmp echo)# set src port ethernet 0/21 sonic(config sla icmp echo)# exit sonic(config)# sla 2 icmp echo 10 0 3 2 sonic(config sla icmp echo)# set src port ethernet 0/22 sonic(config sla icmp echo)# exit configure track sonic(config)# track 1 sla 1 sonic(config)# track 2 sla 2 configure routes sonic(config)# ip route 172 16 20 1/24 10 0 2 2 track 1 sonic(config)# ip route 172 16 20 1/24 10 0 3 2 track 2 switch2 configure ip for interfaces sonic(config)# interface ethernet 0/0 sonic(config if 0/0)# ip address 10 0 2 2/24 sonic(config if 0/0)# exit sonic(config)# interface ethernet 0/4 sonic(config if 0/4)# ip address 10 0 12 2/24 sonic(config if 0/4)# exit configure routes sonic(config)# ip route 172 16 20 1/24 10 0 12 1 sonic(config)# ip route 172 16 10 1/24 10 0 2 1 switch3 configure ip for interfaces sonic(config)# interface ethernet 0/0 sonic(config if 0/0)# ip address 10 0 3 2/24 sonic(config if 0/0)# exit sonic(config)# interface ethernet 0/4 sonic(config if 0/4)# ip address 10 0 13 2/24 sonic(config if 0/4)# exit configure routes sonic(config)# ip route 172 16 20 1/24 10 0 13 1 sonic(config)# ip route 172 16 10 1/24 10 0 3 1 switch4 configure ip for interfaces sonic(config)# interface ethernet 0/20 sonic(config if 0/20)# ip address 172 16 20 1/24 sonic(config if 0/20)# exit sonic(config)# interface ethernet 0/21 sonic(config if 0/21)# ip address 10 0 12 1/24 sonic(config if 0/21)# exit sonic(config)# interface ethernet 0/22 sonic(config if 0/22)# ip address 10 0 13 1/24 sonic(config if 0/22)# exit configure sla sonic(config)# sla 1 icmp echo 10 0 12 2 sonic(config sla icmp echo)# set src port ethernet 0/21 sonic(config sla icmp echo)# exit sonic(config)# sla 2 icmp echo 10 0 13 2 sonic(config sla icmp echo)# set src port ethernet 0/22 sonic(config sla icmp echo)# exit configure track sonic(config)# track 1 sla 1 sonic(config)# track 2 sla 2 configure routes sonic(config)# ip route 172 16 10 1/24 10 0 12 2 track 1 sonic(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 success 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 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 route codes 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> 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 14 a 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 success sonic(config)# do show ip route codes 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> 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
