From: Damion de Soto <damion@snapgear.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Whats wrong with my script?
Date: Fri, 30 Jan 2004 07:16:55 +0000 [thread overview]
Message-ID: <401A04E7.5050705@snapgear.com> (raw)
In-Reply-To: <001301c3e4db$50143c20$cd302bc8@traza>
Gastón wrote:
> What about this? : tc filter add dev eth1 parent 1:0 protocol ip prio 100
> u32 match ip dst 192.168.0.50 classid 1:56
> Is this correct for shaping upload?
On your upload (eth0) interface, you can't use private IPs, because they've already
been natted to real ones (see http://www.docum.org/stef.coene/qos/kptd/ )
If you want to shape outbound traffic based on private-lan IP, you need to mark the
packets with iptables, then filter based on mark.
(There are lots of examples of this in the doco and mail archives).
Your download rules seem correct enough.
regards,
>
> ----- Original Message -----
> From: "andybr" <andybr@bol.com.br>
> To: <gaston@steel.com.ar>
> Cc: <lartc@mailman.ds9a.nl>
> Sent: Thursday, January 29, 2004 10:05 AM
> Subject: Re:[LARTC] Whats wrong with my script?
>
>
> Hello,
>
> According with rules you are controlling only download
> (src ip) you should add a (dst rule) also. Make a try.
>
>
> []'s
> Anderson
>
>>I`m trying to shape both upload (eth0) and download
>
> (eth1). I made this
>
>>script to acomplishthis but the filters are not working
>
> even though the
>
>>classes and qdiscs are created. What am I doing wrong?
>
> #!/bin/bash
>
>>
>>tc qdisc del dev eth0 root
>>tc qdisc add dev eth0 root handle 1 htb default 10 r2q
>
> 5
>
>>tc qdisc del dev eth1 root
>>tc qdisc add dev eth1 root handle 1 htb default 10 r2q
>
> 5
>
>>tc class add dev eth0 parent 1: classid 1:2 htb rate 5M
>
> bit burst 15k
>
>>tc class add dev eth0 parent 1:2 classid 1:59 htb rate
>
> 64Kbit ceil 64Kbit
>
>>tc qdisc add dev eth0 parent 1:59 handle 59 sfq perturb
>
> 10
>
>>tc filter add dev eth0 parent 1:0 protocol ip prio 100
>
> u32 match ip src
>
>>192.168.0.50 classid 1:59
>>
>>tc class add dev eth1 parent 1: classid 1:2 htb rate 5M
>
> bit burst 15k
>
>>tc class add dev eth1 parent 1:2 classid 1:56 htb rate
>
> 64Kbit ceil 64Kbit
>
>>tc qdisc add dev eth1 parent 1:56 handle 56 sfq perturb
>
> 10
>
>>tc filter add dev eth1 parent 1:0 protocol ip prio 100
>
> u32 match ip dst
>
>>192.168.0.50 classid 1:56
>>
>>
>>_______________________________________________
>>LARTC mailing list / LARTC@mailman.ds9a.nl
>>http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: ht
>
> tp://lartc.org/
>
>
>
> __________________________________________________________________________
> Acabe com aquelas janelinhas que pulam na sua tela.
> AntiPop-up UOL - É grátis!
> http://antipopup.uol.com.br/
>
>
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>
>
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Damion de Soto - Software Engineer email: damion@snapgear.com
SnapGear - A CyberGuard Company --- ph: +61 7 3435 2809
| Custom Embedded Solutions fax: +61 7 3891 3630
| and Security Appliances web: http://www.snapgear.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- Free Embedded Linux Distro at http://www.snapgear.org ---
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next prev parent reply other threads:[~2004-01-30 7:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-27 13:41 [LARTC] Whats wrong with my script? Gastón
2004-01-29 13:05 ` andybr
2004-01-29 20:19 ` Gastón
2004-01-30 7:16 ` Damion de Soto [this message]
2004-01-30 12:33 ` [LARTC] " Gastón
2004-01-30 14:23 ` Anderson O Muniz
2004-02-01 23:09 ` [LARTC] " Damion de Soto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=401A04E7.5050705@snapgear.com \
--to=damion@snapgear.com \
--cc=lartc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.