Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
* [LARTC] Guarantee ICMP respond time ?
@ 2006-02-14 20:35 Stanislav Nedelchev
  2006-02-14 21:26 ` Stanislav Nedelchev
  0 siblings, 1 reply; 2+ messages in thread
From: Stanislav Nedelchev @ 2006-02-14 20:35 UTC (permalink / raw)
  To: lartc

Hello to all people there .
Can i guarantee ICMP respond time no metter how loaded is internet line .
i have typical NATed enviroiment   like

External IP |linux router| LAN - 192.168.0.0/24

i have example setup with IMQ but is it possible to be done also if i
attache htb to eth0 and eth1 for example .

if i start shaper ping i better that without shaper but it's not
guarantted i mean response  time is not like constant.

Maybe i'm missing something.
Is it possible with HTB ot with something else like CBQ ?
here is my example setup




echo "Loading Traffic Shaper IMQ0 Upload"
tc qdisc  del dev imq0 root
tc qdisc  add dev imq0 root handle 2: htb default 333 r2q 1

tc class  add dev imq0 parent 2: classid 2:2 htb rate 192kbit

#ICMP
tc class  add dev imq0 parent 2:2 classid 2:30 htb rate 32kbit prio 0
tc filter add dev imq0 parent  2:0 protocol ip handle 5 fw classid 2:30
tc qdisc  add dev imq0 parent 2:30 handle 30: sfq perturb 1



tc class  add dev imq0 parent 2:2 classid 2:24 htb rate 96kbit ceil
160kbit prio 1
tc filter add dev imq0 parent  2:0 protocol ip handle 1 fw classid 2:24

tc qdisc  add dev imq0 parent 2:24 handle 24: sfq perturb 10

tc class  add dev imq0 parent 2:2 classid 2:26 htb rate 32kbit ceil
128kbit prio 3
tc filter add dev imq0 parent 2:0 protocol ip handle 2 fw classid 2:26
#tc qdisc  add dev imq0 parent 2:26 handle 26: sfq perturb 10

tc class  add dev imq0 parent 2:2 classid 2:28 htb rate 16kbit ceil
64kbit prio 5
tc filter add dev imq0 parent  2:0 protocol ip handle 3 fw classid 2:28
#tc qdisc  add dev imq0 parent 2:28 handle 28: sfq perturb 10

tc  class  add dev imq0 parent  2:2 classid 2:333 htb rate 16kbit ceil
128kbit prio 7
tc  qdisc  add dev imq0 parent  2:333 handle 333: sfq perturb 10

echo "Done"

#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------


echo "Loading Traffic Shaper imq1 Upload"
tc qdisc  del dev imq1 root
tc qdisc  add dev imq1 root handle 2: htb default 333 r2q 1

tc class  add dev imq1 parent 2: classid 2:2 htb rate 192kbit

#ICMP
tc class  add dev imq1 parent 2:2 classid 2:30 htb rate 32kbit prio 0
tc filter add dev imq1 parent  2:0 protocol ip handle 5 fw classid 2:30
tc qdisc  add dev imq1 parent 2:30 handle 30: sfq perturb 1



tc class  add dev imq1 parent 2:2 classid 2:24 htb rate 96kbit ceil
160kbit prio 1
tc filter add dev imq1 parent  2:0 protocol ip handle 1 fw classid 2:24



tc qdisc  add dev imq1 parent 2:24 handle 24: sfq perturb 10

tc class  add dev imq1 parent 2:2 classid 2:26 htb rate 32kbit ceil
128kbit prio 3
tc filter add dev imq1 parent 2:0 protocol ip handle 2 fw classid 2:26
#tc qdisc  add dev imq1 parent 2:26 handle 26: sfq perturb 10

tc class  add dev imq1 parent 2:2 classid 2:28 htb rate 16kbit ceil
64kbit prio 5
tc filter add dev imq1 parent  2:0 protocol ip handle 3 fw classid 2:28
#tc qdisc  add dev imq1 parent 2:28 handle 28: sfq perturb 10

tc  class  add dev imq1 parent  2:2 classid 2:333 htb rate 16kbit ceil
128kbit prio 7
tc  qdisc  add dev imq1 parent  2:333 handle 333: sfq perturb 10

echo "Done"

#Priority 0
iptables -t mangle -I PREROUTING  -p icmp -j MARK --set-mark 5

#Priority 1
iptables -t mangle -A PREROUTING  -i eth0  -p tcp --dport 3389  -j MARK
--set-mark 1
iptables -t mangle -A PREROUTING  -i eth0  -p tcp --sport 3389  -j MARK
--set-mark 1

#Priority 2
iptables -t mangle -A PREROUTING  -i eth0  -p tcp --dport 25   -j MARK
--set-mark 2
iptables -t mangle -A PREROUTING  -i eth0  -p tcp --sport 25   -j MARK
--set-mark 2

#Priority 3
iptables -t mangle -A PREROUTING  -i eth0  -p tcp --dport 80   -j MARK
--set-mark 3
iptables -t mangle -A PREROUTING  -i eth0  -p tcp --sport 80   -j MARK
--set-mark 3


#Priority 0
iptables -t mangle -I POSTROUTING  -p icmp -j MARK --set-mark 5

#Priority 1
iptables -t mangle -A POSTROUTING  -i eth0  -p tcp --dport 3389  -j MARK
--set-mark 1
iptables -t mangle -A POSTROUTING  -i eth0  -p tcp --sport 3389  -j MARK
--set-mark 1

#Priority 2
iptables -t mangle -A POSTROUTING  -i eth0  -p tcp --dport 25   -j MARK
--set-mark 2
iptables -t mangle -A POSTROUTING  -i eth0  -p tcp --sport 25   -j MARK
--set-mark 2

#Priority 3
iptables -t mangle -A POSTROUTING  -i eth0  -p tcp --dport 80   -j MARK
--set-mark 3
iptables -t mangle -A POSTROUTING  -i eth0  -p tcp --sport 80   -j MARK
--set-mark 3

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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

end of thread, other threads:[~2006-02-14 21:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-14 20:35 [LARTC] Guarantee ICMP respond time ? Stanislav Nedelchev
2006-02-14 21:26 ` Stanislav Nedelchev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox