Question about TC functionality
Good morning,
I am writing software that implements DPI to shape traffic flow. I have already done packet sniffing and recognition (e.g. ICMP, Skype, HTTP, etc). However I would like to implement HTB for just those packets that I select, so I can "slow" or "speed" them up. I know that tc can do that, but I can't find how to do that basing on packets.
Kind Regards,
Tomasz
Hello Tomasz,
Quoted 5 lines · Tomasz W
I am writing software that implements DPI to shape traffic flow. I have already done packet sniffing and recognition (e.g. ICMP, Skype, HTTP, etc). However I would like to implement HTB for just those packets that I select, so I can "slow" or "speed" them up. I know that tc can do that, but I can't find how to do that basing on packets.
You would probably need to somehow mark the packets, and then let "tc" match based on that mark. Otherwise you would need to implement the DPI inside tc.
You could look into seeting the "fwmark" based on DPI, and then have tc match on that.
Or you could look into setting a DSCP value based on DPI, and then match on that, using, e.g., the u32 match of tc.
See, e.g., https://lartc.org/howto/lartc.adv-filter.html for additional info.
HTH,
Erik
Quoted 1 line · Tomasz W
Good morning,
Hi,
Quoted 1 line
I am writing software that implements DPI to shape traffic flow. I have already done packet sniffing and recognition (e.g. ICMP, Skype, HTTP, etc). However I would like to implement HTB for just those packets that I select, so I can "slow" or "speed" them up. I know that tc can do that, but I can't find how to do that basing on packets.
In addition to what Erik suggested, you might be able to apply routes via iptables such that traffic goes out different (virtual) interfaces and then apply generic tc QoS as desired on the different (virtual) interfaces.
Signature · 2 lines
Grant. . . . unix || die