ok I want to 3. Optionally Use Class-Based Weighted Fair Queuing (CBWFQ), guide me step by step in my fortigate, I want to guarantee a minimum to everybody in every vlan BUT if nobody use the bandwith then it could use untill 800-900 Mbps and if other used then it's shared equaly, don't know how to explain
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
I understand! You want a fair and dynamic bandwidth distribution where:
Each VLAN gets a guaranteed minimum (e.g., 20 Mbps).
If a VLAN doesn’t use its full guaranteed bandwidth, others can borrow it (up to ~800-900 Mbps total).
If all VLANs need bandwidth, it’s shared equally (no single VLAN can hog the link).
This is Class-Based Weighted Fair Queuing (CBWFQ) in FortiGate, but with a shared pool approach.
Step-by-Step Guide: CBWFQ with Shared Bandwidth (FortiGate 81F)
1. Create a Shared Traffic Shaper (Global Pool)
We’ll create a parent shaper that represents the total available bandwidth (1 Gbps) and then assign child shapers (one per VLAN) with guaranteed + max limits.
Go to:
code
Policy & Objects > Objects > Traffic Shaper
Create a Parent Shaper (Global Pool)
Name:Global_1Gbps_Shaper
Shaper Mode:Shared (this allows unused bandwidth to be shared)
Bandwidth:1000000 Kbps (1 Gbps)
Priority:Medium (or as needed)
Save
Create Child Shapers (One per VLAN)
For each VLAN (e.g., VLAN10, VLAN20, etc.), create a child shaper under the parent:
Name:VLAN10_Shaper
Shaper Mode:Shared (or Guaranteed if you want strict limits)
Bandwidth:20000 Kbps (20 Mbps guaranteed)
Maximum Bandwidth:50000 Kbps (50 Mbps max, if unused by others)
Parent Shaper:Global_1Gbps_Shaper
Priority:Medium (or adjust as needed)
Save
Repeat for all 40 VLANs (or use CLI for bulk creation).
2. Apply Shapers to Firewall Policies
Now, assign these shapers to your outbound internet policies (where traffic goes to WAN).
Go to:
code
Policy & Objects > Firewall Policy
Edit Each VLAN’s Internet Policy
Source:VLAN10 (or your VLAN interface)
Destination:WAN (or your internet-facing interface)
Service:ALL (or customize as needed)
Traffic Shaper: Select VLAN10_Shaper (or the corresponding shaper)
Save & Apply
Do this for all 40 VLANs.
3. Verify & Test
Check Shaper Status
Go to:
code
Monitor > Traffic Shaping
You should see bandwidth usage per VLAN.
If one VLAN is idle, others can use its unused bandwidth.
Test with Multiple Downloads
Have one VLAN download a large file (e.g., 100 Mbps).
Check if other VLANs still get their guaranteed 20 Mbps.
If no one is using bandwidth, a single VLAN can go up to ~900 Mbps (if others are idle).
Alternative: CLI Method (Faster for 40 VLANs)
If you prefer CLI, here’s how to bulk-create shapers:
bash
config firewall shaper traffic-shaper
edit "Global_1Gbps_Shaper"
set mode shared
set bandwidth 1000000
set priority medium
next
edit "VLAN10_Shaper"
set mode shared
set bandwidth 20000
set max-bandwidth 50000
set parent "Global_1Gbps_Shaper"
set priority medium
next
edit "VLAN20_Shaper"
set mode shared
set bandwidth 20000
set max-bandwidth 50000
set parent "Global_1Gbps_Shaper"
set priority medium
next
# Repeat for all 40 VLANs...
end
Then apply to policies as before.
Final Notes
✅ Guaranteed Bandwidth: Each VLAN gets 20 Mbps minimum.
✅ Shared Unused Bandwidth: If a VLAN isn’t using its full 20 Mbps, others can borrow it.
✅ Fair Sharing: If all VLANs need bandwidth, it’s shared equally (no single VLAN can hog the link).
Would you like help fine-tuning the numbers (e.g., adjusting guaranteed/max limits)? 🚀