Help with ipset or tc

hello i want to pioritize these packets length in ingress interface 50:174 using tc or ipset

i had a success with pioritizing ipset in ingress interface with this command
tc filter add dev ifb0 protocol ip parent 1:0 prio 1 basic match 'ipset(mytest src)' classid 1:1
it works in ingress
so my question is can i specify packets length in ipset or tc

i want to pioritize src ports range 26000:28000 with packets length 50:174 in wan ingress dev using tc or ipset

Set fwmark using nftables (https://wiki.nftables.org/wiki-nftables/index.php/Matching_packet_metainformation#Matching_by_packet_info) or iptables then have tc filter on fwmarks?

MARK doesn't work with virtual mirred device for some reason

Just saying this looks like things qosify should be able to do for you, modulo the 'tc' requirement...

2 Likes

Was another thread really needed?

And I agree with the advice above. Your entire post history is about trying to make online games feel better for you. I sincerely doubt someone with no experience with tc is going to get a better result (at least without significant effort) than the already available tools that take all this thinking away from you. /rant.

1 Like

it seems MARK WORKS in ingress in iptables forward chain for any one want as me to control piority in mirred ingress device these commands that works for me

iptables -t mangle -N QOS
iptables -t mangle -i pppoe-wan  -A FORWARD -j QOS
iptables -F QOS -t mangle
iptables -t mangle -A QOS -j CONNMARK --restore-mark
tc qdisc del dev pppoe-wan ingress
tc qdisc add dev pppoe-wan  handle ffff: ingress
tc filter add dev pppoe-wan  parent ffff: protocol all   matchall action connmark  action mirred egress redirect dev download


tc qdisc del dev download root
tc qdisc add dev download root handle 20: htb debug 16 default 8  r2q 5

tc class add dev download parent 20: classid 20:1 htb rate 1000kbit burst 500kbit    linklay atm ceil 500kbit  cburst 500kbit  prio 0 quantum 1118
tc qdisc add dev download parent 20:1 cake diffserv8   rtt 84ms nowash dual-dsthost noatm nonat mpu 0 raw bandwidth 800kbit
tc filter add dev download protocol all  parent 20: handle 201 fw flowid 20:1



tc class add dev download parent 20: classid 20:2 htb rate 800kbit burst 1169kbit	 mpu 0 overhead 0 linklay atm ceil 1169kbit cburst 1169kbit mtu 798 prio 1 quantum  1852
tc qdisc add dev download parent 20:2 cake diffserv8   rtt 84ms nowash dual-dsthost noatm nonat mpu 0 raw bandwidth 800kbit
tc filter add dev download protocol all  parent 20: handle 202 fw flowid 20:2





tc class add dev download parent 20: classid 20:3 htb rate 800kbit burst 1169kbit mpu 0 overhead 0 linklay atm ceil 1169kbit cburst 1169kbit  prio 2  quantum 1895  
tc qdisc add dev download parent 20:3 cake diffserv8   rtt 84ms nowash dual-dsthost noatm nonat mpu 0 raw bandwidth 800kbit
tc filter add dev download protocol all  parent 20: handle 203 fw flowid 20:3







tc class add dev download parent 20: classid 20:4 htb rate 800kbit burst 1169kbit mpu 0 overhead 0 linklay atm ceil 1169kbit cburst 1169kbit  prio 3  quantum 1403  
tc qdisc add dev download parent 20:4 cake diffserv8   rtt 84ms nowash dual-dsthost noatm nonat mpu 0 raw bandwidth 800kbit
tc filter add dev download protocol all  parent 20: handle 204 fw flowid 20:4



tc class add dev download parent 20: classid 20:5 htb rate 869kbit burst 1169kbit mpu 0 overhead 0 linklay atm ceil 1169kbit cburst 1169kbit  prio 4  quantum 940  
tc qdisc add dev download parent 20:5 cake diffserv8   rtt 84ms nowash dual-dsthost noatm nonat mpu 0 raw bandwidth 800kbit
tc filter add dev download protocol all  parent 20: handle 205 fw flowid 20:5



tc class add dev download parent 20: classid 20:6 htb rate 869kbit burst 1169kbit mpu 0 overhead 0 linklay atm ceil 1169kbit cburst 1169kbit  prio 5  quantum 631  
tc qdisc add dev download parent 20:6 cake diffserv8   rtt 84ms nowash dual-dsthost noatm nonat mpu 0 raw bandwidth 800kbit
tc filter add dev download protocol all  parent 20: handle 206 fw flowid 20:6
 






tc class add dev download parent 20: classid 20:7 htb rate 3800kbit burst 3800kbit mpu 64 overhead 0 linklay ethernet ceil 3800kbit cburst 3800kbit mtu 1465 prio 8
tc qdisc add dev download parent 20:7 cake bandwidth 3800kbit  lan diffserv8 dual-dsthost nat nowash ack-filter
tc filter add dev download protocol all  parent 20: handle 207 fw flowid 20:7

iptables -t mangle -A QOS -p 17 --sport 443 -j MARK --set-mark 207 -m comment --comment test_with_youtube


tc class add dev download parent 20: classid 20:8 htb rate 8632kbit burst 7418kbit mpu 256 overhead 0 linklay ethernet ceil 8532kbit cburst 8532kbit mtu 1465 prio 9
tc qdisc add dev download parent 20:8 cake bandwidth 8632kbit  lan diffserv8 dual-dsthost nat nowash ack-filter-aggressive







iptables -t mangle -A QOS -j CONNMARK --save-mark



This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.