is netmask-based QoS per-device or cumulative for subnet?

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
mucm
DD-WRT Novice


Joined: 26 Jul 2016
Posts: 10
Location: Toronto, Canada

PostPosted: Tue Jul 26, 2016 16:02    Post subject: is netmask-based QoS per-device or cumulative for subnet? Reply with quote
My router is Linksys EA6900 with dd-wrt 2015-02-04 26138 (I've used the boot up command method to remove empty NVRAM variables to avoid the 32 k bug.)

I'm on satellite internet with expensive surcharges when I go over 50 GB/mo (1.67 GB/d). This serves both my cottage plus my rental cottage where large groups (24 people this week) want to use it too. Before dd-wrt, they would hog it so much that my minimal usage (mainly e-mail) had server timeouts.

I've used static dhcp to give my laptop 192.168.1.63 and normal dhcp to give the guests 192.168.1.64-127.

Out of several speed tests, it bounced around a lot between 1.0, 1.3, 2.2 Mbit/s etc. but lowest was 1.0 Mbit/s so I used 1000, 250 in the total downlink, uplink section of the QoS page.

I've then used netmask-based QoS to set my laptop
192.168.1.63/32 to 800, 200 kbit/s (down, up) and the
192.168.1.64/26 netmask to 40, 10 kbit/s (down, up).

This is great to keep my e-mail working without timeouts but the numbers don't quite work out to keep me away from the expensive surcharges...

By my calculation, 50 kbit/s (40 down, 10 up) should only add up to 0.51 GB/d even if they max it out for 24 h of the day:

50 kbit/s / 8 bit/byte = 6.25 kB/s

6.25 kB/s * 60*60*24 s/d = 540000 kB/d = 527 MB/d = 0.51 GB/d

However the Status > WAN > Traffic daily graph shows I've used 1.6, 1.9, and 2.8 GB over the past three days (and I know from ifconfig that my laptop has only used 0.4 GB total over that time).

Does this imply that the speed limiting isn't working? or is the netmask just a short-hand multiple-client-matching rule and then the given bandwidth limit is allowed to each device matching that rule? Thus if they have, say, 3 devices they could use 3 * 50 = 150 kbit/s?
Sponsor
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6858
Location: Romerike, Norway

PostPosted: Wed Jul 27, 2016 11:26    Post subject: Reply with quote
Have you considered to split the guests out on a separate interface and set the interface priority?

http://tips.desipro.de/2013/12/06/guest-wifi-setup-dd-wrt/
mucm
DD-WRT Novice


Joined: 26 Jul 2016
Posts: 10
Location: Toronto, Canada

PostPosted: Wed Jul 27, 2016 13:10    Post subject: Reply with quote
Per Yngve Berg wrote:
Have you considered to split the guests out on a separate interface and set the interface priority?


Oh my god yes. Before going my current route, I've already tried for DAAAAAAYS to get the virtual interface going so I could have two wifis, one wifi for rental guests, and another slightly faster wifi for my own cottage guests whom I can trust to not download movies the whole time they're here.

None of the three various dd-wrt vintages that I tried (something 2014, my current 2015-02-04, and near-latest 2016-07) would allow me to get the second wifi working, after over a dozen attempts starting from reflashing or factory reset and following various guides including the one you linked. The second wifi was detectable but never joinable. And this even was a problem when I fully disabled security, so I know it was not a WPA vs WPA2, or AES vs TKIP issue. I eventually (at least on some of the attempts) came to the conclusion, from the logs of the laptop trying to join the wifi, that it was getting onto the network but never getting a DHCP reply, so the laptop's networkmanager would time out and joining the wifi would fail. So something is wrong with the Setup > Networking > DHCPD > Multiple DHCP Server feature at least on all dd-wrt versions that I tried.

Anyway thank you for your suggestion but I'd like to try to answer my current question.
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6858
Location: Romerike, Norway

PostPosted: Wed Jul 27, 2016 23:47    Post subject: Reply with quote
Netmask 26 is wrong. It does not give you contiguous bits.

By using 32, you will get the intervals:

0-31, 32-63, 64-95, 96-127, 128-159, 160-191, 192-223, 224-255

With 63:

0-63, 64-127, 128-191, 192-255


So your ranges will be:

192.168.1.32/32
192.168.1.64/32
mucm
DD-WRT Novice


Joined: 26 Jul 2016
Posts: 10
Location: Toronto, Canada

PostPosted: Thu Jul 28, 2016 14:02    Post subject: Reply with quote
Per Yngve Berg wrote:
Netmask 26 is wrong. It does not give you contiguous bits.

By using 32, you will get the intervals:
0-31, 32-63, 64-95, 96-127, 128-159, 160-191, 192-223, 224-255

With 63:
0-63, 64-127, 128-191, 192-255

So your ranges will be:
192.168.1.32/32
192.168.1.64/32


umm, I hope you're drunk or very low on sleep in giving this comment. An IPv4 address IS only 32 bits total, so a /32 netmask is a single-address match (255.255.255.255 in the other notation).

The ranges you gave are /27 and /26 netmasks, or 255.255.255.224 and 255.255.255.192 in the other notation. /26 is what I want for the guest users because they're getting DHCP addresses in 192.168.1.64-127.

Thanks again. But I'm still wondering, how does QoS speed limiting work within these netmasks/subnets?
h8red
DD-WRT Guru


Joined: 28 Jun 2011
Posts: 580
Location: Vilnius, Lithuania

PostPosted: Thu Jul 28, 2016 19:11    Post subject: Reply with quote
mucm wrote:
how does QoS speed limiting work within these netmasks/subnets?

Try, read and learn. Only specific questions will be answered here

_________________
[Ramips] Nexx WT3020F Openwrt @kernel #4.14.167 (OpenVPN server, Wireguard server, AD blocking, SQM QOS, USB)
mucm
DD-WRT Novice


Joined: 26 Jul 2016
Posts: 10
Location: Toronto, Canada

PostPosted: Fri Jul 29, 2016 15:35    Post subject: Reply with quote
h8red wrote:
mucm wrote:
how does QoS speed limiting work within these netmasks/subnets?

Try, read and learn. Only specific questions will be answered here


umm, what part of "is netmask-based QoS per-device or cumulative per subnet?" is not a specific question? Geez.

I did, of course, try, read, and learn. I did not list the dozens of search queries and forum threads that I read over several days which failed to answer this question. I got to the end (without successfully limiting my bandwidth), of what I felt I could try, read, and learn with the existing threads, blogs, etc which I found so I started a new one. I'm curious why you're giving me attitude, or if I'm reading too much into your curt reply, I apologize.

My original post gave detailed descriptions of what I've tried and why. What I learned from the wiki ( https://www.dd-wrt.com/wiki/index.php/Quality_of_Service ) was that this question is not covered, and what I learned from trying was that QoS by this method doesn't limit the bandwidth to the stated number. This is all in my first post.

I'm still looking for a helpful knowledgeable poster to answer: is netmask-based QoS per-device or cumulative per subnet?
h8red
DD-WRT Guru


Joined: 28 Jun 2011
Posts: 580
Location: Vilnius, Lithuania

PostPosted: Fri Jul 29, 2016 19:48    Post subject: Reply with quote
Netmask stands for subnet. It is cumulative for all devices within
_________________
[Ramips] Nexx WT3020F Openwrt @kernel #4.14.167 (OpenVPN server, Wireguard server, AD blocking, SQM QOS, USB)
someone2k
DD-WRT Novice


Joined: 01 Jul 2016
Posts: 1

PostPosted: Tue Aug 02, 2016 23:32    Post subject: Reply with quote
From my experience it's about catching devices and put limit per device. I.e 3x50kbit = 150 kbit

Another solution would be to add a cronjob checking nvram for daily traffic and limit from 800kbit to 500kbit at 1 GB, 100 kbit at 1,3 GB etc.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking 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 cannot attach files in this forum
You cannot download files in this forum