prioritizing traffic using PRIO qdisc
i am connected to internet through linux router. I want to prioritize all SSH traffic over other traffic. I tried to do this using:
iptables -t mangle -A PREROUTING -i eth0 -p tcp --sport ssh -j TOS --set-tos Minimize-Delay
but it was not effective at all.
so i tried this:
# i think this creates 3 bands (1,2,3) and band 1 has the highets priority # and i think than every normal packet go to band 2 tc qdisc add dev eth1 root handle 1: prio
# marked SSH packets with 1 iptables -t mangle -A OUTPUT -i eth1 -p tcp --sport ssh -j MARK --set-mark 1
# all packets with mark 1 goes to band with highest priority tc filter add dev eth1 parent 1: protocol ip prio 1 handle 1 fw classid 1:1
but the ssh connection was not interactive. My bandwidth is 256kbit. Please can someone help me?
Best regards
Matis
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 6 lines · Matus Petrulak
tc qdisc add dev eth1 root handle 1: prio
iptables -t mangle -A OUTPUT -i eth1 -p tcp --sport ssh -j MARK --set-mark 1 tc filter add dev eth1 parent 1: protocol ip prio 1 handle 1 fw classid 1:1but the ssh connection was not interactive. My bandwidth is 256kbit. Please can someone help me?
Don't forget this is only going to affect outgoing traffic. (assuming eth0 is your LAN and eth1 is your internet). Incoming traffic can still flood your high-priority ssh traffic coming back in unless you have other measures in place, like:
shaping on eth0 as well
ingress policer
using prio qdisc on a imq device.
Signature · 10 lines
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Damion de Soto - Software Engineer email: [email protected] SnapGear --- ph: +61 7 3435 2809 | Custom Embedded Solutions fax: +61 7 3891 3630 | and Security Appliances web: http://www.snapgear.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/