---
title: Traffic Shaping
slug: routing/traffic-shaping
createdAt: 2025-12-04T03:57:08.728Z
---

## <font color="#1d50a2">Traffic Shaping</font>

### <font color="#1d50a2">port-shaper enable *pir* *pbs*</font>

**\[Command]**
**port-shaper enable *pir* *pbs***

**\[Purpose]**
Configure interface traffic shaping

**\[Parameter]**

| **Parameter**  | **Description**                                                      |
| -------------- | -------------------------------------------------------------------- |
| *pir \<value>* | Specifies the peak information rate of the queue, the unit is byte/s |
| *pbs \<value>* | Specifies the peak burst size of the queue, the unit is byte         |

**\[View]**
Interface view

**\[Usage Scenario]**
The traffic shaping of the interface can be directly configured based on the interface, and the effective direction is the output direction of the interface.

**\[Use Cases]**

```plaintext
sonic(config)# interface ethernet 1
sonic(config-if-1)# port-shaper enable 5000000 2000000
```

