OPNsense Forum

Archive => 18.7 Legacy Series => Topic started by: Mastah on August 17, 2018, 08:35:09 pm

Title: Traffic shaper: Pipe, Queues and Rules !
Post by: Mastah on August 17, 2018, 08:35:09 pm
Hi,

I've just moved from pfsense to opnsense, like a week ago. So far, so good !
I was just wondering if there was any possibility to visualize which queue is been used (and by how much pps).
In pfsense there was a status screen where you could do such a thing.

It would help me greatly to check if my bandswitch is used properly and is going through the proper queue !

So far, I' haven't been able to find such a screen !
If no such screen exist, is there a possibility via ssh console to lookup for it ?

Regards.
Title: Re: Traffic shaper: Pipe, Queues and Rules !
Post by: franco on August 17, 2018, 09:20:01 pm
Hi there,

Firewall: Traffic Shaper: Status doesn't show what you're looking for? Shaper in OPN is Limiter in pf so "Shaper" status may not be on par with what pf used for reading ALTQ ?


Cheers,
Franco
Title: Re: Traffic shaper: Pipe, Queues and Rules !
Post by: Mastah on August 17, 2018, 09:27:14 pm
Not really.
The status seem to be only showing the defined setup, not how are used queue/pipe

Limiters:
10000: 950.000 Mbit/s    0 ms burst 0
q75536  50 sl. 0 flows (1 buckets) sched 10000 weight 0 lmax 0 pri 0 droptail
 sched 75536 type FIFO flags 0x0 0 buckets 0 active
10001: 300.000 Mbit/s    0 ms burst 0
q75537  50 sl. 0 flows (1 buckets) sched 10001 weight 0 lmax 0 pri 0 droptail
 sched 75537 type FIFO flags 0x0 0 buckets 0 active

Queues:
q10006  50 sl. 0 flows (1 buckets) sched 10000 weight 75 lmax 0 pri 0 droptail
q10007  50 sl. 0 flows (1 buckets) sched 10000 weight 50 lmax 0 pri 0 droptail
q10004  50 sl. 0 flows (1 buckets) sched 10001 weight 1 lmax 0 pri 0 droptail
q10005  50 sl. 0 flows (1 buckets) sched 10000 weight 100 lmax 0 pri 0 droptail
q10002  50 sl. 0 flows (1 buckets) sched 10001 weight 50 lmax 0 pri 0 droptail
q10003  50 sl. 0 flows (1 buckets) sched 10001 weight 25 lmax 0 pri 0 droptail
q10000  50 sl. 0 flows (1 buckets) sched 10001 weight 100 lmax 0 pri 0 droptail
q10001  50 sl. 0 flows (1 buckets) sched 10001 weight 75 lmax 0 pri 0 droptail
q10010  50 sl. 0 flows (1 buckets) sched 10002 weight 1 lmax 0 pri 0 droptail
q10008  50 sl. 0 flows (1 buckets) sched 10000 weight 25 lmax 0 pri 0 droptail
q10009  50 sl. 0 flows (1 buckets) sched 10000 weight 1 lmax 0 pri 0 droptail
Title: Re: Traffic shaper: Pipe, Queues and Rules !
Post by: mimugmail on August 17, 2018, 09:41:48 pm
Yes, but only when there's also current traffic .. and only for the second it's called .. so no graphing etc.
Title: Re: Traffic shaper: Pipe, Queues and Rules !
Post by: Mastah on August 17, 2018, 10:04:42 pm
When there is traffic, they log I copied don't move. And i'm sure the queue are used because I can slow down the trafic from 1Gbe/s to 150Mbyte/s.
But still, the same output.
Title: Re: Traffic shaper: Pipe, Queues and Rules !
Post by: cardins2u on August 18, 2018, 07:07:14 am
@Franco,

can you post up an example of how to create it? Documentations on the wiki is a bit confusiing. I'm trying to do this traffic shaking for guest vlan too and never been sucessful at it.

could you make a simple tutorial for like 50mb/10mb pipe for guest vlan ?

thanks
Title: Re: Traffic shaper: Pipe, Queues and Rules !
Post by: mimugmail on August 18, 2018, 07:36:31 am
1. create a pipe for download, set to 50mbit
2. create a pipe for upload, set to 10mbit
3. create a rule for download, set interface GuestLAN, set direction out, set destination IP your GuestLAN
4. create a rule for upload, set interface GuestLAN, set direction in, set source IP your GuestLAN

Should be enough for this case
Title: Re: Traffic shaper: Pipe, Queues and Rules !
Post by: cardins2u on August 18, 2018, 07:56:09 am
1. create a pipe for download, set to 50mbit
2. create a pipe for upload, set to 10mbit
3. create a rule for download, set interface GuestLAN, set direction out, set destination IP your GuestLAN
4. create a rule for upload, set interface GuestLAN, set direction in, set source IP your GuestLAN

Should be enough for this case

awesome! does this apply only traffic to WAN. or Does applies to local traffic as well?
Title: Re: Traffic shaper: Pipe, Queues and Rules !
Post by: mimugmail on August 18, 2018, 07:59:45 am
Since you bound it in tab rules to Guest VLAN interface it's just for Guest ;)
Title: Re: Traffic shaper: Pipe, Queues and Rules !
Post by: cardins2u on August 18, 2018, 08:08:28 am
Heres what I have so far. I cannot find set direction like you stated.

Title: Re: Traffic shaper: Pipe, Queues and Rules !
Post by: cardins2u on August 18, 2018, 08:55:17 am
YAY I got it working

@Franco !!!!

We should add Alias to Traffic Shaping too! SO we can have multiple sources nets.
Title: Re: Traffic shaper: Pipe, Queues and Rules !
Post by: franco on September 03, 2018, 04:16:12 pm
Yes, as firewall alias API progresses we can talk about this feature. :)


Cheers,
Franco