Posted: Thu May 02, 2013 10:31 Post subject: How to Enable/Disable QoS through Command Line
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 ?
Joined: 09 Aug 2006 Posts: 121 Location: Germany, Bensheim
Posted: Mon May 06, 2013 9:43 Post subject:
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
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.
Joined: 09 Aug 2006 Posts: 121 Location: Germany, Bensheim
Posted: Tue May 07, 2013 12:52 Post subject:
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.
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 ?
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