Re: Some more test on ingress, ifb, fwmark

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mandi! Andy Furniss
  In chel di` si favelave...

> Not sure really - need more info on the rest of the setup like what
> qdiscs/queue lengths (if any) you set on the leafs. The nature and
> speed of the wan.

My complete IFB setup; egress, indeed, is roughly the same.
Related to an 3M/2M WiMAX link.

# I setup the interface, matching reduced MTU with the real interface
ifconfig ifb2 mtu 1476 txqueuelen 600 up

# Then i setup htb on egress for ifb2
/sbin/tc qdisc del dev ifb2 root
/sbin/tc qdisc add dev ifb2 root handle 1: htb
/sbin/tc class add dev ifb2 parent 1: classid 1:1 htb rate 3000kbit ceil 3000kbit burst 16k cburst 8k mtu 1476
/sbin/tc class add dev ifb2 parent 1:1 classid 1:10 htb rate 1200kbit ceil 3000kbit burst 6k cburst 8k quantum 2952 prio 1
/sbin/tc qdisc add dev ifb2 parent 1:10 handle 10: sfq perturb 10
/sbin/tc class add dev ifb2 parent 1:1 classid 1:20 htb rate 600kbit ceil 3000kbit burst 3k cburst 8k quantum 2952 prio 2
/sbin/tc qdisc add dev ifb2 parent 1:20 handle 20: sfq perturb 10
/sbin/tc class add dev ifb2 parent 1:1 classid 1:30 htb rate 300kbit ceil 2400kbit burst 1k cburst 6k quantum 7380 prio 3
/sbin/tc qdisc add dev ifb2 parent 1:30 handle 30: sfq perturb 10
/sbin/tc class add dev ifb2 parent 1:1 classid 1:40 htb rate 300kbit ceil 1500kbit burst 1k cburst 4k quantum 7380 prio 4
/sbin/tc qdisc add dev ifb2 parent 1:40 handle 40: sfq perturb 10
/sbin/tc class add dev ifb2 parent 1:1 classid 1:50 htb rate 300kbit ceil 600kbit burst 1k cburst 1k quantum 2952 prio 5
/sbin/tc qdisc add dev ifb2 parent 1:50 handle 50: sfq perturb 10

Trying tu understand your sentence on previous email, eg:

> but it is flawed because the ${UPLINK}kbit and $[9*$UPLINK/10]kbit on
> the leafs will not be constrained by the parent - so go over limit.

you say that does not work because 'ceil' misses from original
wondershaper?
Eg, using 'ceil' (on parent and childeren, indeed) my setup works?
I've understood right?
Anyway, go further:

# Then i setup ingress on ifb2 (probably not useful at all, it was a try...)
/sbin/tc qdisc del dev ifb2 ingress
/sbin/tc qdisc add dev ifb2 handle ffff: ingress
/sbin/tc filter add dev ifb2 parent ffff: protocol ip prio 50 u32 match ip src 0.0.0.0/0 police rate 3000kbit burst 16k drop flowid :1

# Then i setup filters, exactly as on my previous post, i don't duplicate...

# Then i ''bind'' ifb2 on the real interface ingress
tc qdisc del dev eth2 ingress
tc qdisc add dev eth2 ingress
tc filter add dev eth2 parent ffff: protocol ip prio 50 u32 match ip src 0.0.0.0/0 flowid :1 action mirred egress redirect dev ifb2


> I assume this is shaping incoming from ISP - which is not the same
> as shaping outgoing traffic. If you line is 3mbit then for ingress
> you have to set a rate lower than that or you won't shape anything
> at all and choosing how much bandwidth you need to sacrifice to
> shape is tricky. The harder you hit the line the more you'll need to
> back off.

Effectively on past (4-5 years ago...), when i've setup my egress
scripts,  i've done many test on reducing ingress and egress bandwidth,
but without much clue. AFAI remember well, my simpler/stupid ingress
filter to rate limit was added after all my tries.

I give it a try...


Thanks.

-- 
dott. Marco Gaiarin				    GNUPG Key ID: 240A3D66
  Associazione ``La Nostra Famiglia''                http://www.sv.lnf.it/
  Polo FVG  -  Via della Bontà, 7 - 33078  -  San Vito al Tagliamento (PN)
  marco.gaiarin(at)sv.lnf.it	  tel +39-0434-842711  fax +39-0434-842797

		Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
	   http://www.lanostrafamiglia.it/chi_siamo/5xmille.php
	(cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)
--
To unsubscribe from this list: send the line "unsubscribe lartc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux