Hi all,
apologies for, perhaps, a really dummy question. What I want to achieve is a simple packet prioritization (and also bandwidth limitation) based on src IP.
I’ve typed following:
Then I used Speedtest.net app on Apple TV to check if it works and the answer is no. It always hits packet-mark=no-mark ( priority 4 ) and not packet-mark=AppleTV ( priority 3 ).
Src IP is correct. Any ideas?
You’re trying to do qos on download, right?
If so,
Set passthrough=yes on the connection marks.
Set chain=prerouting on all mangle rules.
Set parent=LAN in the queue tree.
Keep everything else the same.
btw, your limit settings aren’t setup correctly - I’d remove everything but the max limit on the parent queue. Also, if you don’t have anything that’s ultra latency sensitive, sfq will share bandwidth more fairly.
Assuming this is upload?
Couple of points to mention.
If you are doing prioritisation, you don’t “really” need to use limits as you are passing off potential spare bandwidth when limits aren’t being hit.
Max-Limit is max speed you want to go at, limit-at is the amount you don’t want speed reducing below.
I generally use default-small but if your preference is default then go with that. A bigger queue isn’t necessarily a good thing as it’s more delayed packets, sometimes it is better to drop.
I’ve added the passthrough option as your connections would get marked for connection-mark then not passed through for packet marking.
I’ve changed from “post” to “pre” chains as that’s generally where I tend apply upstream QoS marking.
Can you explain the logic of the setup…
Line1: The max-limit of 8K is the highest throughput the rule will apply (manages up to 8K speed)
Q, What happens to capacity above 8K?
Line1: 8K speed is available to the units identified in the queue tree.
Line1: This queue manages outgoing traffic from the LAN (upload - LAN to WAN)?
Q. What happens to download traffic? (from Wan to LAN devices)?
Lines2,3,: Attach marked traffic as part of the parent queue and associate the desired Priority
Line4: Same except instead of a specific source (address), this handles all other traffic as the lowest Priority (4)
Q. What is the difference in effect of stating Priority 2,3,4 in practical terms (how is 8K divided up?
Q. What happened to Priority 1?
Q. What is the difference between default and default-small, or default-big LOL if there is such a thing.
Q. The passthrough one is confusing… you recommend using it to ensure that ??? The wording used could be construed two ways,
Im confused by marking for connection-mark and then packet marking??
It seems the new packet marking level is required for queue application.
It seems the new connection mark is required for…???
Why do you have two mangle rules per…
Is passthrough simply stating, please go to the next mangle rule that applies to this traffic ???
Why not (one RULE).
add action=mark-packet chain=prerouting source-address= 192.168.0.xx connection-mark=Mining new packet mark=Mining
So what happens with return traffic coming from the WAN, how is that handled??
What is the practical effect of setting the priorities 2,3,4 in terms of the 8K and what happened to number 1?
What is the practical difference between default and default-small? is their a default-tiny and how about defaulty-teenytiny?
I think you have a mangle mess, what happened to keeping it simple?
In other words please explain why you seem to have two mangle rules per traffic type…
(why new connection mark and new packet mark -thus far I have only used mark routing and thus lost in the dark)
How would you handle also ensuring the apple TV never got less that 1500k?
Does it matter? Download is already probably rate limited by the ISP, why try to reorder it as it comes back in? You’re burning off resource and re-ordering stuff that doesn’t need to be.
Priority is literally as it sounds, the marks are run in ascending order with priority in that way. You don’t need a 1 to have a 2,3,4. I usually use 1,4,8 (High, Med, Low) but I’m trying not to re-invent someone elses wheel here.
I think it’s 50 packets to 20 (it says for certain in the wiki:manual. You can create your own queue and assign that as teenytiny (2 packets?)
Connection mark is picking up source of traffic and labelling it all.
Packet mark is using connection mark as a matcher to label those packets.
IMO it’s actually a very clean way of achieving packet marking like this. Less of a mess and more of “another way” of organising it.
**Also see previous comment about not re-inventing someone elses wheel.
If you are packet prioritising the ATV’s upload then naturally the download will lean in that direction due to the free flowing upload acks, if other devices are getting slower ack returns then their download stream will of course be slower.
I accept there is nothing in their guaranteeing the ATV the bandwidth however the upload prioritisation (if ATV were number 1 for example) should ensure it is not needed.
TL:DR
Why limit your download when it’s already limited? The packets are already arriving at your router.
Strange ISPs you have in the UK, here they are 150 down and 50 up, as a typical throughput and thus my upload is more limited than my download LOL.
Is live streaming or streaming netflix an UPLOAD action???
I mean not everyone is serving up, and I say the majority are downloading, so I dont understand your comments.
Yes I am always difficult LOL (but I realize its often from my lack of proper networking understanding).
Your 150Mb download is limited by your ISP though (unless you pull data from servers that can’t push data to you that fast).
Streaming is of course download however you have a constant flow of ack packets going back up, on an upload limited connection you can prioritise these to enable smooth streaming whilst making non-essential other connections get in line behind.
On a 150/50 residential service QoS really is probably not needed other than something to “level out” the connection if it spikes above, a simple queue would do that quite well. For a more restricted service though 10/0.5 as a perfect example then upload prioritisation is an absolute key factor in levelling out a service. The easy answer is of course provide more bandwidth but if that isn’t an option you have to manage what you have better.