All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] prioritizing traffic using PRIO qdisc
@ 2003-09-06  9:03 Matus Petrulak
  2003-09-07 23:22 ` Damion de Soto
  0 siblings, 1 reply; 2+ messages in thread
From: Matus Petrulak @ 2003-09-06  9:03 UTC (permalink / raw)
  To: lartc

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 / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [LARTC] prioritizing traffic using PRIO qdisc
  2003-09-06  9:03 [LARTC] prioritizing traffic using PRIO qdisc Matus Petrulak
@ 2003-09-07 23:22 ` Damion de Soto
  0 siblings, 0 replies; 2+ messages in thread
From: Damion de Soto @ 2003-09-07 23:22 UTC (permalink / raw)
  To: lartc

Matus Petrulak wrote:

> 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:1
> 
> but 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.


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Damion de Soto - Software Engineer  email:     damion@snapgear.com
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 / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-09-07 23:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-06  9:03 [LARTC] prioritizing traffic using PRIO qdisc Matus Petrulak
2003-09-07 23:22 ` Damion de Soto

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.