---
title: Traffic Behavior
slug: aidc/traffic-behavior
createdAt: 2025-12-01T11:11:08.000Z
---

## <font color="#1d50a2">Traffic Behavior View</font>

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

| **Command**                                            | **Purpose**                        |
| ------------------------------------------------------ | ---------------------------------- |
| **show traffic behavior** \[*traffic\_behavior\_name*] | Display the configured CAR policy. |

### <font color="#1d50a2">show traffic behavior \[*traffic\_behavior\_name*\]</font>

**\[Command]**
**show traffic behavior** \[*traffic\_behavior\_name*]

**\[Purpose]**
Display the configured CAR(Committed Access Rate) policy.

**\[Parameters]**

| **Parameter**             | **Description**        |
| ------------------------- | ---------------------- |
| *traffic\_behavior\_name* | Traffic behavior name. |

**\[View]**
Privileged User View

**\[Use Cases]**

```plaintext
sonic# show traffic behavior
Name    Type    Mode       CIR    CBS
------  ------  ------  ------  -----
test    BYTES   SR_TCM  100000  64000
```

## <font color="#1d50a2">Traffic Behavior Config</font>

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

| **Command**                                                                                                                | **Purpose**                                                |
| -------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| **traffic behavior** *traffic\_behavior\_name* (Global Configuration View)                                                 | Create a traffic behavior and enter Traffic Behavior View. |
| **car** \{**sr-tcm**\|**tr-tcm**} \[**meter-type bytes**] **cir** *cir* \[**cbs** *cbs*] \[**pir** *pir*] \[**pbs** *pbs*] | Add a byte-mode CAR policy.                                |
| **car** \{**sr-tcm**\|**tr-tcm**} **meter-typepackets cir** *cir* \[**cbs** *cbs*] \[**pir** *pir*] \[**pbs** *pbs*]       | Add a packet-mode CAR policy.                              |
| **traffic-behavior** *traffic\_behavior\_name* (Physical Interface Configuration View)                                     | Apply the CAR policy to an interface.                      |

### <font color="#1d50a2">traffic behavior *traffic\_behavior\_name* (Global Configuration View)</font>

**\[Command]**
**traffic behavior** *traffic\_behavior\_name*

**\[Purpose]**
Create a traffic behavior and enter Traffic Behavior View.

**\[Parameters]**

| **Parameter**             | **Description**        |
| ------------------------- | ---------------------- |
| *traffic\_behavior\_name* | Traffic behavior name. |

**\[View]**
Global Configuration View

**\[Notes]**
Run command **no traffic behavior** *traffic\_behavior\_name* to delete the traffic behavior.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# traffic behavior test
sonic(config-traffic-behavior-test)#
```

### <font color="#1d50a2">car \{sr-tcm|tr-tcm\} \[meter-type bytes\] cir *cir*  \[cbs *cbs*\] \[pir *pir*\] \[pbs *pbs*\]</font>

**\[Command]**
**car** \{**sr-tcm**|**tr-tcm**} \[**meter-type bytes**] **cir** *cir* \[**cbs** *cbs*] \[**pir** *pir*] \[**pbs** *pbs*]

**\[Purpose]**
Add a byte-mode CAR policy.

**\[Parameters]**

| **Parameter** | **Description**                                                                                |
| ------------- | ---------------------------------------------------------------------------------------------- |
| **sr-tcm**    | Single Rate Three Color Marker mode                                                            |
| **tr-tcm**    | Two Rate Three Color Marker mode                                                               |
| *cir*         | Specify CIR(Committed Information Rate) in bps. The range is 62500\~2400000000000.             |
| *cbs*         | Specify CBS(Committed Burst Size) in bytes. The range is 1000\~1500000000.                     |
| *pir*         | Specify PIR(Peak Information Rate) in bps(only for tr-tcm). The range is 62500\~2400000000000. |
| *pbs*         | Specify PBS(Peak Burst Size) in bytes(only for tr-tcm). The range is 1000\~1500000000.         |

**\[View]**
traffic behavior Configuration View

**\[Notes]**
If not specified the mode, the default is byte-mode.
Run command **no car** to delete the CAR policy.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# traffic behavior test
sonic(config-traffic-behavior-test)# car sr-tcm meter-type PACKETS cir 1000000
```

### <font color="#1d50a2">car \{sr-tcm|tr-tcm\} meter-type packets cir *cir*  \[cbs *cbs*\] \[pir *pir*\] \[pbs *pbs*\]</font>

**\[Command]**
**car** \{**sr-tcm**|**tr-tcm**} **meter-type packets cir** *cir* \[**cbs** *cbs*] \[**pir** *pir*] \[**pbs** *pbs*]

**\[Purpose]**
Add a packet-mode CAR policy.

**\[Parameters]**

| **Parameter** | **Description**                                                                            |
| ------------- | ------------------------------------------------------------------------------------------ |
| **sr-tcm**    | Single Rate Three Color Marker mode                                                        |
| **tr-tcm**    | Two Rate Three Color Marker mode                                                           |
| *cir*         | Specify CIR(Committed Information Rate) in pps. The range is 78 \~ 3000000000.             |
| *cbs*         | Specify CBS(Committed Burst Size) in packets. The range is 10 \~ 15000000.                 |
| *pir*         | Specify PIR(Peak Information Rate) in pps(only for tr-tcm). The range is 78 \~ 3000000000. |
| *pbs*         | Specify PBS(Peak Burst Size) in packets(only for tr-tcm). The range is 10 \~ 15000000.     |

**\[View]**
traffic behavior Configuration View

**\[Notes]**
Run command **no car** to delete the CAR policy.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# traffic behavior test
sonic(config-traffic-behavior-test)# car sr-tcm meter-type PACKETS cir 1000000
```

### <font color="#1d50a2">traffic-behavior *traffic\_behavior\_name* (Physical Interface Configuration View)</font>

**\[Command]**
**traffic-behavior** *traffic\_behavior\_name*

**\[Purpose]**
Apply the CAR policy to an interface.

**\[Parameters]**

| **Parameter**             | **Description**        |
| ------------------------- | ---------------------- |
| *traffic\_behavior\_name* | Traffic behavior name. |

**\[View]**
Physical Interface Configuration View

**\[Notes]**
Run command **no traffic-behavior** to unbind the CAR policy to an interface.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# interface ethernet 0/124
sonic(config-if-0/124)# traffic-behavior TEST
sonic(config-if-0/124)# show this
!
interface ethernet 0/124
 traffic-behavior TEST
```

