* [LARTC] Shape both incoming and outgoing traffic with HTB ?
@ 2003-07-22 2:36 Rio Martin.
2003-07-22 2:41 ` Martin A. Brown
2003-07-22 3:11 ` Rio Martin.
0 siblings, 2 replies; 3+ messages in thread
From: Rio Martin. @ 2003-07-22 2:36 UTC (permalink / raw)
To: lartc
Dear all,
I want to shape both incoming and outgoing traffic with HTB.
Since the first time i applied HTB, i only limit incoming traffic from
internet, while the outgoing traffic is unlimited and now these days my
outgoing traffic really getting higher.
INTERNET ----- eth0 | BW.MANAGER | eth1 --- LAN
#!/bin/sh
tc qdisc del dev eth0 root
tc qdisc del dev eth1 root
tc qdisc add dev eth1 root handle 1 htb default 0 r2q 50
tc class add dev eth1 parent 1: classid 1:2 htb rate 120Kbit ceil 120Kbit
tc qdisc add dev eth1 parent 1:2 handle 2 sfq perturb 10 quantum 1500
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip src
0.0.0.0/0 match ip dst 192.168.0.0/19 classid 1:2
tc qdisc add dev eth0 root handle 2 htb default 0 r2q 50
tc qdisc add dev eth0 parent 2:10 handle 10 sfq perturb 10 quantum 1500
tc class add dev eth0 parent 2: classid 2:10 htb rate 20Kbit ceil 20Kbit
tc filter add dev eth0 parent 2:0 protocol ip prio 100 u32 match ip src
192.168.0.0/19 match ip dst 0.0.0.0/0 classid 2:10
#End of script
I applied, but none of outgoing traffic match class 2:10
I need help about this,
Regards,
Rio Martin.
-
"When in doubt, tell the truth."
-- Mark Twain
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LARTC] Shape both incoming and outgoing traffic with HTB ?
2003-07-22 2:36 [LARTC] Shape both incoming and outgoing traffic with HTB ? Rio Martin.
@ 2003-07-22 2:41 ` Martin A. Brown
2003-07-22 3:11 ` Rio Martin.
1 sibling, 0 replies; 3+ messages in thread
From: Martin A. Brown @ 2003-07-22 2:41 UTC (permalink / raw)
To: lartc
Hello Rio Martin,
: I want to shape both incoming and outgoing traffic with HTB. Since the
: first time i applied HTB, i only limit incoming traffic from internet,
: while the outgoing traffic is unlimited and now these days my outgoing
: traffic really getting higher.
:
: INTERNET ----- eth0 | BW.MANAGER | eth1 --- LAN
This is not an uncommon problem for masquerading or SNATting hosts. In
short, your upload traffic has already been masqueraded/SNATted, so you no
longer have a source IP of 192.168.0.0/19.
The best thing to do is to use fwmark to mark the traffic with
iptables/ipchains (whichever you are using) and classify the outbound
traffic according to the fwmark. See the LARTC documentation on this
topic [1].
-Martin
[1] http://lartc.org/howto/lartc.qdisc.filters.html#LARTC.FILTERING.SIMPLE
--
Martin A. Brown --- SecurePipe, Inc. --- mabrown@securepipe.com
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LARTC] Shape both incoming and outgoing traffic with HTB ?
2003-07-22 2:36 [LARTC] Shape both incoming and outgoing traffic with HTB ? Rio Martin.
2003-07-22 2:41 ` Martin A. Brown
@ 2003-07-22 3:11 ` Rio Martin.
1 sibling, 0 replies; 3+ messages in thread
From: Rio Martin. @ 2003-07-22 3:11 UTC (permalink / raw)
To: lartc
On Tuesday 22 July 2003 09:41, Martin A. Brown wrote:
> Hello Rio Martin,
> : I want to shape both incoming and outgoing traffic with HTB. Since the
> : first time i applied HTB, i only limit incoming traffic from internet,
> : while the outgoing traffic is unlimited and now these days my outgoing
> : traffic really getting higher.
> : INTERNET ----- eth0 | BW.MANAGER | eth1 --- LAN
> This is not an uncommon problem for masquerading or SNATting hosts. In
> short, your upload traffic has already been masqueraded/SNATted, so you no
> longer have a source IP of 192.168.0.0/19.
Yes, you re right.
I tried entering my public ip for the match ip src, and it goes smoothly
shaped.
> The best thing to do is to use fwmark to mark the traffic with
> iptables/ipchains (whichever you are using) and classify the outbound
> traffic according to the fwmark. See the LARTC documentation on this
> topic [1].
Yes i realized that if i didnt use fwmark, it will be hard to manage outgoing
traffic from all different network i managed down here.
Thanks ..
Regards,
Rio Martin.
--
43rd Law of Computing:
Anything that can go wr
fortune: Segmentation violation -- Core dumped
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-07-22 3:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-22 2:36 [LARTC] Shape both incoming and outgoing traffic with HTB ? Rio Martin.
2003-07-22 2:41 ` Martin A. Brown
2003-07-22 3:11 ` Rio Martin.
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.