# Traffic Shaper setting on OPNsense ###### tags: `Traffic Shaper` ## 1. Topology  ## 2. Enable Shaper on OPNsense Test Case1: When want to set upload 10M and download 20M bandwidth. a. Add two bandwidth on pipes, one for 10M bandwidth another for 20M bandwidth. **Edit Pipe** (10M) | Option | Value | Note | | -------- | -------- |------| | Enabled | Checked | | | Bandwidth | 10 | | | Bandwidth Metric | Mbit/s | | | Mask | (none) | | | Enable CoDel | Unchecked | | | Enable PIE | Unchecked | | | Description | 10M | | **Edit Pipe** (20M) | Option | Value | Note | | -------- | -------- |------| | Enabled | Checked | | | Bandwidth | 20 | | | Bandwidth Metric | Mbit/s | | | Mask | (none) | | | Enable CoDel | Unchecked | | | Enable PIE | Unchecked | | | Description | 20M | |  b. Add rules for limit download traffic **Edit rule** (20M) | Option | Value | Note | | -------- | -------- |------| | Enabled | Checked | | | Sequence | 1 | | | Interface | LAN | | | Proto | ip | | | Source | any | | | Invert source | Unchecked | | | Src-port | any | | | Destination | 192.168.1.0/24 | | | Invert destination | Unchecked | | | Dst-port | any | | | Target | 20M | | | Description | download 20M | | c. Add rule for limit up traffic **Edit rule** (10M) | Option | Value | Note | | -------- | -------- |------| | Enabled | Checked | | | Sequence | 2 | | | Interface | WAN | | | Proto | ip | | | Source | 192.168.1.0/24 | | | Invert source | Unchecked | | | Src-port | any | | | Destination | any | | | Invert destination | Unchecked | | | Dst-port | any | | | Target | 10M | | | Description | upload 10M | |  Test Case2: When want to set upload 10M and download 20M bandwidth per user. **Edit Pipe** (10M per user) | Option | Value | Note | | -------- | -------- |------| | Enabled | Checked | | | Bandwidth | 10 | | | Bandwidth Metric | Mbit/s | | | Mask | source | | | Enable CoDel | Unchecked | | | Enable PIE | Unchecked | | | Description | 10M | | **Edit Pipe** (20M per user) | Option | Value | Note | | -------- | -------- |------| | Enabled | Checked | | | Bandwidth | 20 | | | Bandwidth Metric | Mbit/s | | | Mask | destination | | | Enable CoDel | Unchecked | | | Enable PIE | Unchecked | | | Description | 20M | | Rules as the same test case 1. ## 3. Test shaper work normal a. Use PC1 open web browser go to speed test web site. https://www.speedtest.net/ b. Click Go button to verify traffic bandwidth and wait test result.  c. Use PC1 and PC2 run speed test as the same time. It can get PC1 and PC2 Download and upload value as the same. (Download 19.2x Mbps, Upload 9.7x Mbps) ## Reference 1. [Limit maximum internet bandwidth users can consume](https://docs.opnsense.org/manual/how-tos/shaper_limit_per_user.html) 2. [Share internet bandwidth amongst users evenly](https://docs.opnsense.org/manual/how-tos/shaper_share_evenly.html)
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up