Could someone offer an example of HFSC script?

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


Joined: 03 Apr 2010
Posts: 16

PostPosted: Sat Apr 03, 2010 7:53    Post subject: Could someone offer an example of HFSC script? Reply with quote
According to dd-wrt wiki, HFSC is superior to HTB, but cannot work normally if it's started from the web UI.

Therefore a solution is to write script, however there seems to be no example how to write a script in dd-wrt wiki.

A script generator is given, but that's based on HTB and SFQ, I guess.

So, could someone give an example of QoS Script with HFSC?

hopefully there's an example like:

PPPOE: 2Mbps / 256Kbps
port [21, 80, 443, 1234, 1024~65535] considered, and 1234 is used by a real time application that use 160Kbps/40Kbps bandwidth


as well as how to decide the parameters of delay in hfsc
Sponsor
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Sat Apr 03, 2010 21:32    Post subject: Reply with quote
You can find a link to a fixed script in my bug ticket. You need to pass it the upload, download, upstream interface, upstream interface's MTU, and the number of the imq device to use (ie. 0) in that order.

ie. something like:
/tmp/svqos.hfsc 256 2048 vlan1 1492 0

http://svn.dd-wrt.com:8000/dd-wrt/ticket/1095

_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
SpyrosB
DD-WRT User


Joined: 12 Apr 2010
Posts: 136
Location: Greece

PostPosted: Tue May 04, 2010 2:30    Post subject: Reply with quote
I added

Code:
insmod imq


to the beggining of your script because i was getting an error.

Do i need to add

Code:
insmod ipt_IMQ


and iptables to the mangler to make this script usefull?

