All of lore.kernel.org
 help / color / mirror / Atom feed
* Fwd: [LARTC] HTB shaping & borrowing info
@ 2006-05-27 22:11 Stefano Mainardi
  2006-05-27 23:24 ` Andreas Klauer
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Stefano Mainardi @ 2006-05-27 22:11 UTC (permalink / raw)
  To: lartc


[-- Attachment #1.1: Type: text/plain, Size: 2328 bytes --]

2006/5/27, Andreas Klauer <Andreas.Klauer@metamorpher.de>:

> > If B don't make traffic, 7/8 of 20Mb/s must be assigned to A and all the
> > rest at B
>
> Why would you assign traffic at B if it doesn't make traffic?


Sorry, "all the rest at A" :)

>
> Post your HTB script and I (and probably others) will have a look at it.



This is  the script:
//
#!/bin/bash
STEFANO="00:0F:B0:5F:A6:AD"
NEWDEV="00:13:D4:20:3B:46"
VPN3="00:13:A1:60:3B:AA"
MARK_STEFANO=1
MARK_PAOLO=2
MARK_VPN4=3

tc qdisc del dev eth1 root

iptables -t mange -F
iptables -t mangle -A PREROUTING -i eth0 -m mac -mac-source $STEFANO -j MARK
-set-mark $MARK_STEFANO
iptables -t mangle -A PREROUTING -i eth0 -m mac -mac-source $PAOLO -j MARK
-set-mark $MARK_PAOLO
iptables -t mangle -A PREROUTING -i eth0 -m mac -mac-source $VPN4 -j MARK
-set-mark $MARK_VPN4

tc qdisc add dev eth1 root handle 11: htb
tc class add dev eth1 parent 11:0 classid 11:1 htb rate 100Mbit ceil 100Mbit
burst 6k cburst 64k quantum 1600
tc class add dev eth1 parent 11:1 classid 11:2 htb rate 70Mbit ceil 70Mbit
burst 6k cburst 64k quantum 1600
tc class add dev eth1 parent 11:1 classid 11:3 htb rate 20Mbit ceil 20Mbit
burst 6k cburst 64k quantum 1600
tc class add dev eth1 parent 11:1 classid 11:4 htb rate 10Mbit ceil 10Mbit
burst 6k cburst 64k quantum 1600

tc qdisc add dev eth1 parent 11:2 handle 20: sfq preturb 10
tc qdisc add dev eth1 parent 11:3 handle 20: sfq preturb 10
tc qdisc add dev eth1 parent 11:4 handle 20: sfq preturb 10

tc filter add dev eth1 protocol ip handle $MARK_STEFANO fw flowid 11:2
tc filter add dev eth1 protocol ip handle $MARK_PAOLO fw flowid 11:3
tc filter add dev eth1 protocol ip handle $MARK_VPN4 fw flowid 11:2
\\

We have tested this script with CEIL=RATE, and CEIL=100Mbit, but i view that
the data-rate calculated for each PC is not proportional to the traffic
assigned at Firewall.

Many thanks.
-- 
Stefano Mainardi
Presidente Associazione ILDN - Italian Linux Distro Network
Mobile: 349/3917212
Skype: mainardistefano
IM (ICQ): 250-292-408
Blog: http://www.mainardistefano.org


-- 
Stefano Mainardi
Presidente Associazione ILDN - Italian Linux Distro Network
Mobile: 349/3917212
Skype: mainardistefano
IM (ICQ): 250-292-408
Blog: http://www.mainardistefano.org

[-- Attachment #1.2: Type: text/html, Size: 3324 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

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

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

end of thread, other threads:[~2006-06-01 21:57 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-27 22:11 Fwd: [LARTC] HTB shaping & borrowing info Stefano Mainardi
2006-05-27 23:24 ` Andreas Klauer
2006-05-28  0:04 ` Stefano Mainardi
2006-05-28  0:25 ` Andreas Klauer
2006-05-29 15:28 ` Stefano Mainardi
2006-05-30 11:02 ` Stefano Mainardi
2006-06-01 20:33 ` Andy Furniss
2006-06-01 20:37 ` Stefano Mainardi
2006-06-01 20:46 ` Stefano Mainardi
2006-06-01 20:46 ` Andy Furniss
2006-06-01 20:59 ` Andy Furniss
2006-06-01 21:13 ` Stefano Mainardi
2006-06-01 21:57 ` Andy Furniss

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.