All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Incoming trafic shaping (depending on src IP)
@ 2001-02-20 10:47 Spyou
  2001-02-20 13:40 ` bert
  2001-02-23  3:07 ` Oki
  0 siblings, 2 replies; 3+ messages in thread
From: Spyou @ 2001-02-20 10:47 UTC (permalink / raw)
  To: lartc

<PRE>
Hi there,


i'm trying to shape incoming trafic on my linux box.

I want it to depend on the source IP adress of the packets (in fact, i got 
a VPN on an ADSL link and wanted to get at least/max 64Kbit/s for the VPN)

So i tried this :

tc qdisc add dev ppp0 root handle 1:0 cbq bandwidth 512Kbit avpkt 1000 cell 8
tc class add dev ppp0 parent 1:0 classid 1:1 cbq bandwidth 512Kbit rate 
512Kbit weight 50Kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000
tc class add dev ppp0 parent 1:1 classid 1:10 cbq bandwidth 512Kbit rate 
64Kbit weight 6Kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000 bounded 
isolated
tc qdisc add dev ppp0 parent 1:10 tbf rate 64Kbit buffer 10Kb/8 limit 15Kb 
mtu 1500
tc filter add dev ppp0 parent 1:0 protocol ip prio 100 u32 match ip src 
&lt;the SRC IP of my VPN&gt; flowid 1:10

Okay, so, with this, packets comming trought ppp0 and from &lt;the SRC IP of 
my VPN&gt; should be shaped at 64Kbit/s, right ?

Where's my error ? Is there something more simple (eg. with iptables and 
packet marking ?)


thx for help :)
____________________________________
  'Spyou' - www.spyou.org - <A HREF="mailto:root@spyou.org">root@spyou.org</A>
     #gtr / ircnet.grolier.net - UIN : 6871374

We've done so much, for so long, with so little
We're now qualified to do anything with nothing.



</PRE>

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

end of thread, other threads:[~2001-02-23  3:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-20 10:47 [LARTC] Incoming trafic shaping (depending on src IP) Spyou
2001-02-20 13:40 ` bert
2001-02-23  3:07 ` Oki

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.