Code:
root@DD-WRT:/jffs# /jffs/svqos.hfsc 800 8000 vlan2 1492 0
root@DD-WRT:/jffs# /jffs/svqos.hfsc status vlan2 imq0
qdisc hfsc 1: root default 30
 Sent 15828980 bytes 13013 pkt (dropped 3, overlimits 11834 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
qdisc sfq 100: parent 1:100 limit 127p quantum 1492b perturb 10sec
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
qdisc sfq 10: parent 1:10 limit 127p quantum 1492b perturb 10sec
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
qdisc sfq 20: parent 1:20 limit 127p quantum 1492b perturb 10sec
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
qdisc sfq 30: parent 1:30 limit 127p quantum 1492b perturb 10sec
 Sent 15825952 bytes 13011 pkt (dropped 0, overlimits 0 requeues 7466)
 rate 0bit 0pps backlog 0b 0p requeues 7466
qdisc sfq 40: parent 1:40 limit 127p quantum 1492b perturb 10sec
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
class hfsc 1: root
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
 period 0 level 2

class hfsc 1:1 parent 1: sc m1 0bit d 0us m2 100000Kbit ul m1 0bit d 0us m2 100000Kbit
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
 period 5547 work 15828980 bytes level 1

class hfsc 1:100 parent 1:1 leaf 100: ls m1 100000Kbit d 100.0ms m2 100000Kbit ul m1 0bit d 0us m2 100000Kbit
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
 period 0 level 0

class hfsc 1:10 parent 1:1 leaf 10: rt m1 0bit d 3.5ms m2 160000bit ls m1 0bit d 9.0ms m2 600000bit ul m1 0bit d 0us m2 800000bit
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
 period 0 level 0

class hfsc 1:20 parent 1:1 leaf 20: rt m1 0bit d 5.3ms m2 240000bit ls m1 0bit d 9.3ms m2 600000bit ul m1 0bit d 0us m2 800000bit
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
 period 0 level 0

class hfsc 1:30 parent 1:1 leaf 30: rt m1 271280bit d 44.0ms m2 80000bit ls m1 0bit d 14.2ms m2 400000bit ul m1 0bit d 0us m2 800000bit
 Sent 15828980 bytes 13013 pkt (dropped 2, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
 period 5547 work 15828980 bytes rtwork 2852703 bytes level 0

class hfsc 1:40 parent 1:1 leaf 40: ls m1 80000bit d 500.0ms m2 80000bit ul m1 0bit d 0us m2 720000bit
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
 period 0 level 0
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Tue May 04, 2010 2:43    Post subject: Reply with quote
The script is just a replacement for the broken script that sets up the TC queues. You should be able to just configure the GUI the way you want but set it to still use HTB to avoid the bugged script, then run my corrected HFSC script from a firewall script.
_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
SpyrosB
DD-WRT User


Joined: 12 Apr 2010
Posts: 136
Location: Greece

PostPosted: Tue May 04, 2010 12:21    Post subject: Reply with quote
phuzi0n wrote:
The script is just a replacement for the broken script that sets up the TC queues. You should be able to just configure the GUI the way you want but set it to still use HTB to avoid the bugged script, then run my corrected HFSC script from a firewall script.


When i use the GUI to set some L7 filters or custom ports, the rules are not appearing in iptables -t mangle -v -L -n.

I have set

TcpHighPorts 1024:65535 ------>Bulk
bittorrent, bt ,bt1, bt2, b3 ->Bulk
http--->Express

and im getting this



Code:
root@DD-WRT:~# iptables -t mangle -v -L -n
Chain PREROUTING (policy ACCEPT 6959 packets, 2625K bytes)
 pkts bytes target     prot opt in     out     source               destination         
 4397 2357K IMQ        0    --  br0    *       0.0.0.0/0            0.0.0.0/0           IMQ: todev 0
 4399 2357K SVQOS_IN   0    --  br0    *       0.0.0.0/0            0.0.0.0/0           

Chain INPUT (policy ACCEPT 8406 packets, 585K bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD (policy ACCEPT 12718 packets, 3740K bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 549 packets, 64401 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain POSTROUTING (policy ACCEPT 21450 packets, 8182K bytes)
 pkts bytes target     prot opt in     out     source               destination         
 2995  321K SVQOS_OUT  0    --  *      br0     0.0.0.0/0            0.0.0.0/0           

Chain SVQOS_IN (1 references)
 pkts bytes target     prot opt in     out     source               destination         
 4392 2356K CONNMARK   0    --  *      *       0.0.0.0/0            0.0.0.0/0           CONNMARK restore
    0     0 RETURN     0    --  *      *       0.0.0.0/0            0.0.0.0/0           MARK match !0x0
 4388 2356K CONNMARK   0    --  *      *       0.0.0.0/0            0.0.0.0/0           CONNMARK restore
    0     0 RETURN     0    --  *      *       0.0.0.0/0            0.0.0.0/0           MARK match !0x0
 3781 2295K MARK       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpts:1024:65535 MARK match 0x0 MARK set 0x28
  559 56200 MARK       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp spts:1024:65535 MARK match 0x0 MARK set 0x28
    0     0 MARK       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           MARK match 0x0 ipp2p v0.8.2 --bit MARK set 0x28
    0     0 MARK       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpts:1024:65535 MARK match 0x0 MARK set 0x28
    0     0 MARK       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp spts:1024:65535 MARK match 0x0 MARK set 0x28
    0     0 MARK       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           MARK match 0x0 ipp2p v0.8.2 --bit MARK set 0x28

Chain SVQOS_OUT (1 references)
 pkts bytes target     prot opt in     out     source               destination         
 2995  321K CONNMARK   0    --  *      *       0.0.0.0/0            0.0.0.0/0           CONNMARK restore
    0     0 RETURN     0    --  *      *       0.0.0.0/0            0.0.0.0/0           MARK match !0x0
 2991  320K CONNMARK   0    --  *      *       0.0.0.0/0            0.0.0.0/0           CONNMARK restore
    0     0 RETURN     0    --  *      *       0.0.0.0/0            0.0.0.0/0           MARK match !0x0
 2943  317K MARK       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpts:1024:65535 MARK match 0x0 MARK set 0x28
    0     0 MARK       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp spts:1024:65535 MARK match 0x0 MARK set 0x28
    0     0 MARK       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           MARK match 0x0 ipp2p v0.8.2 --bit MARK set 0x28
    0     0 MARK       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpts:1024:65535 MARK match 0x0 MARK set 0x28
    0     0 MARK       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp spts:1024:65535 MARK match 0x0 MARK set 0x28
    0     0 MARK       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           MARK match 0x0 ipp2p v0.8.2 --bit MARK set 0x28


The same rule (1024:65535) is being repeated four times per chain, no L7 rules, an ipp2p rule instead and no http rule. I've used both HTB@WAN 800/8000 and HTB@Lan&WLAN 100Mbps/100Mbps
Confused
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Tue May 04, 2010 19:43    Post subject: Reply with quote
Reboot the router. The QoS chains get messy when you change settings without rebooting.
_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
SpyrosB
DD-WRT User


Joined: 12 Apr 2010
Posts: 136
Location: Greece

PostPosted: Tue May 04, 2010 22:14    Post subject: Reply with quote
phuzi0n wrote:
Reboot the router. The QoS chains get messy when you change settings without rebooting.


OK i deleted all the rules, disabled qos, then enabled again, passed the rules one by one, apllied and reboot. Now things are not messed up and all the rules are present but im having another problem.

Packets are not being marked, i'm testing with some downloads and i have 128Mbytes download and 11Mbytes upload and only a few bytes where marked.

Code:
Chain PREROUTING (policy ACCEPT 154K packets, 139M bytes)
 pkts bytes target     prot opt in     out     source               destination
59835   11M IMQ        0    --  br0    *       0.0.0.0/0            0.0.0.0/0           IMQ: todev 0
94058  128M SVQOS_IN   0    --  ppp0   *       0.0.0.0/0            0.0.0.0/0

Chain INPUT (policy ACCEPT 1325 packets, 147K bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain FORWARD (policy ACCEPT 153K packets, 139M bytes)
 pkts bytes target     prot opt in     out     source               destination
93912  128M IMQ        0    --  ppp0   *       0.0.0.0/0            0.0.0.0/0           IMQ: todev 0

Chain OUTPUT (policy ACCEPT 1171 packets, 164K bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain POSTROUTING (policy ACCEPT 154K packets, 140M bytes)
 pkts bytes target     prot opt in     out     source               destination
58935   11M SVQOS_OUT  0    --  *      ppp0    0.0.0.0/0            0.0.0.0/0

Chain SVQOS_IN (1 references)
 pkts bytes target     prot opt in     out     source               destination
94056  128M CONNMARK   0    --  *      *       0.0.0.0/0            0.0.0.0/0           CONNMARK restore
93775  128M RETURN     0    --  *      *       0.0.0.0/0            0.0.0.0/0           MARK match !0x0
    0     0 MARK       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:80 MARK match 0x0 MARK set 0x14
    0     0 MARK       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp spt:80 MARK match 0x0 MARK set 0x14
    0     0 MARK       0    --  *      *       0.0.0.0/0            0.0.0.0/0           LAYER7 l7proto http MARK match 0x0 MARK set 0x14
    0     0 MARK       0    --  *      *       0.0.0.0/0            0.0.0.0/0           LAYER7 l7proto ftp MARK match 0x0 MARK set 0x1e
    0     0 MARK       0    --  *      *       0.0.0.0/0            0.0.0.0/0           LAYER7 l7proto msnmessenger MARK match 0x0 MARK set 0x1e
    0     0 MARK       0    --  *      *       0.0.0.0/0            0.0.0.0/0           LAYER7 l7proto msn-filetransfer MARK match 0x0 MARK set 0x1e
   80  5270 MARK       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpts:1024:65535 MARK match 0x0 MARK set 0x28
    0     0 MARK       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp spts:1024:65535 MARK match 0x0 MARK set 0x28
    0     0 MARK       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           MARK match 0x0 ipp2p v0.8.2 --bit MARK set 0x28
   37  3510 MARK       0    --  *      *       0.0.0.0/0            0.0.0.0/0           MARK match 0x0 length 0:550 LAYER7 l7proto bt MARK set 0x28
    0     0 MARK       0    --  *      *       0.0.0.0/0            0.0.0.0/0           MARK match 0x0 LAYER7 l7proto bt1 MARK set 0x28
    0     0 MARK       0    --  *      *       0.0.0.0/0            0.0.0.0/0           MARK match 0x0 LAYER7 l7proto bt2 MARK set 0x28
    0     0 MARK       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           MARK match 0x0 ipp2p v0.8.2 --edk MARK set 0x28
  275 24460 CONNMARK   0    --  *      *       0.0.0.0/0            0.0.0.0/0           CONNMARK save
  275 24460 RETURN     0    --  *      *       0.0.0.0/0            0.0.0.0/0

Chain SVQOS_OUT (1 references)
 pkts bytes target     prot opt in     out     source               destination
58934   11M CONNMARK   0    --  *      *       0.0.0.0/0            0.0.0.0/0           CONNMARK restore
58092   11M RETURN     0    --  *      *       0.0.0.0/0            0.0.0.0/0           MARK match !0x0
  340 21288 MARK       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:80 MARK match 0x0 MARK set 0x14
    0     0 MARK       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp spt:80 MARK match 0x0 MARK set 0x14
    0     0 MARK       0    --  *      *       0.0.0.0/0            0.0.0.0/0           LAYER7 l7proto http MARK match 0x0 MARK set 0x14
    0     0 MARK       0    --  *      *       0.0.0.0/0            0.0.0.0/0           LAYER7 l7proto ftp MARK match 0x0 MARK set 0x1e
    0     0 MARK       0    --  *      *       0.0.0.0/0            0.0.0.0/0           LAYER7 l7proto msnmessenger MARK match 0x0 MARK set 0x1e
    0     0 MARK       0    --  *      *       0.0.0.0/0            0.0.0.0/0           LAYER7 l7proto msn-filetransfer MARK match 0x0 MARK set 0x1e
  337 22093 MARK       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpts:1024:65535 MARK match 0x0 MARK set 0x28
    0     0 MARK       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp spts:1024:65535 MARK match 0x0 MARK set 0x28
    0     0 MARK       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           MARK match 0x0 ipp2p v0.8.2 --bit MARK set 0x28
    0     0 MARK       0    --  *      *       0.0.0.0/0            0.0.0.0/0           MARK match 0x0 length 0:550 LAYER7 l7proto bt MARK set 0x28
    0     0 MARK       0    --  *      *       0.0.0.0/0            0.0.0.0/0           MARK match 0x0 LAYER7 l7proto bt1 MARK set 0x28
    0     0 MARK       0    --  *      *       0.0.0.0/0            0.0.0.0/0           MARK match 0x0 LAYER7 l7proto bt2 MARK set 0x28
    0     0 MARK       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           MARK match 0x0 ipp2p v0.8.2 --edk MARK set 0x28
  829 53837 CONNMARK   0    --  *      *       0.0.0.0/0            0.0.0.0/0           CONNMARK save
  829 53837 RETURN     0    --  *      *       0.0.0.0/0            0.0.0.0/0



Is vlan2 device correct? Thats my WAN interface but i'm using PPPoE, i've seen some configurations using br0 (LAN) for downstream and ppp0 for upstream but i don't know if this is correct in the current set up.

My ifconfig is

Code:
br0       Link encap:Ethernet  HWaddr 00:25:9C:DA:FC:98
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:78233 errors:0 dropped:0 overruns:0 frame:0
          TX packets:115537 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:19464898 (18.5 MiB)  TX bytes:151800100 (144.7 MiB)

br0:0     Link encap:Ethernet  HWaddr 00:25:9C:DA:FC:98
          inet addr:169.254.255.1  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1

eth0      Link encap:Ethernet  HWaddr 00:25:9C:DA:FC:98
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:177420 errors:0 dropped:0 overruns:0 frame:0
          TX packets:163723 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:174084782 (166.0 MiB)  TX bytes:132830485 (126.6 MiB)
          Interrupt:4 Base address:0x2000

eth1      Link encap:Ethernet  HWaddr 00:25:9C:DA:FC:9A
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:15983 errors:742 dropped:0 overruns:0 frame:130679
          TX packets:28685 errors:5 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1596597 (1.5 MiB)  TX bytes:40616763 (38.7 MiB)
          Interrupt:3 Base address:0x1000

imq0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          UP RUNNING NOARP  MTU:1500  Metric:1
          RX packets:191928 errors:0 dropped:0 overruns:0 frame:0
          TX packets:190875 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:30
          RX bytes:170220791 (162.3 MiB)  TX bytes:168660810 (160.8 MiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING MULTICAST  MTU:16436  Metric:1
          RX packets:17 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1312 (1.2 KiB)  TX bytes:1312 (1.2 KiB)

ppp0      Link encap:Point-to-Point Protocol
          inet addr:1XX.XX.XX.XX  P-t-P:194.219.239.194  Mask:255.255.255.255
          UP POINTOPOINT RUNNING MULTICAST  MTU:1492  Metric:1
          RX packets:114713 errors:0 dropped:0 overruns:0 frame:0
          TX packets:76205 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:151142913 (144.1 MiB)  TX bytes:18923299 (18.0 MiB)

vlan1     Link encap:Ethernet  HWaddr 00:25:9C:DA:FC:98
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:62259 errors:0 dropped:0 overruns:0 frame:0
          TX packets:87290 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:18341408 (17.4 MiB)  TX bytes:111918053 (106.7 MiB)

vlan2     Link encap:Ethernet  HWaddr 00:25:9C:DA:FC:99
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:115148 errors:0 dropped:0 overruns:0 frame:0
          TX packets:76433 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:152546076 (145.4 MiB)  TX bytes:20912432 (19.9 MiB)

vlan2:1   Link encap:Ethernet  HWaddr 00:25:9C:DA:FC:99
          inet addr:10.0.0.2  Bcast:10.0.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1


The script is saved at /jffs/svqos.hfsc

and my nvram is set to

rc_firewall=/jffs/svqos.hfsc 800 8000 vlan2 1492 0

I understand that the L7 or ipp2p filters may not catch traffic but having zero at HTTP and 1024:65535 is very strange.

_________________
WRT320N converted to E2000 : DD-WRT v24-sp2 (11/21/10) std-usb-nas - build 15778
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Tue May 04, 2010 23:02    Post subject: Reply with quote
Only unmarked connections match the MARK rules. Once they've been marked then they get their connection mark restored and return to the previous chain.

You should use ppp0 which is your logical WAN interface instead of vlan2 which is the physical WAN interface. The difference doesn't usually matter much but it prevents 'local' traffic on the physical WAN port from hitting the queues.

_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
SpyrosB
DD-WRT User


Joined: 12 Apr 2010
Posts: 136
Location: Greece

PostPosted: Wed May 05, 2010 2:08    Post subject: Reply with quote
Thank you, your script works great.
I had some hard time adding rules through the web interface so i added them to nvram svqos_svcs= directly, rebooted and everything works fine

_________________
WRT320N converted to E2000 : DD-WRT v24-sp2 (11/21/10) std-usb-nas - build 15778
SpyrosB
DD-WRT User


Joined: 12 Apr 2010
Posts: 136
Location: Greece

PostPosted: Thu May 06, 2010 17:24    Post subject: Reply with quote
Another problem, the scipt doesn't have an effect after reboot

I added a sleep command


Code:
rc_firewall="sleep 30 && /jffs/svqos.hfsc 800 8000 ppp0 1492 0"


to see if this a timing problem but again the router uses the preconfigured /usr/sbin/svqos script for HTB. I added an .ipup script thats uses the /jffs/svqos.hfsc 800 8000 ppp0 1492 0 and it works. I don't know if this is the optimal setting but normally firewall restart will have an effect only in mangle iptables and not to the HFSC script.

_________________
WRT320N converted to E2000 : DD-WRT v24-sp2 (11/21/10) std-usb-nas - build 15778
River
DD-WRT Novice


Joined: 20 Jan 2010
Posts: 26

PostPosted: Sun Jun 13, 2010 5:56    Post subject: Reply with quote
since this has been fixed in the latest firmware, is it save to use hfsc in the gui without any firewall script in the administration>commands part of the web gui?
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Sun Jun 13, 2010 7:05    Post subject: Reply with quote
River wrote:
since this has been fixed in the latest firmware, is it save to use hfsc in the gui without any firewall script in the administration>commands part of the web gui?

If you have build 14390 or higher.

http://www.dd-wrt.com/wiki/index.php/Quality_of_Service#Initial_Setup

_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
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