How to Enable/Disable QoS through Command Line

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Author Message
saadsarwar
DD-WRT Novice


Joined: 12 Dec 2012
Posts: 27

PostPosted: Thu May 02, 2013 10:31    Post subject: How to Enable/Disable QoS through Command Line Reply with quote
Hi all. I have tried these two commands for QoS but they are giving me error.
To enable QoS from command line, i used this command
/usr/sbin/svqos `nvram get wshaper_downlink` `nvram get wshaper_uplink` `get_wanface` `nvram get wan_mtu` 0

and to disable QoS, i used this command
/usr/sbin/svqos stop 0 `get_wanface` 0 0


but on execution, i get this error "SIOCGIFFLAGS: No such device" . Have the commands changed ?
Sponsor
Sash
DD-WRT Guru


Joined: 20 Sep 2006
Posts: 17619
Location: Hesse/Germany

PostPosted: Fri May 03, 2013 14:40    Post subject: Reply with quote
startservice/stopservice wshaper
_________________
Forum Guidelines...How to get help
&
Forum Rules
&
RTFM/STFW
&
Throw some buzzwords into the WIKI search Exclamation
_________________
I'm NOT rude, just offer pure facts!
_________________
Atheros (TP-Link & Clones, etc ) debrick service in EU
_________________
Guide on HowTo be Safe, Secure and Protect Your Online Anonymity!
saadsarwar
DD-WRT Novice


Joined: 12 Dec 2012
Posts: 27

PostPosted: Mon May 06, 2013 9:42    Post subject: Reply with quote
Thanks Smile
Markus
Site Admin


Joined: 09 Aug 2006
Posts: 121
Location: Germany, Bensheim

PostPosted: Mon May 06, 2013 9:43    Post subject: Reply with quote
You should use the commands mentioned by sash.

Anyhow if you want to call the scripts by hand you'll need to write the full name of the imq devices instead of only their device number.
Eg. "imq0" instead of "0".

The second imq is only for WAN/LAN configuration and you don't need to call it at all in a LAN-only configuration.

Also consider that the syntax changed in recent builds. Now there is an additional flag for the queueing discipline to set:

Code:

# start: [up] [down] [wan_if] [mtu] [imq_wan] [aqd] [imq_lan]
# status: status [wan_if] [imq_wan] [imq_lan]
# stop: stop xx [wan_if] xx     [imq_wan] [imq_lan]


Currently the allowed queueing disciplines are: "sfq", "codel" and "fq_codel".

[Edit]
The queueing disciplines "codel" and "fq_codel" are only valid on routers running at least kernel 3.5. On older devices only "sfq" is supported.

Eg:
Code:

/usr/sbin/svqos `nvram get wshaper_uplink `nvram get wshaper_downlink `get_wanface` `nvram get wan_mtu` imq0 fq_codel


or

Code:
/usr/sbin/svqos stop xx `get_wanface` xx imq0

_________________
Forum Rules
Forum Guidelines...How to get help the right way
saadsarwar
DD-WRT Novice


Joined: 12 Dec 2012
Posts: 27

PostPosted: Mon May 06, 2013 9:54    Post subject: Reply with quote
Thanks Markus for the detailed post. After writing this command e.g."/usr/sbin/svqos stop xx `get_wanface` xx imq0", I should write "stopservice wshaper" . and after starting QoS, I should write the "startservice wshaper". Is this the way to use these commands ?

Moreover, Can you tell me the commands to set uplink/download speeds for QoS ? I am writing a script which will get the current network speed and will store it in dd-wrt's telnet session.
Markus
Site Admin


Joined: 09 Aug 2006
Posts: 121
Location: Germany, Bensheim

PostPosted: Tue May 07, 2013 12:52    Post subject: Reply with quote
No you just need to use "stopservice wshaper" or "startservice wshaper" to stop/start the whole thing.
In that way the svqos-scrips will issued automatically.

Quote:
Moreover, Can you tell me the commands to set uplink/download speeds for QoS ? I am writing a script which will get the current network speed and will store it in dd-wrt's telnet session.


well you might write the values into the nvram and then start the service with "startservice wshaper".

_________________
Forum Rules
Forum Guidelines...How to get help the right way
saadsarwar
DD-WRT Novice


Joined: 12 Dec 2012
Posts: 27

PostPosted: Tue May 14, 2013 16:46    Post subject: Reply with quote
Thanks for your quick replies. Much appreciated. I want last favour from you. Can you please tell me the command how to set QoS on a specific MAC address.

e.g for MAC Address 00:1C:F0:18:7D:9E,i wish to put in exempt queue

and some other MAC address 00:5C:F0:18:7B:5E is placed in bulk queue

What command can place specific MAC address into different QoS queues ?
slidermike
DD-WRT Guru


Joined: 11 Nov 2013
Posts: 1487
Location: USA

PostPosted: Tue Dec 09, 2014 19:47    Post subject: Reply with quote
This question is quite old but since I stumbled across it while doing my own QoS command line query I thought I would answer it based on my current router/dd-wrt.
R7000 router running current Kongac 25580M.

Here is how you apply mac based qos in the command line for a given mac & priority class.

Premium - 10
Express - 20
Standard - 30
Bulk - 40
(I do not know about maximum but guess is 0)

You have to apply the list to all macs in 1 command line.
I will show you how to apply it in the order of Premium/Express/Standard/Bulk.

nvram set svqos_macs="B8:3E:59:84:0C:82 100 100 user 0 10 | CC:6D:A0:88:60:2F 100 100 user 0 20 | 00:24:1D:D3:C1:6C 100 100 user 0 30 | E0:B5:2D:CF:7A:75 100 100 user 0 40 |"

That is all 1 command line. That will apply 4 different Priority classes to 4 different MAC's.

_________________
Router currently owned:
Netgear R7800 - Router
Netgear R7000 - AP mode

R7000 specific Tips/Tricks.
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=264152
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum