---
title: Track and SLA Configuration Guide
slug: aidc/track-and-sla-configuration-guide
description: Reliability Configuration Guide
createdAt: 2025-11-12T12:13:53.657Z
---

## <font color="#1d50a2">Introduction</font>

### <font color="#1d50a2">Track</font>

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.

### <font color="#1d50a2">SLA</font>

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.

## <font color="#1d50a2">Explanation of Principles</font>

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.

## <font color="#1d50a2">Track and SLA configuration</font>

### <font color="#1d50a2">Configure SLA</font>

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.

<font color="#1d05a2">Table 1 Configure SLA instance</font>

| **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.                                             |

### <font color="#1d50a2">Configure track</font>

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.

<font color="#1d05a2">Table 2 Create track instance and bind SLA instance</font>

| **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* | -                                                                                                                           |

## <font color="#1d50a2">Display and Maintenance</font>

<font color="#1d05a2">Table 3 SLA and track display and maintenance</font>

| **Purpose**         | **Command**            | **Description** |
| ------------------- | ---------------------- | --------------- |
| Display SLA info.   | **show sla summary**   | -               |
| Display TRACK info. | **show track summary** | -               |

## <font color="#1d50a2">Typical Configuration Example</font>

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.

::Image[]{src="https://app.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/kjchT7o34r4DCTz9CJ6el-20251128-085744.png" size="80" width="619" height="280" position="center" caption="Figure 12 Topology Of Typical Scenario Of TRACK" showCaption="true"}

2. 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.
3. Procedure
   **Switch 1**
   Configure IP for interfaces.

```plaintext
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
```

:::Paragraph{indent="1"}
Configure SLA.
:::

```plaintext
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
```

:::Paragraph{indent="1"}
Configure TRACK.
:::

```plaintext
sonic(config)# track 1 sla 1
sonic(config)# track 2 sla 2
```

:::Paragraph{indent="1"}
Configure routes.
:::

```plaintext
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
```

:::Paragraph{indent="1"}
**Switch2**
Configure IP for interfaces.
:::

```plaintext
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
```

:::Paragraph{indent="1"}
Configure routes.
:::

```plaintext
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
```

:::Paragraph{indent="1"}
**Switch3**
Configure IP for interfaces.
:::

```plaintext
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
```

:::Paragraph{indent="1"}
Configure routes.
:::

```plaintext
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
```

:::Paragraph{indent="1"}
**Switch4**
Configure IP for interfaces.
:::

```plaintext
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
```

:::Paragraph{indent="1"}
Configure SLA.
:::

```plaintext
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
```

:::Paragraph{indent="1"}
Configure TRACK.
:::

```plaintext
sonic(config)# track 1 sla 1
sonic(config)# track 2 sla 2
```

:::Paragraph{indent="1"}
Configure routes.
:::

```plaintext
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
```

4. Verify the configuration.

:::Paragraph{indent="1"}
**Switch1**
Display track and sla configuration.
:::

```plaintext
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%
```

:::Paragraph{indent="1"}
Switch 1 has ECMP routes to Switch 4.
:::

```plaintext
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
```

:::Paragraph{indent="1"}
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.
:::

```plaintext
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
```

