Reply
Member
Posts: 131
Registered: ‎04-10-2014
Kudos: 118
Solutions: 10
Contributions: 1
Accepted Solution

Setting Class of Service on interfaces with edgeOS ?

[ Edited ]

Hi,

For my ISP services to work I need to set class of traffic on some VLANs.

For this I used this method : http://community.ubnt.com/t5/EdgeMAX/Problems-setting-Class-of-Service/m-p/416441#M5939

Works great, but still have to make it at every boot (and relaunch some processes like a DHCP client as it needsthis priority set to get an IP)/

So as of today I have this as a startup script :

#!/bin/sh -e
/sbin/vconfig set_egress_map eth1.840 0 5
/sbin/vconfig set_egress_map eth1.838 0 4
/sbin/vconfig set_egress_map eth1.840 1 5
/sbin/vconfig set_egress_map eth1.838 1 4
/sbin/vconfig set_egress_map eth1.840 2 5
/sbin/vconfig set_egress_map eth1.838 2 4
/sbin/vconfig set_egress_map eth1.840 3 5
/sbin/vconfig set_egress_map eth1.838 3 4
/sbin/vconfig set_egress_map eth1.840 4 5
/sbin/vconfig set_egress_map eth1.838 4 4
/sbin/vconfig set_egress_map eth1.840 5 5
/sbin/vconfig set_egress_map eth1.838 5 4
/sbin/vconfig set_egress_map eth1.840 6 5
/sbin/vconfig set_egress_map eth1.838 6 4
/sbin/vconfig set_egress_map eth1.840 7 5
/sbin/vconfig set_egress_map eth1.838 7 4
/sbin/vconfig set_egress_map eth1.851 0 6
/sbin/vconfig set_egress_map eth1.851 1 6
/sbin/vconfig set_egress_map eth1.851 2 6
/sbin/vconfig set_egress_map eth1.851 3 6
/sbin/vconfig set_egress_map eth1.851 6 6
/sbin/vconfig set_egress_map eth1.851 5 6
/sbin/vconfig set_egress_map eth1.851 6 6
/sbin/vconfig set_egress_map eth1.851 7 6
dhclient -cf /config/scripts/post-config.d/dhclient.conf br0
/sbin/start-stop-daemon --start --startas /sbin/igmpproxy --make-pidfile --pidfile /var/run/igmpproxy.pid --background -- /etc/igmpproxy.conf
exit 0

 (yes I could loop the priority settings)

Due to this vconfig method, I have to launch the dhcp manually here, and then start igmpproxy again (it failed before as br0 had no IP)

Setting the service class in the CLI would avoid all these things and make my setup work "out of the box".

Would it be possible to have this in CLI ? Don't look like a huge thing to implement and that's pretty common for ISP to use these.

Or have I missed something and I can already manage this via CLI ?

Thanks,


Accepted Solutions
Member
Posts: 131
Registered: ‎04-10-2014
Kudos: 118
Solutions: 10
Contributions: 1

Re: Setting Class of Service on interfaces with edgeOS ?

Fixed in 1.6a3

 

For my need, I would set egress like this in CLI

 

set interfaces ethernet eth1 vif 851 egress-qos "0:6 1:6 2:6 3:6 5:6 6:6 7:6"
set interfaces ethernet eth1 vif 840 egress-qos "0:5 1:5 2:5 3:5 4:5 5:5 6:5 7:5"
set interfaces ethernet eth1 vif 838 egress-qos "0:4 1:4 2:4 3:4 4:4 5:4 6:4 7:4"

 And in config.boot 

 

        vif 838 {
            bridge-group {
                bridge br0
            }
            description TV
            egress-qos "0:4 1:4 2:4 3:4 4:4 5:4 6:4 7:4"
        }
        vif 840 {
            bridge-group {
                bridge br0
            }
            description TV
            egress-qos "0:5 1:5 2:5 3:5 4:5 5:5 6:5 7:5"
        }
        vif 851 {
            description VoIP
            egress-qos "0:6 1:6 2:6 3:6 5:6 6:6 7:6"
        }

 

That was the very last piece to get rid of my boot scripts, THANKS !

View solution in original post


All Replies
New Member
Posts: 14
Registered: ‎05-01-2014
Kudos: 5

Re: Setting Class of Service on interfaces with edgeOS ?

