跳转到内容
Ask AI

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.

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.

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

PurposeCommandDescription
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 millisecondsmilliseconds:the range is [200,3000]. The default value is 200.
(Optional)Configure the number of ICMP probe packets.set count countcount: the range is [1,100]. The default value is 5.
(Optional) Configure the interval between two SLA probes.set frequency intervalinterval: the range is [1,3600]. The default value is 10.
(Optional) Configure the SLA timeout duration.set timeout secondsseconds: the range is [1,3600]. The default value is 1.

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

PurposeCommandDescription
Enter global configuration view.configure terminal-
Create a track instance and bind sla instance.track track_id sla sla_idtrack_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 instanceip route A.B.C.D/M A.B.C.D track track-id-

Table 3 SLA and track display and maintenance

PurposeCommandDescription
Display SLA info.show sla summary-
Display TRACK info.show track summary-
  1. 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.

  1. 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.
  2. 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
  1. 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