---
title: Track and SLA
slug: aidc/track-and-sla
createdAt: 2025-12-01T11:11:07.000Z
---

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

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

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

| **Command**          | **Purpose**                |
| -------------------- | -------------------------- |
| **show sla summary** | Display SLA configuration. |

### <font color="#1d50a2">show sla summary</font>

**\[Command]**
**show sla summary**

**\[Purpose]**
Display SLA configuration.

**\[View]**
Privileged User View

**\[Use Cases]**

```plaintext
sonic# show sla summary
===================================icmp_echo====================================
Sla-id    type    dst_ip    min_time    avg_time    max_time    packt_loss
--------  ------  --------  ----------  ----------  ----------  ------------
==================================user_define===================================
Sla-id    type    user_args    customer_file_path
--------  ------  -----------  --------------------
```

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

<font color="#1d05a2">Table 2 SLA Config</font>

| Command                                                                                                          | Purpose                                     |
| ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
| **sla** *sla-id* **icmp\_echo** *dst\_ip*                                                                        | Create an ICMP Echo mode SLA instance.      |
| **sla** *sla-id* **user\_define** \[*String*]                                                                    | Create a user-defined SLA instance.         |
| **set src\_port** \{**ethernet** *interface\_name* \|**link-aggregation** *interface\_name*\|**vlan** *vlan-id*} | Set the source interface for the detection. |
| **set interval** *interval*                                                                                      | Set the detection interval.                 |
| **set timeout** *timeout*                                                                                        | Set the timeout of the detection.           |
| **set dst\_ip** *dst\_ip*                                                                                        | Set the destination IP for the detection.   |

### <font color="#1d50a2">sla *sla-id* icmp\_echo *dst\_ip*</font>

**\[Command]**
**sla** *sla-id* **icmp\_echo** *dst\_ip*

**\[Purpose]**
Create an ICMP Echo mode SLA instance.

**\[Parameters]**

| **Parameter** | **Description**                                                                            |
| ------------- | ------------------------------------------------------------------------------------------ |
| *sla-id*      | SLA ID, range from \[1,4294967295].                                                        |
| *dst\_ip*     | Specify the destination IP for detection, IPv4 or IPv6, in the format of A.B.C.D or A\::B. |

**\[View]**
Global Configuration View

**\[Notes]**
Run command **no sla** *sla-id* to delete SLA instance.

**\[Use Cases]**

```plaintext
sonic(config)# sla 2 icmp_echo 10.0.0.1
sonic(config-sla-icmp_echo)#
```

### <font color="#1d50a2">sla *sla-id* user\_define \[*String*\]</font>

**\[Command]**
**sla** *sla-id* **user\_define** \[*String*]

**\[Purpose]**
Create a user-defined SLA instance.

**\[Parameters]**

| **Parameter** | **Description**                                                                                               |
| ------------- | ------------------------------------------------------------------------------------------------------------- |
| *sla-id*      | SLA ID, range from \[1,4294967295].                                                                           |
| *String*      | Specify the path of monitoring file, the default path is /var/run/sla-user-define/sla\_user\_define\_default. |

**\[View]**
Global Configuration View

**\[Notes]**
Run command **no sla** *sla-id* to delete SLA instance.

**\[Use Cases]**

```plaintext
sonic(config)# sla 2 user_define
sonic(config-sla-user_define)#
```

### <font color="#1d50a2">set src\_port \{ethernet *interface\_name* |link-aggregation *interface\_name*|vlan *vlan-id*\}</font>

**\[Command]**
**set src\_port \{ethernet** *interface\_name* **|link-aggregation** *interface\_name*|**vlan** *vlan-id*}

**\[Purpose]**
Set the source interface for the detection.

**\[Parameters]**

| **Parameter**     | **Description**                  |
| ----------------- | -------------------------------- |
| *interface\_name* | Interface name(eg.0/1)           |
| *vlan-id*         | VLAN ID, the range is \[1,4094]. |

**\[View]**
ICMP Echo Mode SLA Configuration View

**\[Notes]**
Run command **no set src\_port \{ethernet** *interface\_name* **|link-aggregation** *interface\_name*|**vlan** *vlan-id*} to delete the source interface.

**\[Use Cases]**

```plaintext
sonic(config-sla-icmp_echo)# set src_port ethernet 0/0
sonic(config-sla-icmp_echo)#
```

### <font color="#1d50a2">set interval *interval*</font>

**\[Command]**
**set interval** *interval*

**\[Purpose]**
Set the detection interval.

**\[Parameters]**

| **Parameter** | **Description**                                                   |
| ------------- | ----------------------------------------------------------------- |
| *interval*    | Specify the detection interval in seconds, the range is \[1,300]. |

**\[View]**
ICMP Echo Mode SLA Configuration View

**\[Notes]**
Run command **no set interval** to delete the detection configuration.

**\[Use Cases]**

```plaintext
sonic(config-sla-icmp_echo)# set interval 1
```

### <font color="#1d50a2">set timeout *timeout*</font>

**\[Command]**
**set timeout** *timeout*

**\[Purpose]**
Set the timeout of the detection.

**\[Parameters]**

| **Parameter** | **Description**                                        |
| ------------- | ------------------------------------------------------ |
| *timeout*     | Specify the timeout in seconds, in the range \[1,300]. |

**\[View]**
ICMP Echo Mode SLA Configuration View

**\[Notes]**
Run command **no set timeout** *timeout* to delete the timeout configuration.

**\[Use Cases]**

```plaintext
sonic(config-sla-icmp_echo)# set timeout 1
```

### <font color="#1d50a2">set dst\_ip *dst\_ip*</font>

**\[Command]**
**set dst\_ip** *dst\_ip*

**\[Purpose]**
Set the destination IP for the detection.

**\[Parameters]**

| **Parameter** | **Description**                                                                         |
| ------------- | --------------------------------------------------------------------------------------- |
| *dst\_ip*     | Specify the destination IP for detection, IPv4 or IPv6, in the format A.B.C.D or A\::B. |

**\[View]**
User-defined SLA Configuration View

**\[Notes]**
Run command **no set dst\_ip** to delete the destination IP for the detection.

**\[Use Cases]**

```plaintext
sonic(config-sla-user_define)# set dst_ip 10.0.0.1
```

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

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

<font color="#1d05a2">Table 3 Track View</font>

| Command                | Purpose                      |
| ---------------------- | ---------------------------- |
| **show track summary** | Display track configuration. |

### <font color="#1d50a2">show track summary</font>

**\[Command]**
**show track summary**

**\[Purpose]**
Display track configuration.

**\[View]**
Privileged User View

**\[Use Cases]**

```plaintext
sonic# show track summary
Track_id    bind_sla-id    state
----------  -------------  -------
```

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

<font color="#1d05a2">Table 4 Track Config</font>

| **Command**                             | **Purpose**                                        |
| --------------------------------------- | -------------------------------------------------- |
| **track** *track\_id* **sla** *sla\_id* | Create a track instance and bind the SLA instance. |

### <font color="#1d50a2">track *track\_id* sla *sla\_id*</font>

**\[Command]**
**track** *track\_id* **sla** *sla\_id*

**\[Purpose]**
Create a track instance and bind the SLA instance.

**\[Parameters]**

| **Parameter** | **Description**                      |
| ------------- | ------------------------------------ |
| *track\_id*   | Track ID, range from \[1,4294967295] |
| *sla\_id*     | SLA ID, range from \[1,4294967295]   |

**\[View]**
Global Configuration View

**\[Notes]**
Run command **no track** *track\_id* to delete the track instance.

**\[Use Cases]**

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