If it matters, I need this also ;-)

Previous Employee
Posts: 13,551
Registered: ‎06-10-2011
Kudos: 5465
Solutions: 1656
Contributions: 2

Re: Setting Class of Service on interfaces with edgeOS ?

Right this is not available in the configuration yet. Using the "egress-qos-map" setting for "ip link" has also been discussed before, but that is only usable at the time when the VLAN is created. Do you think that would be sufficient (i.e., not supporting changing the map after the device is already created)? If so that should make the implementation more straightforward.

Highlighted
Member
Posts: 131
Registered: ‎04-10-2014
Kudos: 118
Solutions: 10
Contributions: 1

Re: Setting Class of Service on interfaces with edgeOS ?

Not sure I get it right.

You mean we wouldn't be able to modify the priority dynamically ? That the priority is set once and *for all* at vlan creation time ?

If so, yes, this is a one time setup, could be hardcoded, those VLAN will always have the same priority unless the setup totally changes.

 

Does it answer your question ?

Previous Employee
Posts: 13,551
Registered: ‎06-10-2011
Kudos: 5465
Solutions: 1656
Contributions: 2

Re: Setting Class of Service on interfaces with edgeOS ?

Yeah I mean one possible approach would be to add a config setting like "set interfaces ethernet eth0 vif 100 egress-qos-map <mapping>", and that can get applied when the VLAN device is created, and for simplicity we could disallow the user to change that setting after it's already created (if you delete the interface and create it again, a different mapping can be set of course). If that is sufficient, the implementation would be more straightforward.

Member
Posts: 131
Registered: ‎04-10-2014
Kudos: 118
Solutions: 10
Contributions: 1

Re: Setting Class of Service on interfaces with edgeOS ?

This would be enough and perfect, thanks.

Member
Posts: 131
Registered: ‎04-10-2014
Kudos: 118
Solutions: 10
Contributions: 1

Re: Setting Class of Service on interfaces with edgeOS ?

@UBNT-ancheng is this in any future plans ?

Previous Employee
Posts: 13,551
Registered: ‎06-10-2011
Kudos: 5465
Solutions: 1656
Contributions: 2

Re: Setting Class of Service on interfaces with edgeOS ?

Yeah we haven't gotten to it yet but it is on the TODO list.

Member
Posts: 131
Registered: ‎04-10-2014
Kudos: 118
Solutions: 10
Contributions: 1

Re: Setting Class of Service on interfaces with edgeOS ?

Fixed in 1.6a3

 

For my need, I would set egress like this in CLI

 

set interfaces ethernet eth1 vif 851 egress-qos "0:6 1:6 2:6 3:6 5:6 6:6 7:6"
set interfaces ethernet eth1 vif 840 egress-qos "0:5 1:5 2:5 3:5 4:5 5:5 6:5 7:5"
set interfaces ethernet eth1 vif 838 egress-qos "0:4 1:4 2:4 3:4 4:4 5:4 6:4 7:4"

 And in config.boot 

 

        vif 838 {
            bridge-group {
                bridge br0
            }
            description TV
            egress-qos "0:4 1:4 2:4 3:4 4:4 5:4 6:4 7:4"
        }
        vif 840 {
            bridge-group {
                bridge br0
            }
            description TV
            egress-qos "0:5 1:5 2:5 3:5 4:5 5:5 6:5 7:5"
        }
        vif 851 {
            description VoIP
            egress-qos "0:6 1:6 2:6 3:6 5:6 6:6 7:6"
        }

 

That was the very last piece to get rid of my boot scripts, THANKS !

New Member
Posts: 2
Registered: ‎10-23-2015

Re: Setting Class of Service on interfaces with edgeOS ?

Sorry to rehash an old thread.

 

I was wondering if there was any update on this. I use my ER X to replace the Google Fiber box and they have some specific egress settings to achive the gigabit connection.

Member
Posts: 131
Registered: ‎04-10-2014
Kudos: 118
Solutions: 10
Contributions: 1

Re: Setting Class of Service on interfaces with edgeOS ?

What kind of updates are you expecting ? 

 

The conf sample listed above is still working for me.

New Member
Posts: 26
Registered: ‎12-24-2015
Kudos: 5

Re: Setting Class of Service on interfaces with edgeOS ?

Is there anyway to do this in the CLI?

Reply