All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] traffic shaping
@ 2001-01-04 12:22 Wouter
  2001-01-04 18:17 ` Sander
                   ` (28 more replies)
  0 siblings, 29 replies; 30+ messages in thread
From: Wouter @ 2001-01-04 12:22 UTC (permalink / raw)
  To: lartc

<PRE>Hello,

I'm trying to limit all outgoing traffic by means of TC. With six students
we are connected through the server (Debian 2.2 kernel 2.2.18) with a
cablemodem. When one person uploads (usually with full bandwidth available
15KB/s) none of the others can make use of the internet because no requests
for information can be send.

So, i want to limit the maximum individual upload to 5KB/s so this doesnt
disturb others useing the internet.

Situation:

Server: 192.168.1.1
Clients: 192.168.1.2 - 192.168.1.7
eth0: LAN
eth1: Cablemodem

Below is what I came up with myself but it doesnt seem to work. Also when do
i activate this rules? pre- of post configuring interfaces?

Thnx,
Wouter Smit

------------------------------------------------
#!/bin/sh

TC=&quot;/sbin/tc&quot;
IF=&quot;eth1&quot;

echo Configure queueing discipline
$TC qdisc add dev $IF root handle 10: cbq bandwidth 120Kbit avpkt 1000

echo Configure root class
$TC class add dev $IF parent 10:0 classid 10:1 cbq bandwidth 120Kbit rate \
 120Kbit allot 1514 weight 12Kbit prio 8 maxburst 20 avpkt 1000

echo Configure class divisions
$TC class add dev $IF parent 10:1 classid 10:100 cbq bandwidth 120Kbit rate
\
  40Kbit allot 1514 weight 4Kbit prio 5 maxburst 20 avpkt 1000 bounded

echo Configure queue management
$TC qdisc add dev $IF parent 10:100 sfq perturb 15 quantum 1514

echo Configure which packets belong to which class
$TC filter add dev $IF parent 10:0 protocol ip prio 25 u32 match ip src \
  192.168.1.0/24 flowid 10:100




</PRE>

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

* [LARTC] traffic shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
@ 2001-01-04 18:17 ` Sander
  2001-01-05  3:52 ` Sander
                   ` (27 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Sander @ 2001-01-04 18:17 UTC (permalink / raw)
  To: lartc

<PRE>At 13:22 4-1-01 +0100, you wrote:
&gt;<i>Hello,
</I>&gt;<i>
</I>&gt;<i>I'm trying to limit all outgoing traffic by means of TC. With six students
</I>&gt;<i>we are connected through the server (Debian 2.2 kernel 2.2.18) with a
</I>&gt;<i>cablemodem. When one person uploads (usually with full bandwidth available
</I>&gt;<i>15KB/s) none of the others can make use of the internet because no requests
</I>&gt;<i>for information can be send.
</I>&gt;<i>
</I>&gt;<i>So, i want to limit the maximum individual upload to 5KB/s so this doesnt
</I>&gt;<i>disturb others useing the internet.
</I>&gt;<i>
</I>&gt;<i>Situation:
</I>&gt;<i>
</I>&gt;<i>Server: 192.168.1.1
</I>&gt;<i>Clients: 192.168.1.2 - 192.168.1.7
</I>&gt;<i>eth0: LAN
</I>&gt;<i>eth1: Cablemodem
</I>&gt;<i>
</I>&gt;<i>Below is what I came up with myself but it doesnt seem to work. Also when do
</I>&gt;<i>i activate this rules? pre- of post configuring interfaces?
</I>&gt;<i>
</I>&gt;<i>Thnx,
</I>&gt;<i>Wouter Smit
</I>&gt;<i>
</I>&gt;<i>------------------------------------------------
</I>&gt;<i>#!/bin/sh
</I>&gt;<i>
</I>&gt;<i>TC=&quot;/sbin/tc&quot;
</I>&gt;<i>IF=&quot;eth1&quot;
</I>&gt;<i>
</I>&gt;<i>echo Configure queueing discipline
</I>&gt;<i>$TC qdisc add dev $IF root handle 10: cbq bandwidth 120Kbit avpkt 1000
</I>&gt;<i>
</I>&gt;<i>echo Configure root class
</I>&gt;<i>$TC class add dev $IF parent 10:0 classid 10:1 cbq bandwidth 120Kbit rate \
</I>&gt;<i>  120Kbit allot 1514 weight 12Kbit prio 8 maxburst 20 avpkt 1000
</I>&gt;<i>
</I>&gt;<i>echo Configure class divisions
</I>&gt;<i>$TC class add dev $IF parent 10:1 classid 10:100 cbq bandwidth 120Kbit rate
</I>&gt;<i>\
</I>&gt;<i>   40Kbit allot 1514 weight 4Kbit prio 5 maxburst 20 avpkt 1000 bounded
</I>&gt;<i>
</I>&gt;<i>echo Configure queue management
</I>&gt;<i>$TC qdisc add dev $IF parent 10:100 sfq perturb 15 quantum 1514
</I>&gt;<i>
</I>&gt;<i>echo Configure which packets belong to which class
</I>&gt;<i>$TC filter add dev $IF parent 10:0 protocol ip prio 25 u32 match ip src \
</I>&gt;<i>   192.168.1.0/24 flowid 10:100
</I>
We have the exact same situation, so here is our configuration script, with 
a little tweaking you should be able to implement it. Most important is 
that you MARK the packets that enter the router with ipchains.

# setup packetforwarding
/sbin/ipchains -P forward DENY
# here we mark the packets with -m
/sbin/ipchains -A forward -s 192.168.0.1/32 -j MASQ -m 0x1
/sbin/ipchains -A forward -s 192.168.0.4/32 -j MASQ -m 0x4
/sbin/ipchains -A forward -s 192.168.0.3/32 -j MASQ -m 0x3
/sbin/ipchains -A forward -s 192.168.0.6/32 -j MASQ -m 0x6
/sbin/ipchains -A forward -s 192.168.0.7/32 -j MASQ -m 0x7
/sbin/ipchains -A forward -s 192.168.0.10/32 -j MASQ -m 0xa
# eliminate spoofing
/sbin/ipchains -A forward -i $extip -s 192.168.0.0/24 -d 0.0.0.0/0 -j DENY

#root device for upstream, divided in various subclasses to more or less 
guarantee a fair loadbalancing (see below..)
/usr/bin/tc qdisc add dev eth1 root handle 1: cbq bandwidth 128Kbit avpkt 1000
/usr/bin/tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 128Kbit 
rate 128Kbit \
allot 1514 weight 12Kbit prio 8 maxburst 20 avpkt 1000
/usr/bin/tc class add dev eth1 parent 1:1 classid 1:2 cbq bandwidth 128Kbit 
rate 64Kbit \
allot 1514 weight 6Kbit prio 8 maxburst 20 avpkt 1000
/usr/bin/tc class add dev eth1 parent 1:1 classid 1:3 cbq bandwidth 128Kbit 
rate 64Kbit \
allot 1514 weight 6Kbit prio 8 maxburst 20 avpkt 1000

# configure ip 1 here for 40 kbit (to ensure fairnes..) WITH borrowing
/usr/bin/tc class add dev eth1 parent 1:2 classid 1:11 cbq bandwidth 
128Kbit rate 40Kbit \
allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:2
/usr/bin/tc qdisc add dev eth1 parent 1:11 sfq quantum 1514b perturb 15
/usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle 1 fw 
classid 1:11
#192.168.0.3
/usr/bin/tc class add dev eth1 parent 1:2 classid 1:13 cbq bandwidth 
128Kbit rate 40Kbit \
allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:2
/usr/bin/tc qdisc add dev eth1 parent 1:13 sfq quantum 1514b perturb 15
/usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle 3 fw 
classid 1:13
#192.168.0.4
/usr/bin/tc class add dev eth1 parent 1:2 classid 1:14 cbq bandwidth 
128Kbit rate 35Kbit \
allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:2
/usr/bin/tc qdisc add dev eth1 parent 1:14 sfq quantum 1514b perturb 15
/usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle 4 fw 
classid 1:14
#192.168.0.6
/usr/bin/tc class add dev eth1 parent 1:3 classid 1:16 cbq bandwidth 
128Kbit rate 40Kbit \
allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:3
/usr/bin/tc qdisc add dev eth1 parent 1:16 sfq quantum 1514b perturb 15
/usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle 6 fw 
classid 1:16
#192.168.0.7
/usr/bin/tc class add dev eth1 parent 1:3 classid 1:17 cbq bandwidth 
128Kbit rate 40Kbit \
allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:3
/usr/bin/tc qdisc add dev eth1 parent 1:17 sfq quantum 1514b perturb 15
/usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle 7 fw 
classid 1:17
#192.168.0.10
/usr/bin/tc class add dev eth1 parent 1:3 classid 1:20 cbq bandwidth 
128Kbit rate 40Kbit \
allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:3
/usr/bin/tc qdisc add dev eth1 parent 1:20 sfq quantum 1514b perturb 15
/usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle 10 
fw classid 1:20

So we now have 1 root class of 128 kbit, two subclasses of 64 kbit, each of 
those subclass serving 3 people.
The 40kbit per person thing was done with one purpose: when 1 person starts 
the upload, and another person kicks in, the first person still gets 
128Kbit - 40Kbit and the second one gets that 40 Kbit. This is more then 
one would get when we would simply divide 128Kbit by 6. I don't yet know 
how to get the loadbalancing system to divide the space evenly (1 
person\x128 Kbit, 2 persons = 64Kbit, 3CKbit etc..), but haven't come up 
with a solution yet.

Sander


</PRE>

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

* [LARTC] traffic shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
  2001-01-04 18:17 ` Sander
@ 2001-01-05  3:52 ` Sander
  2001-01-05 11:42 ` Wouter
                   ` (26 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Sander @ 2001-01-05  3:52 UTC (permalink / raw)
  To: lartc

<PRE>That is my internet-interface ;) It is quite simple:

-the packets enter eth0
-then they are marked by ipchains
-then they enter eth1 and thus the 128kbit class I made
-and then they are balanced

Sander

At 21:27 4-1-01 +0100, you wrote:
&gt;<i>Is eth1 your lan of inet interface?
</I>&gt;<i>
</I>&gt;<i>Thnx,
</I>&gt;<i>Wouter
</I>&gt;<i>
</I>&gt;<i>----- Original Message -----
</I>&gt;<i>From: &quot;Sander&quot; &lt;<A HREF="mailto:thrill12@gmx.net">thrill12@gmx.net</A>&gt;
</I>&gt;<i>To: &quot;Wouter Smit&quot; &lt;<A HREF="mailto:wouter@smit.dhs.org">wouter@smit.dhs.org</A>&gt;
</I>&gt;<i>Cc: &lt;<A HREF="mailto:lartc@mailman.ds9a.nl">lartc@mailman.ds9a.nl</A>&gt;
</I>&gt;<i>Sent: Thursday, January 04, 2001 7:17 PM
</I>&gt;<i>Subject: Re: [LARTC] traffic shaping
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> &gt; At 13:22 4-1-01 +0100, you wrote:
</I>&gt;<i> &gt; &gt;Hello,
</I>&gt;<i> &gt; &gt;
</I>&gt;<i> &gt; &gt;I'm trying to limit all outgoing traffic by means of TC. With six
</I>&gt;<i>students
</I>&gt;<i> &gt; &gt;we are connected through the server (Debian 2.2 kernel 2.2.18) with a
</I>&gt;<i> &gt; &gt;cablemodem. When one person uploads (usually with full bandwidth
</I>&gt;<i>available
</I>&gt;<i> &gt; &gt;15KB/s) none of the others can make use of the internet because no
</I>&gt;<i>requests
</I>&gt;<i> &gt; &gt;for information can be send.
</I>&gt;<i> &gt; &gt;
</I>&gt;<i> &gt; &gt;So, i want to limit the maximum individual upload to 5KB/s so this doesnt
</I>&gt;<i> &gt; &gt;disturb others useing the internet.
</I>&gt;<i> &gt; &gt;
</I>&gt;<i> &gt; &gt;Situation:
</I>&gt;<i> &gt; &gt;
</I>&gt;<i> &gt; &gt;Server: 192.168.1.1
</I>&gt;<i> &gt; &gt;Clients: 192.168.1.2 - 192.168.1.7
</I>&gt;<i> &gt; &gt;eth0: LAN
</I>&gt;<i> &gt; &gt;eth1: Cablemodem
</I>&gt;<i> &gt; &gt;
</I>&gt;<i> &gt; &gt;Below is what I came up with myself but it doesnt seem to work. Also when
</I>&gt;<i>do
</I>&gt;<i> &gt; &gt;i activate this rules? pre- of post configuring interfaces?
</I>&gt;<i> &gt; &gt;
</I>&gt;<i> &gt; &gt;Thnx,
</I>&gt;<i> &gt; &gt;Wouter Smit
</I>&gt;<i> &gt; &gt;
</I>&gt;<i> &gt; &gt;------------------------------------------------
</I>&gt;<i> &gt; &gt;#!/bin/sh
</I>&gt;<i> &gt; &gt;
</I>&gt;<i> &gt; &gt;TC=&quot;/sbin/tc&quot;
</I>&gt;<i> &gt; &gt;IF=&quot;eth1&quot;
</I>&gt;<i> &gt; &gt;
</I>&gt;<i> &gt; &gt;echo Configure queueing discipline
</I>&gt;<i> &gt; &gt;$TC qdisc add dev $IF root handle 10: cbq bandwidth 120Kbit avpkt 1000
</I>&gt;<i> &gt; &gt;
</I>&gt;<i> &gt; &gt;echo Configure root class
</I>&gt;<i> &gt; &gt;$TC class add dev $IF parent 10:0 classid 10:1 cbq bandwidth 120Kbit rate
</I>&gt;<i>\
</I>&gt;<i> &gt; &gt;  120Kbit allot 1514 weight 12Kbit prio 8 maxburst 20 avpkt 1000
</I>&gt;<i> &gt; &gt;
</I>&gt;<i> &gt; &gt;echo Configure class divisions
</I>&gt;<i> &gt; &gt;$TC class add dev $IF parent 10:1 classid 10:100 cbq bandwidth 120Kbit
</I>&gt;<i>rate
</I>&gt;<i> &gt; &gt;\
</I>&gt;<i> &gt; &gt;   40Kbit allot 1514 weight 4Kbit prio 5 maxburst 20 avpkt 1000 bounded
</I>&gt;<i> &gt; &gt;
</I>&gt;<i> &gt; &gt;echo Configure queue management
</I>&gt;<i> &gt; &gt;$TC qdisc add dev $IF parent 10:100 sfq perturb 15 quantum 1514
</I>&gt;<i> &gt; &gt;
</I>&gt;<i> &gt; &gt;echo Configure which packets belong to which class
</I>&gt;<i> &gt; &gt;$TC filter add dev $IF parent 10:0 protocol ip prio 25 u32 match ip src \
</I>&gt;<i> &gt; &gt;   192.168.1.0/24 flowid 10:100
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; We have the exact same situation, so here is our configuration script,
</I>&gt;<i>with
</I>&gt;<i> &gt; a little tweaking you should be able to implement it. Most important is
</I>&gt;<i> &gt; that you MARK the packets that enter the router with ipchains.
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; # setup packetforwarding
</I>&gt;<i> &gt; /sbin/ipchains -P forward DENY
</I>&gt;<i> &gt; # here we mark the packets with -m
</I>&gt;<i> &gt; /sbin/ipchains -A forward -s 192.168.0.1/32 -j MASQ -m 0x1
</I>&gt;<i> &gt; /sbin/ipchains -A forward -s 192.168.0.4/32 -j MASQ -m 0x4
</I>&gt;<i> &gt; /sbin/ipchains -A forward -s 192.168.0.3/32 -j MASQ -m 0x3
</I>&gt;<i> &gt; /sbin/ipchains -A forward -s 192.168.0.6/32 -j MASQ -m 0x6
</I>&gt;<i> &gt; /sbin/ipchains -A forward -s 192.168.0.7/32 -j MASQ -m 0x7
</I>&gt;<i> &gt; /sbin/ipchains -A forward -s 192.168.0.10/32 -j MASQ -m 0xa
</I>&gt;<i> &gt; # eliminate spoofing
</I>&gt;<i> &gt; /sbin/ipchains -A forward -i $extip -s 192.168.0.0/24 -d 0.0.0.0/0 -j DENY
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; #root device for upstream, divided in various subclasses to more or less
</I>&gt;<i> &gt; guarantee a fair loadbalancing (see below..)
</I>&gt;<i> &gt; /usr/bin/tc qdisc add dev eth1 root handle 1: cbq bandwidth 128Kbit avpkt
</I>&gt;<i>1000
</I>&gt;<i> &gt; /usr/bin/tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth
</I>&gt;<i>128Kbit
</I>&gt;<i> &gt; rate 128Kbit \
</I>&gt;<i> &gt; allot 1514 weight 12Kbit prio 8 maxburst 20 avpkt 1000
</I>&gt;<i> &gt; /usr/bin/tc class add dev eth1 parent 1:1 classid 1:2 cbq bandwidth
</I>&gt;<i>128Kbit
</I>&gt;<i> &gt; rate 64Kbit \
</I>&gt;<i> &gt; allot 1514 weight 6Kbit prio 8 maxburst 20 avpkt 1000
</I>&gt;<i> &gt; /usr/bin/tc class add dev eth1 parent 1:1 classid 1:3 cbq bandwidth
</I>&gt;<i>128Kbit
</I>&gt;<i> &gt; rate 64Kbit \
</I>&gt;<i> &gt; allot 1514 weight 6Kbit prio 8 maxburst 20 avpkt 1000
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; # configure ip 1 here for 40 kbit (to ensure fairnes..) WITH borrowing
</I>&gt;<i> &gt; /usr/bin/tc class add dev eth1 parent 1:2 classid 1:11 cbq bandwidth
</I>&gt;<i> &gt; 128Kbit rate 40Kbit \
</I>&gt;<i> &gt; allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:2
</I>&gt;<i> &gt; /usr/bin/tc qdisc add dev eth1 parent 1:11 sfq quantum 1514b perturb 15
</I>&gt;<i> &gt; /usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle 1
</I>&gt;<i>fw
</I>&gt;<i> &gt; classid 1:11
</I>&gt;<i> &gt; #192.168.0.3
</I>&gt;<i> &gt; /usr/bin/tc class add dev eth1 parent 1:2 classid 1:13 cbq bandwidth
</I>&gt;<i> &gt; 128Kbit rate 40Kbit \
</I>&gt;<i> &gt; allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:2
</I>&gt;<i> &gt; /usr/bin/tc qdisc add dev eth1 parent 1:13 sfq quantum 1514b perturb 15
</I>&gt;<i> &gt; /usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle 3
</I>&gt;<i>fw
</I>&gt;<i> &gt; classid 1:13
</I>&gt;<i> &gt; #192.168.0.4
</I>&gt;<i> &gt; /usr/bin/tc class add dev eth1 parent 1:2 classid 1:14 cbq bandwidth
</I>&gt;<i> &gt; 128Kbit rate 35Kbit \
</I>&gt;<i> &gt; allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:2
</I>&gt;<i> &gt; /usr/bin/tc qdisc add dev eth1 parent 1:14 sfq quantum 1514b perturb 15
</I>&gt;<i> &gt; /usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle 4
</I>&gt;<i>fw
</I>&gt;<i> &gt; classid 1:14
</I>&gt;<i> &gt; #192.168.0.6
</I>&gt;<i> &gt; /usr/bin/tc class add dev eth1 parent 1:3 classid 1:16 cbq bandwidth
</I>&gt;<i> &gt; 128Kbit rate 40Kbit \
</I>&gt;<i> &gt; allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:3
</I>&gt;<i> &gt; /usr/bin/tc qdisc add dev eth1 parent 1:16 sfq quantum 1514b perturb 15
</I>&gt;<i> &gt; /usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle 6
</I>&gt;<i>fw
</I>&gt;<i> &gt; classid 1:16
</I>&gt;<i> &gt; #192.168.0.7
</I>&gt;<i> &gt; /usr/bin/tc class add dev eth1 parent 1:3 classid 1:17 cbq bandwidth
</I>&gt;<i> &gt; 128Kbit rate 40Kbit \
</I>&gt;<i> &gt; allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:3
</I>&gt;<i> &gt; /usr/bin/tc qdisc add dev eth1 parent 1:17 sfq quantum 1514b perturb 15
</I>&gt;<i> &gt; /usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle 7
</I>&gt;<i>fw
</I>&gt;<i> &gt; classid 1:17
</I>&gt;<i> &gt; #192.168.0.10
</I>&gt;<i> &gt; /usr/bin/tc class add dev eth1 parent 1:3 classid 1:20 cbq bandwidth
</I>&gt;<i> &gt; 128Kbit rate 40Kbit \
</I>&gt;<i> &gt; allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:3
</I>&gt;<i> &gt; /usr/bin/tc qdisc add dev eth1 parent 1:20 sfq quantum 1514b perturb 15
</I>&gt;<i> &gt; /usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle 10
</I>&gt;<i> &gt; fw classid 1:20
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; So we now have 1 root class of 128 kbit, two subclasses of 64 kbit, each
</I>&gt;<i>of
</I>&gt;<i> &gt; those subclass serving 3 people.
</I>&gt;<i> &gt; The 40kbit per person thing was done with one purpose: when 1 person
</I>&gt;<i>starts
</I>&gt;<i> &gt; the upload, and another person kicks in, the first person still gets
</I>&gt;<i> &gt; 128Kbit - 40Kbit and the second one gets that 40 Kbit. This is more then
</I>&gt;<i> &gt; one would get when we would simply divide 128Kbit by 6. I don't yet know
</I>&gt;<i> &gt; how to get the loadbalancing system to divide the space evenly (1
</I>&gt;<i> &gt; person\x128 Kbit, 2 persons = 64Kbit, 3CKbit etc..), but haven't come up
</I>&gt;<i> &gt; with a solution yet.
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Sander
</I>


</PRE>

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

* [LARTC] traffic shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
  2001-01-04 18:17 ` Sander
  2001-01-05  3:52 ` Sander
@ 2001-01-05 11:42 ` Wouter
  2001-01-05 13:56 ` Junus
                   ` (25 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Wouter @ 2001-01-05 11:42 UTC (permalink / raw)
  To: lartc

<PRE>Hi Sander,

Seems to work now, below is my slightly altered configuration, thnx for
helping!

Greets,
Wouter

CLIENTS=&quot;2 3 4 5 6 7&quot;

  ## Traffic shaping
##########################################################

  # Configure queueing discipline
  $TCBIN qdisc add dev $EXTERNALIF root handle 1: cbq bandwidth 128Kbit
avpkt 1000

  # Configure root class
  $TCBIN class add dev $EXTERNALIF parent 1:0 classid 1:1 cbq bandwidth
128Kbit rate 128Kbit \
    allot 1514 weight 12Kbit prio 8 maxburst 20 avpkt 1000

  # Configure class divisions
  $TCBIN class add dev $EXTERNALIF parent 1:1 classid 1:2 cbq bandwidth
128Kbit rate 40Kbit \
    allot 1514 weight 4Kbit prio 8 maxburst 20 avpkt 1000 bounded

  # configure ips for 40Kbit
  for I in $CLIENTS; do

    $TCBIN class add dev $EXTERNALIF parent 1:2 classid 1:1$I cbq bandwidth
128Kbit rate 40Kbit \
      allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 bounded
    $TCBIN qdisc add dev $EXTERNALIF parent 1:1$I sfq quantum 1514b perturb
15
    $TCBIN filter add dev $EXTERNALIF parent 1:0 protocol ip prio 100 handle
$I fw classid 1:1$I

  done


----- Original Message -----
From: &quot;Sander&quot; &lt;<A HREF="mailto:thrill12@gmx.net">thrill12@gmx.net</A>&gt;
To: &quot;Wouter Smit&quot; &lt;<A HREF="mailto:wouter@smit.dhs.org">wouter@smit.dhs.org</A>&gt;
Cc: &lt;<A HREF="mailto:lartc@mailman.ds9a.nl">lartc@mailman.ds9a.nl</A>&gt;
Sent: Friday, January 05, 2001 4:52 AM
Subject: Re: [LARTC] traffic shaping


&gt;<i> That is my internet-interface ;) It is quite simple:
</I>&gt;<i>
</I>&gt;<i> -the packets enter eth0
</I>&gt;<i> -then they are marked by ipchains
</I>&gt;<i> -then they enter eth1 and thus the 128kbit class I made
</I>&gt;<i> -and then they are balanced
</I>&gt;<i>
</I>&gt;<i> Sander
</I>&gt;<i>
</I>&gt;<i> At 21:27 4-1-01 +0100, you wrote:
</I>&gt;<i> &gt;Is eth1 your lan of inet interface?
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;Thnx,
</I>&gt;<i> &gt;Wouter
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;----- Original Message -----
</I>&gt;<i> &gt;From: &quot;Sander&quot; &lt;<A HREF="mailto:thrill12@gmx.net">thrill12@gmx.net</A>&gt;
</I>&gt;<i> &gt;To: &quot;Wouter Smit&quot; &lt;<A HREF="mailto:wouter@smit.dhs.org">wouter@smit.dhs.org</A>&gt;
</I>&gt;<i> &gt;Cc: &lt;<A HREF="mailto:lartc@mailman.ds9a.nl">lartc@mailman.ds9a.nl</A>&gt;
</I>&gt;<i> &gt;Sent: Thursday, January 04, 2001 7:17 PM
</I>&gt;<i> &gt;Subject: Re: [LARTC] traffic shaping
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; &gt; At 13:22 4-1-01 +0100, you wrote:
</I>&gt;<i> &gt; &gt; &gt;Hello,
</I>&gt;<i> &gt; &gt; &gt;
</I>&gt;<i> &gt; &gt; &gt;I'm trying to limit all outgoing traffic by means of TC. With six
</I>&gt;<i> &gt;students
</I>&gt;<i> &gt; &gt; &gt;we are connected through the server (Debian 2.2 kernel 2.2.18) with a
</I>&gt;<i> &gt; &gt; &gt;cablemodem. When one person uploads (usually with full bandwidth
</I>&gt;<i> &gt;available
</I>&gt;<i> &gt; &gt; &gt;15KB/s) none of the others can make use of the internet because no
</I>&gt;<i> &gt;requests
</I>&gt;<i> &gt; &gt; &gt;for information can be send.
</I>&gt;<i> &gt; &gt; &gt;
</I>&gt;<i> &gt; &gt; &gt;So, i want to limit the maximum individual upload to 5KB/s so this
</I>doesnt
&gt;<i> &gt; &gt; &gt;disturb others useing the internet.
</I>&gt;<i> &gt; &gt; &gt;
</I>&gt;<i> &gt; &gt; &gt;Situation:
</I>&gt;<i> &gt; &gt; &gt;
</I>&gt;<i> &gt; &gt; &gt;Server: 192.168.1.1
</I>&gt;<i> &gt; &gt; &gt;Clients: 192.168.1.2 - 192.168.1.7
</I>&gt;<i> &gt; &gt; &gt;eth0: LAN
</I>&gt;<i> &gt; &gt; &gt;eth1: Cablemodem
</I>&gt;<i> &gt; &gt; &gt;
</I>&gt;<i> &gt; &gt; &gt;Below is what I came up with myself but it doesnt seem to work. Also
</I>when
&gt;<i> &gt;do
</I>&gt;<i> &gt; &gt; &gt;i activate this rules? pre- of post configuring interfaces?
</I>&gt;<i> &gt; &gt; &gt;
</I>&gt;<i> &gt; &gt; &gt;Thnx,
</I>&gt;<i> &gt; &gt; &gt;Wouter Smit
</I>&gt;<i> &gt; &gt; &gt;
</I>&gt;<i> &gt; &gt; &gt;------------------------------------------------
</I>&gt;<i> &gt; &gt; &gt;#!/bin/sh
</I>&gt;<i> &gt; &gt; &gt;
</I>&gt;<i> &gt; &gt; &gt;TC=&quot;/sbin/tc&quot;
</I>&gt;<i> &gt; &gt; &gt;IF=&quot;eth1&quot;
</I>&gt;<i> &gt; &gt; &gt;
</I>&gt;<i> &gt; &gt; &gt;echo Configure queueing discipline
</I>&gt;<i> &gt; &gt; &gt;$TC qdisc add dev $IF root handle 10: cbq bandwidth 120Kbit avpkt
</I>1000
&gt;<i> &gt; &gt; &gt;
</I>&gt;<i> &gt; &gt; &gt;echo Configure root class
</I>&gt;<i> &gt; &gt; &gt;$TC class add dev $IF parent 10:0 classid 10:1 cbq bandwidth 120Kbit
</I>rate
&gt;<i> &gt;\
</I>&gt;<i> &gt; &gt; &gt;  120Kbit allot 1514 weight 12Kbit prio 8 maxburst 20 avpkt 1000
</I>&gt;<i> &gt; &gt; &gt;
</I>&gt;<i> &gt; &gt; &gt;echo Configure class divisions
</I>&gt;<i> &gt; &gt; &gt;$TC class add dev $IF parent 10:1 classid 10:100 cbq bandwidth
</I>120Kbit
&gt;<i> &gt;rate
</I>&gt;<i> &gt; &gt; &gt;\
</I>&gt;<i> &gt; &gt; &gt;   40Kbit allot 1514 weight 4Kbit prio 5 maxburst 20 avpkt 1000
</I>bounded
&gt;<i> &gt; &gt; &gt;
</I>&gt;<i> &gt; &gt; &gt;echo Configure queue management
</I>&gt;<i> &gt; &gt; &gt;$TC qdisc add dev $IF parent 10:100 sfq perturb 15 quantum 1514
</I>&gt;<i> &gt; &gt; &gt;
</I>&gt;<i> &gt; &gt; &gt;echo Configure which packets belong to which class
</I>&gt;<i> &gt; &gt; &gt;$TC filter add dev $IF parent 10:0 protocol ip prio 25 u32 match ip
</I>src \
&gt;<i> &gt; &gt; &gt;   192.168.1.0/24 flowid 10:100
</I>&gt;<i> &gt; &gt;
</I>&gt;<i> &gt; &gt; We have the exact same situation, so here is our configuration script,
</I>&gt;<i> &gt;with
</I>&gt;<i> &gt; &gt; a little tweaking you should be able to implement it. Most important
</I>is
&gt;<i> &gt; &gt; that you MARK the packets that enter the router with ipchains.
</I>&gt;<i> &gt; &gt;
</I>&gt;<i> &gt; &gt; # setup packetforwarding
</I>&gt;<i> &gt; &gt; /sbin/ipchains -P forward DENY
</I>&gt;<i> &gt; &gt; # here we mark the packets with -m
</I>&gt;<i> &gt; &gt; /sbin/ipchains -A forward -s 192.168.0.1/32 -j MASQ -m 0x1
</I>&gt;<i> &gt; &gt; /sbin/ipchains -A forward -s 192.168.0.4/32 -j MASQ -m 0x4
</I>&gt;<i> &gt; &gt; /sbin/ipchains -A forward -s 192.168.0.3/32 -j MASQ -m 0x3
</I>&gt;<i> &gt; &gt; /sbin/ipchains -A forward -s 192.168.0.6/32 -j MASQ -m 0x6
</I>&gt;<i> &gt; &gt; /sbin/ipchains -A forward -s 192.168.0.7/32 -j MASQ -m 0x7
</I>&gt;<i> &gt; &gt; /sbin/ipchains -A forward -s 192.168.0.10/32 -j MASQ -m 0xa
</I>&gt;<i> &gt; &gt; # eliminate spoofing
</I>&gt;<i> &gt; &gt; /sbin/ipchains -A forward -i $extip -s 192.168.0.0/24 -d 0.0.0.0/0 -j
</I>DENY
&gt;<i> &gt; &gt;
</I>&gt;<i> &gt; &gt; #root device for upstream, divided in various subclasses to more or
</I>less
&gt;<i> &gt; &gt; guarantee a fair loadbalancing (see below..)
</I>&gt;<i> &gt; &gt; /usr/bin/tc qdisc add dev eth1 root handle 1: cbq bandwidth 128Kbit
</I>avpkt
&gt;<i> &gt;1000
</I>&gt;<i> &gt; &gt; /usr/bin/tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth
</I>&gt;<i> &gt;128Kbit
</I>&gt;<i> &gt; &gt; rate 128Kbit \
</I>&gt;<i> &gt; &gt; allot 1514 weight 12Kbit prio 8 maxburst 20 avpkt 1000
</I>&gt;<i> &gt; &gt; /usr/bin/tc class add dev eth1 parent 1:1 classid 1:2 cbq bandwidth
</I>&gt;<i> &gt;128Kbit
</I>&gt;<i> &gt; &gt; rate 64Kbit \
</I>&gt;<i> &gt; &gt; allot 1514 weight 6Kbit prio 8 maxburst 20 avpkt 1000
</I>&gt;<i> &gt; &gt; /usr/bin/tc class add dev eth1 parent 1:1 classid 1:3 cbq bandwidth
</I>&gt;<i> &gt;128Kbit
</I>&gt;<i> &gt; &gt; rate 64Kbit \
</I>&gt;<i> &gt; &gt; allot 1514 weight 6Kbit prio 8 maxburst 20 avpkt 1000
</I>&gt;<i> &gt; &gt;
</I>&gt;<i> &gt; &gt; # configure ip 1 here for 40 kbit (to ensure fairnes..) WITH borrowing
</I>&gt;<i> &gt; &gt; /usr/bin/tc class add dev eth1 parent 1:2 classid 1:11 cbq bandwidth
</I>&gt;<i> &gt; &gt; 128Kbit rate 40Kbit \
</I>&gt;<i> &gt; &gt; allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:2
</I>&gt;<i> &gt; &gt; /usr/bin/tc qdisc add dev eth1 parent 1:11 sfq quantum 1514b perturb
</I>15
&gt;<i> &gt; &gt; /usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle
</I>1
&gt;<i> &gt;fw
</I>&gt;<i> &gt; &gt; classid 1:11
</I>&gt;<i> &gt; &gt; #192.168.0.3
</I>&gt;<i> &gt; &gt; /usr/bin/tc class add dev eth1 parent 1:2 classid 1:13 cbq bandwidth
</I>&gt;<i> &gt; &gt; 128Kbit rate 40Kbit \
</I>&gt;<i> &gt; &gt; allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:2
</I>&gt;<i> &gt; &gt; /usr/bin/tc qdisc add dev eth1 parent 1:13 sfq quantum 1514b perturb
</I>15
&gt;<i> &gt; &gt; /usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle
</I>3
&gt;<i> &gt;fw
</I>&gt;<i> &gt; &gt; classid 1:13
</I>&gt;<i> &gt; &gt; #192.168.0.4
</I>&gt;<i> &gt; &gt; /usr/bin/tc class add dev eth1 parent 1:2 classid 1:14 cbq bandwidth
</I>&gt;<i> &gt; &gt; 128Kbit rate 35Kbit \
</I>&gt;<i> &gt; &gt; allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:2
</I>&gt;<i> &gt; &gt; /usr/bin/tc qdisc add dev eth1 parent 1:14 sfq quantum 1514b perturb
</I>15
&gt;<i> &gt; &gt; /usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle
</I>4
&gt;<i> &gt;fw
</I>&gt;<i> &gt; &gt; classid 1:14
</I>&gt;<i> &gt; &gt; #192.168.0.6
</I>&gt;<i> &gt; &gt; /usr/bin/tc class add dev eth1 parent 1:3 classid 1:16 cbq bandwidth
</I>&gt;<i> &gt; &gt; 128Kbit rate 40Kbit \
</I>&gt;<i> &gt; &gt; allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:3
</I>&gt;<i> &gt; &gt; /usr/bin/tc qdisc add dev eth1 parent 1:16 sfq quantum 1514b perturb
</I>15
&gt;<i> &gt; &gt; /usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle
</I>6
&gt;<i> &gt;fw
</I>&gt;<i> &gt; &gt; classid 1:16
</I>&gt;<i> &gt; &gt; #192.168.0.7
</I>&gt;<i> &gt; &gt; /usr/bin/tc class add dev eth1 parent 1:3 classid 1:17 cbq bandwidth
</I>&gt;<i> &gt; &gt; 128Kbit rate 40Kbit \
</I>&gt;<i> &gt; &gt; allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:3
</I>&gt;<i> &gt; &gt; /usr/bin/tc qdisc add dev eth1 parent 1:17 sfq quantum 1514b perturb
</I>15
&gt;<i> &gt; &gt; /usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle
</I>7
&gt;<i> &gt;fw
</I>&gt;<i> &gt; &gt; classid 1:17
</I>&gt;<i> &gt; &gt; #192.168.0.10
</I>&gt;<i> &gt; &gt; /usr/bin/tc class add dev eth1 parent 1:3 classid 1:20 cbq bandwidth
</I>&gt;<i> &gt; &gt; 128Kbit rate 40Kbit \
</I>&gt;<i> &gt; &gt; allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:3
</I>&gt;<i> &gt; &gt; /usr/bin/tc qdisc add dev eth1 parent 1:20 sfq quantum 1514b perturb
</I>15
&gt;<i> &gt; &gt; /usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle
</I>10
&gt;<i> &gt; &gt; fw classid 1:20
</I>&gt;<i> &gt; &gt;
</I>&gt;<i> &gt; &gt; So we now have 1 root class of 128 kbit, two subclasses of 64 kbit,
</I>each
&gt;<i> &gt;of
</I>&gt;<i> &gt; &gt; those subclass serving 3 people.
</I>&gt;<i> &gt; &gt; The 40kbit per person thing was done with one purpose: when 1 person
</I>&gt;<i> &gt;starts
</I>&gt;<i> &gt; &gt; the upload, and another person kicks in, the first person still gets
</I>&gt;<i> &gt; &gt; 128Kbit - 40Kbit and the second one gets that 40 Kbit. This is more
</I>then
&gt;<i> &gt; &gt; one would get when we would simply divide 128Kbit by 6. I don't yet
</I>know
&gt;<i> &gt; &gt; how to get the loadbalancing system to divide the space evenly (1
</I>&gt;<i> &gt; &gt; person\x128 Kbit, 2 persons = 64Kbit, 3CKbit etc..), but haven't come
</I>up
&gt;<i> &gt; &gt; with a solution yet.
</I>&gt;<i> &gt; &gt;
</I>&gt;<i> &gt; &gt; Sander
</I>


</PRE>

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

* [LARTC] traffic shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
                   ` (2 preceding siblings ...)
  2001-01-05 11:42 ` Wouter
@ 2001-01-05 13:56 ` Junus
  2001-01-05 13:56 ` Junus
                   ` (24 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Junus @ 2001-01-05 13:56 UTC (permalink / raw)
  To: lartc

<PRE>To make dynamic balance traffic shaping, maybe we can use WRR quequing.
You can look at: Linux 2.4 Advanced Routing Howto; section 9.6
Or you can go directly to <A HREF="http://wipl-wrr.dkik.dk/wrr">http://wipl-wrr.dkik.dk/wrr</A>

Regards,
Junus Junarto D

Date: Fri, 05 Jan 2001 04:52:54 +0100
&gt;<i> To: &quot;Wouter Smit&quot; &lt;<A HREF="mailto:wouter@smit.dhs.org">wouter@smit.dhs.org</A>&gt;
</I>&gt;<i> From: Sander &lt;<A HREF="mailto:thrill12@gmx.net">thrill12@gmx.net</A>&gt;
</I>&gt;<i> Subject: Re: [LARTC] traffic shaping
</I>&gt;<i> So we now have 1 root class of 128 kbit, two subclasses of 64 kbit, each
</I>of
&gt;<i> those subclass serving 3 people.
</I>&gt;<i> The 40kbit per person thing was done with one purpose: when 1 person
</I>starts
&gt;<i> the upload, and another person kicks in, the first person still gets
</I>&gt;<i> 128Kbit - 40Kbit and the second one gets that 40 Kbit. This is more then
</I>&gt;<i> one would get when we would simply divide 128Kbit by 6. I don't yet know
</I>&gt;<i> how to get the loadbalancing system to divide the space evenly (1
</I>&gt;<i> person\x128 Kbit, 2 persons = 64Kbit, 3CKbit etc..), but haven't come up
</I>&gt;<i> with a solution yet.
</I>

______________________________________________
FREE Personalized Email at Mail.com
Sign up at <A HREF="http://www.mail.com/?sr=signup">http://www.mail.com/?sr=signup</A>


</PRE>

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

* [LARTC] traffic shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
                   ` (3 preceding siblings ...)
  2001-01-05 13:56 ` Junus
@ 2001-01-05 13:56 ` Junus
  2001-01-06  9:25 ` [LARTC] Traffic shaping Bruno
                   ` (23 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Junus @ 2001-01-05 13:56 UTC (permalink / raw)
  To: lartc

<PRE>To make dynamic balance traffic shaping, maybe we can use WRR quequing.
You can look at: Linux 2.4 Advanced Routing Howto; section 9.6
Or you can go directly to <A HREF="http://wipl-wrr.dkik.dk/wrr">http://wipl-wrr.dkik.dk/wrr</A>

Regards,
Junus Junarto D

Date: Fri, 05 Jan 2001 04:52:54 +0100
&gt;<i> To: &quot;Wouter Smit&quot; &lt;<A HREF="mailto:wouter@smit.dhs.org">wouter@smit.dhs.org</A>&gt;
</I>&gt;<i> From: Sander &lt;<A HREF="mailto:thrill12@gmx.net">thrill12@gmx.net</A>&gt;
</I>&gt;<i> Subject: Re: [LARTC] traffic shaping
</I>&gt;<i> So we now have 1 root class of 128 kbit, two subclasses of 64 kbit, each
</I>of
&gt;<i> those subclass serving 3 people.
</I>&gt;<i> The 40kbit per person thing was done with one purpose: when 1 person
</I>starts
&gt;<i> the upload, and another person kicks in, the first person still gets
</I>&gt;<i> 128Kbit - 40Kbit and the second one gets that 40 Kbit. This is more then
</I>&gt;<i> one would get when we would simply divide 128Kbit by 6. I don't yet know
</I>&gt;<i> how to get the loadbalancing system to divide the space evenly (1
</I>&gt;<i> person\x128 Kbit, 2 persons = 64Kbit, 3CKbit etc..), but haven't come up
</I>&gt;<i> with a solution yet.
</I>




</PRE>

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

* [LARTC] Traffic shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
                   ` (4 preceding siblings ...)
  2001-01-05 13:56 ` Junus
@ 2001-01-06  9:25 ` Bruno
  2001-01-07 13:54 ` Junus
                   ` (22 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Bruno @ 2001-01-06  9:25 UTC (permalink / raw)
  To: lartc

<PRE>Hi,
        I'm trying to limit the outgoing traffic. I have a router with two
ethernets and a client that is routered. I can limit the incoming
traffic using u32, but i tried to limit the outgoing but nothing
happened. Then i tried to use ipchains and fw to limit it and again
nothing happened. Here are my configurations:


                        ------------
         Client --- eth1|  Router  |eth0 --- Internet
                        ------------
Router: eth0: 192.168.0.207
        eth1: 10.0.1.1
Client: 10.0.1.2

SCRIPT WITH u32:
tc qdisc add dev eth0 root handle 1:0 cbq bandwidth 256Kbit avpkt 1000
cell 8

tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 256Kbit rate
256Kbit weight 20Kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000

tc class add dev eth0 parent 1:1 classid 1:10 cbq bandwidth 256Kbit rate
64Kbit weight 6Kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 1000
bounded

tc qdisc add dev eth0 parent 1:10 tbf rate 64Kbit buffer 10Kb/8 limit
15Kb mtu 1500

tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src
10.0.5.2 flowid 1:10


SCRIPT WITH fw:
ipchains -A forward -s 10.0.5.0/24 -j MASQ -m 0x1

tc qdisc add dev eth0 root handle 1: cbq bandwidth 128Kbit avpkt 1000

tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 128Kbit rate
128Kbit allot 1514 weight 12Kbit prio 8 maxburst 20 avpkt 1000

tc class add dev eth0 parent 1:1 classid 1:2 cbq bandwidth 128Kbit rate
128Kbit allot 1514 weight 12Kbit prio 8 maxburst 20 avpkt 1000

tc class add dev eth0 parent 1:2 classid 1:11 cbq bandwidth 128Kbit rate
128Kbit allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:2

tc qdisc add dev eth0 parent 1:11 sfq quantum 1514b perturb 15

tc filter add dev eth0 parent 1:0 protocol ip prio 100 handle 1 fw
classid 1:11


So, does anybody know what is happening?

Thanks,
        Bruno



</PRE>

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

* [LARTC] Traffic shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
                   ` (5 preceding siblings ...)
  2001-01-06  9:25 ` [LARTC] Traffic shaping Bruno
@ 2001-01-07 13:54 ` Junus
  2001-12-25 12:15 ` [LARTC] Traffic Shaping Sahil Gupta - NET4U
                   ` (21 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Junus @ 2001-01-07 13:54 UTC (permalink / raw)
  To: lartc

<PRE>Hi Bruno Maciel Fonseca,
I try to solve your problem, if I'm wrong please somebody correct me.
The weakness of ordinary method of QoS in Linux is only working to outgoing
traffic of that interface.
But this limitation overcome by using ingress method.

&gt;<i> Router: eth0: 192.168.0.207
</I>&gt;<i>         eth1: 10.0.1.1
</I>&gt;<i> Client: 10.0.1.2
</I>is the right client 10.0.5.2 ?



There is no problem with your script with u32. But maybe it can be more
efficient that to remove classid 1:1 and change the parent of 1:10 to 1:0
like below:
 SCRIPT WITH u32:
 tc qdisc add dev eth0 root handle 1:0 cbq bandwidth 256Kbit avpkt 1000
 cell 8

 tc class add dev eth0 parent 1:0 classid 1:10 cbq bandwidth 256Kbit rate
 64Kbit weight 6Kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 1000
 bounded

 tc qdisc add dev eth0 parent 1:10 tbf rate 64Kbit buffer 10Kb/8 limit
 15Kb mtu 1500

 tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src
 10.0.5.2 flowid 1:10

Hey, I got another idea if you use only one group of client you can use only
two lines below. This will make your CPU proccessor working a little. Please
let me know if I'm wrong, I never tried it before. But I have ever tried to
limit the bandwidth of interface without tc filter command, that will make
all outgoing traffic of interface eth0 will be limited to 64 Kbit.
SCRIPT WITH u32:
tc qdisc add dev eth0 root handle 1:0 tbf rate 64Kbit buffer 10Kb/8 limit
 15Kb mtu 1500

 tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src
 10.0.5.2 flowid 1:0



Let's look your main problem, you must use eth1 not eth0 to your commands.
You can't use ipchains like that because it only marking the incoming packet
of interface eth1.
And I think it's better to use tbf than sfq for limiting traffic.
The right commands is at below, but you can make more efficient like above.
SCRIPT WITH fw:
ipchains -A forward -s 10.0.5.0/24 -j MASQ

 tc qdisc add dev eth1 root handle 1: cbq bandwidth 128Kbit avpkt 1000

 tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 128Kbit rate
 128Kbit allot 1514 weight 12Kbit prio 8 maxburst 20 avpkt 1000

 tc class add dev eth1 parent 1:1 classid 1:2 cbq bandwidth 128Kbit rate
 128Kbit allot 1514 weight 12Kbit prio 8 maxburst 20 avpkt 1000

 tc class add dev eth1 parent 1:2 classid 1:11 cbq bandwidth 128Kbit rate
 128Kbit allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:2

 tc qdisc add dev eth1 parent 1:11 sfq quantum 1514b perturb 15

tc filter add dev eth1 parent 1:11 protocol ip prio 100 u32 match ip dst
 10.0.5.2 flowid 1:11

Regards,
Junus Junarto D.




</PRE>

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

* [LARTC] Traffic Shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
                   ` (6 preceding siblings ...)
  2001-01-07 13:54 ` Junus
@ 2001-12-25 12:15 ` Sahil Gupta - NET4U
  2001-12-25 12:27 ` bert hubert
                   ` (20 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Sahil Gupta - NET4U @ 2001-12-25 12:15 UTC (permalink / raw)
  To: lartc

Hello everybody,
I own a small ISP in New Zealand and have recently purchased additional
bandwith for telehousing customers.  Currently all of them connect through
to the Cisco Router, what I wanted to do was to have a linux gateway on
the network which could basically run Traffic Shaping etc.  and then
assign the Cisco Router's Ethernet Interface a Local Network I.P. only
telnettable by the Gateway.

Does anybody know what the best way to do this is?  

Regards,

Sahil Gupta
NET4U Limited

------------------------------------
      NET4U -- www.net4u.co.nz      
 Home of the new - $24.95 128k ADSL
Nationwide Internet Service Provider
------------------------------------


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

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

* Re: [LARTC] Traffic Shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
                   ` (7 preceding siblings ...)
  2001-12-25 12:15 ` [LARTC] Traffic Shaping Sahil Gupta - NET4U
@ 2001-12-25 12:27 ` bert hubert
  2001-12-25 12:33 ` Sahil Gupta - NET4U
                   ` (19 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: bert hubert @ 2001-12-25 12:27 UTC (permalink / raw)
  To: lartc

On Wed, Dec 26, 2001 at 01:04:32AM +0000, Sahil Gupta - NET4U wrote:
> Hello everybody,
> I own a small ISP in New Zealand and have recently purchased additional
> bandwith for telehousing customers.  Currently all of them connect through

'telehousing' = 'colocating'?

> to the Cisco Router, what I wanted to do was to have a linux gateway on
> the network which could basically run Traffic Shaping etc.  and then
> assign the Cisco Router's Ethernet Interface a Local Network I.P. only
> telnettable by the Gateway.
> 
> Does anybody know what the best way to do this is?  

You just described it. First configure the Linux box with two network
interfaces. Make a tiny subnet between your cisco and the Linux machine, and
assign both the cisco and the linux machine an ip address in that subnet.
May even be a point-to-point route.

Then assign the 'inner' interface of your linux machine the former address
of your Cisco, so all customers talk to it automatically. 

Make sure you have routing enabled, and have compiled in all funky shaping
things. Now hook it up and do nothing, just let it sit there to see if it
works as it should.

And then the fun begins!

You can also run a 'proxy arp' bridge without any configuration changes on
either the Cisco or the telehousing customers. See the HOWTO for details.
You can also run a real bridge (also see the HOWTO), but currently that
means that you lose the ability to use iptables on your bridge.

That will change soon, however.

Regards,

bert

-- 
http://www.PowerDNS.com          Versatile DNS Software & Services
http://www.tk                              the dot in .tk
Netherlabs BV / Rent-a-Nerd.nl           - Nerd Available -
Linux Advanced Routing & Traffic Control: http://ds9a.nl/lartc

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

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

* Re: [LARTC] Traffic Shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
                   ` (8 preceding siblings ...)
  2001-12-25 12:27 ` bert hubert
@ 2001-12-25 12:33 ` Sahil Gupta - NET4U
  2001-12-25 12:34 ` Sahil Gupta - NET4U
                   ` (18 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Sahil Gupta - NET4U @ 2001-12-25 12:33 UTC (permalink / raw)
  To: lartc

As below with ###.

Regards,

Sahil Gupta
NET4U Limited

------------------------------------
      NET4U -- www.net4u.co.nz      
 Home of the new - $24.95 128k ADSL
Nationwide Internet Service Provider
------------------------------------

On Tue, 25 Dec 2001, bert hubert wrote:

> On Wed, Dec 26, 2001 at 01:04:32AM +0000, Sahil Gupta - NET4U wrote:
> > Hello everybody,
> > I own a small ISP in New Zealand and have recently purchased additional
> > bandwith for telehousing customers.  Currently all of them connect through
> 
> 'telehousing' = 'colocating'?
###YES.
> 
> > to the Cisco Router, what I wanted to do was to have a linux gateway on
> > the network which could basically run Traffic Shaping etc.  and then
> > assign the Cisco Router's Ethernet Interface a Local Network I.P. only
> > telnettable by the Gateway.
> > 
> > Does anybody know what the best way to do this is?  
> 
> You just described it. First configure the Linux box with two network
> interfaces. Make a tiny subnet between your cisco and the Linux machine, and
> assign both the cisco and the linux machine an ip address in that subnet.
> May even be a point-to-point route.
###The Cisco currently has 10.0.0.1.  The Linux Gateway has 2, one
external and 10.0.0.2 and it works beautifully.
> 
> Then assign the 'inner' interface of your linux machine the former address
> of your Cisco, so all customers talk to it automatically. 
What we want to do is to ensure the packets flow through the Linux
Gateway, so we have added 2 NIC's.  I can get it to the stage where the
Linux future Gateway is to access the Net.  But when I assign 10.0.0.2 as
the Gateway it doesn't work.  I don't know what sort of routing needs to
be done on the Linux Gateway.
> 
> Make sure you have routing enabled, and have compiled in all funky shaping
> things. Now hook it up and do nothing, just let it sit there to see if it
> works as it should.
> 
> And then the fun begins!
> 
> You can also run a 'proxy arp' bridge without any configuration changes on
> either the Cisco or the telehousing customers. See the HOWTO for details.
> You can also run a real bridge (also see the HOWTO), but currently that
> means that you lose the ability to use iptables on your bridge.
> 
> That will change soon, however.
> 
> Regards,
> 
> bert
> 
> -- 
> http://www.PowerDNS.com          Versatile DNS Software & Services
> http://www.tk                              the dot in .tk
> Netherlabs BV / Rent-a-Nerd.nl           - Nerd Available -
> Linux Advanced Routing & Traffic Control: http://ds9a.nl/lartc
> 


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

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

* Re: [LARTC] Traffic Shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
                   ` (9 preceding siblings ...)
  2001-12-25 12:33 ` Sahil Gupta - NET4U
@ 2001-12-25 12:34 ` Sahil Gupta - NET4U
  2001-12-25 12:42 ` bert hubert
                   ` (17 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Sahil Gupta - NET4U @ 2001-12-25 12:34 UTC (permalink / raw)
  To: lartc

BTW, which Howto are you referring to?

Regards,

Sahil Gupta
NET4U Limited

------------------------------------
      NET4U -- www.net4u.co.nz      
 Home of the new - $24.95 128k ADSL
Nationwide Internet Service Provider
------------------------------------

On Tue, 25 Dec 2001, bert hubert wrote:

> On Wed, Dec 26, 2001 at 01:04:32AM +0000, Sahil Gupta - NET4U wrote:
> > Hello everybody,
> > I own a small ISP in New Zealand and have recently purchased additional
> > bandwith for telehousing customers.  Currently all of them connect through
> 
> 'telehousing' = 'colocating'?
> 
> > to the Cisco Router, what I wanted to do was to have a linux gateway on
> > the network which could basically run Traffic Shaping etc.  and then
> > assign the Cisco Router's Ethernet Interface a Local Network I.P. only
> > telnettable by the Gateway.
> > 
> > Does anybody know what the best way to do this is?  
> 
> You just described it. First configure the Linux box with two network
> interfaces. Make a tiny subnet between your cisco and the Linux machine, and
> assign both the cisco and the linux machine an ip address in that subnet.
> May even be a point-to-point route.
> 
> Then assign the 'inner' interface of your linux machine the former address
> of your Cisco, so all customers talk to it automatically. 
> 
> Make sure you have routing enabled, and have compiled in all funky shaping
> things. Now hook it up and do nothing, just let it sit there to see if it
> works as it should.
> 
> And then the fun begins!
> 
> You can also run a 'proxy arp' bridge without any configuration changes on
> either the Cisco or the telehousing customers. See the HOWTO for details.
> You can also run a real bridge (also see the HOWTO), but currently that
> means that you lose the ability to use iptables on your bridge.
> 
> That will change soon, however.
> 
> Regards,
> 
> bert
> 
> -- 
> http://www.PowerDNS.com          Versatile DNS Software & Services
> http://www.tk                              the dot in .tk
> Netherlabs BV / Rent-a-Nerd.nl           - Nerd Available -
> Linux Advanced Routing & Traffic Control: http://ds9a.nl/lartc
> 


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

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

* Re: [LARTC] Traffic Shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
                   ` (10 preceding siblings ...)
  2001-12-25 12:34 ` Sahil Gupta - NET4U
@ 2001-12-25 12:42 ` bert hubert
  2002-01-22  4:52 ` [LARTC] traffic shaping Antonis Lazaridis
                   ` (16 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: bert hubert @ 2001-12-25 12:42 UTC (permalink / raw)
  To: lartc

On Wed, Dec 26, 2001 at 01:22:29AM +0000, Sahil Gupta - NET4U wrote:

> What we want to do is to ensure the packets flow through the Linux
> Gateway, so we have added 2 NIC's.  I can get it to the stage where the
> Linux future Gateway is to access the Net.  But when I assign 10.0.0.2 as
> the Gateway it doesn't work.  I don't know what sort of routing needs to
> be done on the Linux Gateway.

You may need to learn more about how routing works. The quick hint is
'tcpdump -e -n' which will show you where packets are destined, and to which
mac address.

If the Cisco is within the same subnet as the Linux machine, and the Linux
machine knows this, it will send out an ICMP Redirect telling your customers
to go to the Cisco directly.

> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

Regarding your other message, I meant this HOWTO ^^^^^^^^^^^^^^^^^^^^^^^^^^

Bert.

-- 
http://www.PowerDNS.com          Versatile DNS Software & Services
http://www.tk                              the dot in .tk
Netherlabs BV / Rent-a-Nerd.nl           - Nerd Available -
Linux Advanced Routing & Traffic Control: http://ds9a.nl/lartc

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

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

* [LARTC] traffic shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
                   ` (11 preceding siblings ...)
  2001-12-25 12:42 ` bert hubert
@ 2002-01-22  4:52 ` Antonis Lazaridis
  2002-01-22  7:44 ` Martin Devera
                   ` (15 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Antonis Lazaridis @ 2002-01-22  4:52 UTC (permalink / raw)
  To: lartc

Hello everybody.

I have a learning-network that consists of a linux file server with samba 
installed and 2 other windows machines.

I have also been able to shape traffic to the 2 machines depending on their 
ip address, by filtering the traffic with tc.

My problem is this:
Let's suppose i want to watch a video file that is located in the linux 
server, using one of the windows machines. The same windows machine might be 
also copying other files from the linux server.

How can i make sure that the video stream will remain fast, even if there 
are several files being copied to the same machine?

How do i seperate these connections? I thought the connections would use 
different ports, but if i run netstat on the windows machine, i only get 1 
connection and 1 open port. I get the same from the linux server.

Thanks in advance.
antonis lazaridis.

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

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

* Re: [LARTC] traffic shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
                   ` (12 preceding siblings ...)
  2002-01-22  4:52 ` [LARTC] traffic shaping Antonis Lazaridis
@ 2002-01-22  7:44 ` Martin Devera
  2002-01-23  8:23 ` Martin Devera
                   ` (14 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Martin Devera @ 2002-01-22  7:44 UTC (permalink / raw)
  To: lartc

depents what video stream are you using. Some uses UDP and
some even non-IP protocol.
Use tcpdump on Linux side if you are not sure.
devik

On Tue, 22 Jan 2002, Antonis Lazaridis wrote:

> Hello everybody.
> 
> I have a learning-network that consists of a linux file server with samba 
> installed and 2 other windows machines.
> 
> I have also been able to shape traffic to the 2 machines depending on their 
> ip address, by filtering the traffic with tc.
> 
> My problem is this:
> Let's suppose i want to watch a video file that is located in the linux 
> server, using one of the windows machines. The same windows machine might be 
> also copying other files from the linux server.
> 
> How can i make sure that the video stream will remain fast, even if there 
> are several files being copied to the same machine?
> 
> How do i seperate these connections? I thought the connections would use 
> different ports, but if i run netstat on the windows machine, i only get 1 
> connection and 1 open port. I get the same from the linux server.
> 
> Thanks in advance.
> antonis lazaridis.
> 
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
> 
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/
> 
> 

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

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

* Re: [LARTC] traffic shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
                   ` (13 preceding siblings ...)
  2002-01-22  7:44 ` Martin Devera
@ 2002-01-23  8:23 ` Martin Devera
  2002-01-23  9:42 ` Antonis Lazaridis
                   ` (13 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Martin Devera @ 2002-01-23  8:23 UTC (permalink / raw)
  To: lartc

Ohh well ;) ... hmm .. you can't do it. You would have to
differentiate at SMB blocks level which is not possible because
their ordering is fixed in/by TCP stream.
Try to use more virtual IPs on the server and run two sambas,
one for video and one for other. But it is probably inconvenient
and could make problems with locking.

devik

On Wed, 23 Jan 2002, Antonis Lazaridis wrote:

> Hi devik.
> 
> I don't use any special streams (i wouldn't know how to do it anyway).
> I just connect to the samba server from a windows machine and then from 
> media player i open the video file (located in the samba server). Then i 
> start copying another file, and the video quality gets bad.
> But the only open ports i see are the samba ports. It seems that both files 
> are being transferred through the same port.
> 
> How can i differentiate these 2 services?

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

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

* Re: [LARTC] traffic shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
                   ` (14 preceding siblings ...)
  2002-01-23  8:23 ` Martin Devera
@ 2002-01-23  9:42 ` Antonis Lazaridis
  2002-01-23  9:51 ` Martin Devera
                   ` (12 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Antonis Lazaridis @ 2002-01-23  9:42 UTC (permalink / raw)
  To: lartc

I see...
Could you give me some starting point on how "video streams?"
Where can i find info on how to implement them?

>From: Martin Devera <devik@cdi.cz>
>Date: Wed, 23 Jan 2002 09:23:39 +0100 (CET)
>
>Ohh well ;) ... hmm .. you can't do it. You would have to
>differentiate at SMB blocks level which is not possible because
>their ordering is fixed in/by TCP stream.
>Try to use more virtual IPs on the server and run two sambas,
>one for video and one for other. But it is probably inconvenient
>and could make problems with locking.
>
>devik
>
>On Wed, 23 Jan 2002, Antonis Lazaridis wrote:
>
> > Hi devik.
> >
> > I don't use any special streams (i wouldn't know how to do it anyway).
> > I just connect to the samba server from a windows machine and then from
> > media player i open the video file (located in the samba server). Then i
> > start copying another file, and the video quality gets bad.
> > But the only open ports i see are the samba ports. It seems that both 
>files
> > are being transferred through the same port.
> >
> > How can i differentiate these 2 services?
>


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

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

* Re: [LARTC] traffic shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
                   ` (15 preceding siblings ...)
  2002-01-23  9:42 ` Antonis Lazaridis
@ 2002-01-23  9:51 ` Martin Devera
  2002-01-25  8:11 ` Antonis Lazaridis
                   ` (11 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Martin Devera @ 2002-01-23  9:51 UTC (permalink / raw)
  To: lartc

Sorry I don't know this area .. Look for some HOWTOs or wait
if someone other responds here ;)
devik

On Wed, 23 Jan 2002, Antonis Lazaridis wrote:

> I see...
> Could you give me some starting point on how "video streams?"
> Where can i find info on how to implement them?
> 

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

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

* Re: [LARTC] traffic shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
                   ` (16 preceding siblings ...)
  2002-01-23  9:51 ` Martin Devera
@ 2002-01-25  8:11 ` Antonis Lazaridis
  2002-01-26 23:00 ` Martin Devera
                   ` (10 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Antonis Lazaridis @ 2002-01-25  8:11 UTC (permalink / raw)
  To: lartc

Hello again,

i have another question.

Is there any way to shape traffic according to file types or directories?
Something like:
access to files in folderA can have 10Mbps,
access to files in forderB can have  5Mbps.

Possible?

Thanks,
antonis.

_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

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

* Re: [LARTC] traffic shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
                   ` (17 preceding siblings ...)
  2002-01-25  8:11 ` Antonis Lazaridis
@ 2002-01-26 23:00 ` Martin Devera
  2002-01-27  1:21 ` Re[2]: " Will Lotto
                   ` (9 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Martin Devera @ 2002-01-26 23:00 UTC (permalink / raw)
  To: lartc

hehe, hey people are you joking or what ?
well it would be possible witch patched samba :)

On Fri, 25 Jan 2002, Antonis Lazaridis wrote:

> Hello again,
> 
> i have another question.
> 
> Is there any way to shape traffic according to file types or directories?
> Something like:
> access to files in folderA can have 10Mbps,
> access to files in forderB can have  5Mbps.
> 
> Possible?
> 
> Thanks,
> antonis.
> 
> _________________________________________________________________
> Join the world’s largest e-mail service with MSN Hotmail. 
> http://www.hotmail.com
> 
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/
> 
> 

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

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

* Re[2]: [LARTC] traffic shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
                   ` (18 preceding siblings ...)
  2002-01-26 23:00 ` Martin Devera
@ 2002-01-27  1:21 ` Will Lotto
  2002-01-27  8:47 ` Stef Coene
                   ` (8 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Will Lotto @ 2002-01-27  1:21 UTC (permalink / raw)
  To: lartc

Using two IP aliases you could...

so folder A is shared on the alias 192.168.0.1 and folder B on
192.168.0.2, then limit the traffic by IP.

Out of the box, I don't believe you'll have much success. There's
(almost) no way of telling which samba traffic is for which file.


> hehe, hey people are you joking or what ?
> well it would be possible witch patched samba :)

> On Fri, 25 Jan 2002, Antonis Lazaridis wrote:

>> Hello again,
>> 
>> i have another question.
>> 
>> Is there any way to shape traffic according to file types or directories?
>> Something like:
>> access to files in folderA can have 10Mbps,
>> access to files in forderB can have  5Mbps.
>> 
>> Possible?
>> 
>> Thanks,
>> antonis.
>> 
>> _________________________________________________________________
>> Join the world’s largest e-mail service with MSN Hotmail. 
>> http://www.hotmail.com
>> 
>> _______________________________________________
>> LARTC mailing list / LARTC@mailman.ds9a.nl
>> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/
>> 
>> 

> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/


---
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -- Benjamin Franklin, 1759

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

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

* Re: [LARTC] traffic shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
                   ` (19 preceding siblings ...)
  2002-01-27  1:21 ` Re[2]: " Will Lotto
@ 2002-01-27  8:47 ` Stef Coene
  2002-02-08  5:17 ` Antonis Lazaridis
                   ` (7 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Stef Coene @ 2002-01-27  8:47 UTC (permalink / raw)
  To: lartc

On Friday 25 January 2002 09:11, Antonis Lazaridis wrote:
> Hello again,
>
> i have another question.
>
> Is there any way to shape traffic according to file types or directories?
> Something like:
> access to files in folderA can have 10Mbps,
> access to files in forderB can have  5Mbps.
>
> Possible?
I think it's possible.  There is a ftp-helper for iptables that can mark all 
ftp-data because it's smart enough to recoginise the ftp-data path.  You can 
do the same : write a helper that can read the data-stream and that can 
recognize for instance the attachements of emails.  Once you can do this, you 
can mark these packets and shape them.

I don't know if this is possible,  I'm not a kernel/iptabes guru, but there 
are other people on this list that can say "Stef, you are stupid" or "hey, I 
will write this for you" ;-)

Anyway, it's not possible with the tools we have right now.

Stef


-- 

stef.coene@docum.org
 More QOS info : http://www.docum.org/
 Title : "Using Linux as bandwidth manager"
     
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

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

* Re: [LARTC] traffic shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
                   ` (20 preceding siblings ...)
  2002-01-27  8:47 ` Stef Coene
@ 2002-02-08  5:17 ` Antonis Lazaridis
  2002-02-08 17:22 ` Riaz Mahmood
                   ` (6 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Antonis Lazaridis @ 2002-02-08  5:17 UTC (permalink / raw)
  To: lartc

> > But it feels like i found a bug or something. The "bug" is:
> > "it's impossible to find on the internet how to start multiple smbs"
>Are you speaking seriously ? It might be samba's "bug" but
>definitely not related to LARTC.
Sure, not related directly to LARCT.
Anyway, "Debugging" finished! :)
Problem solved, with some help from samba list.

If this is not a NeverAskedQuestion and somebody else needs the info:

You have to start the smb deamons with different .conf files, setting 
different parameters for these:
- Interfaces, using "interfaces ="
- IP addresses, using "socket address ="
- log files directories, using "log file ="
- lock directories using "lock directory ="
(*) that was what i was missing that...
(Martin, you were wrong about the pid files, there are smb.pid and nmb.pid 
files for every deamon)
- and offcourse use "bind interfaces only = yes"

Then you can define different directories to share, in the different conf 
files. They will be served from different smb deamons, which can also be 
different hosts or (YES!) different IPs.
It works.

Now i try following:
Let's say i give max 10Mbps bandwidth to the folder where i keep video 
files. Can i change this dynamically?
Like this: if another user tries to access another video file, increase the 
bandwidth for this IP to 20Mbps.

Or if this is not possible, dynamically sharing the 10 Mbps bandwidth, %mbps 
for each user.

Is something like this possible with Linux QoS?
antonis.

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

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

* Re: [LARTC] traffic shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
                   ` (21 preceding siblings ...)
  2002-02-08  5:17 ` Antonis Lazaridis
@ 2002-02-08 17:22 ` Riaz Mahmood
  2006-10-04 20:45 ` Roberto Scattini
                   ` (5 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Riaz Mahmood @ 2002-02-08 17:22 UTC (permalink / raw)
  To: lartc

Dear All,

The DYNAMIC TRAFFIC SHAPPING QUESTION seems very interesting.
Kindly anyone who has tried it earlier - do share it with the community. 
Thanking you in advance.

Riaz Mahmood



>From: "Antonis Lazaridis" <antonis_san@hotmail.com>
>To: devik@cdi.cz
>CC: roberto@meuprovedor.com.br, lartc@mailman.ds9a.nl
>Subject: Re: [LARTC] traffic shaping
>Date: Fri, 08 Feb 2002 07:17:14 +0200
>Now i try following:
>Let's say i give max 10Mbps bandwidth to the folder where i keep video
>files. Can i change this dynamically?
>Like this: if another user tries to access another video file, increase the
>bandwidth for this IP to 20Mbps.
>
>Or if this is not possible, dynamically sharing the 10 Mbps bandwidth, 
>%mbps
>for each user.
>
>Is something like this possible with Linux QoS?
>antonis.
>
>_________________________________________________________________
>Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>_______________________________________________
>LARTC mailing list / LARTC@mailman.ds9a.nl
>http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/




_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

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

* [LARTC] traffic shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
                   ` (22 preceding siblings ...)
  2002-02-08 17:22 ` Riaz Mahmood
@ 2006-10-04 20:45 ` Roberto Scattini
  2007-05-06 20:14 ` [LARTC] Traffic Shaping Rangi Biddle
                   ` (4 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Roberto Scattini @ 2006-10-04 20:45 UTC (permalink / raw)
  To: lartc

hi everyone:

does anybody know a way of shaping dhcp clients bandwidth?
the only way of doing this that i know is using pppoe-server and limit the 
ppp interface, but it seems to be a little problematic protocol for me. im 
looking for a solution that doesnt require too many changes in the client 
too. my search in google led me to a strange white paper from juniper 
networks, introducing a protocol that they call IPoE (IP over Ethernet) that 
is a combination of DHCP and 802.1x. this seems to be something similar to 
what im looking for, but i still didnt have found a way of limiting each 
client bandwidth.

anyone is working with something similar?

thanks in advance

Roberto Scattini

_________________________________________________________________
MSN Amor: busca tu ½ naranja http://latam.msn.com/amor/

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

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

* [LARTC] Traffic Shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
                   ` (23 preceding siblings ...)
  2006-10-04 20:45 ` Roberto Scattini
@ 2007-05-06 20:14 ` Rangi Biddle
  2007-05-07  8:25 ` AW: " Simo
                   ` (3 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Rangi Biddle @ 2007-05-06 20:14 UTC (permalink / raw)
  To: lartc


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

Dear List,

 

I am wanting to perform some traffic shaping as the subject of this email
suggests.

 

What I am wanting to do is this;  I would like to have traffic shaping
performed on the following protocols:  HTTP, RDP, GRE, PPTP, SIP and IAX.
Obviously I would like to have highest priority set for voice packets so
much so that the general http traffic does not impede on the voice packets.
I would like to have ample bandwidth available for RDP so that I am able to
connect to a remote site and not have too much lag but ample enough that
most tasks can be done.  HTTP traffic would possibly have the lowest
priority of all the protocols that I have listed.  So to clarify priority
would be something such as this:

 

1.       IAX

2.       SIP

3.       GRE

4.       PPTP

5.       RDP

6.       HTTP

 

I have a linux gateway that I will use for performing the traffic shaping
and is setup in the following way:

 

                 -------------                         ------------
---------

                |    ADSL     | <----------> |   LINUX  |  <----------> |
LAN   |

                 -------------                         ------------
---------

 

I plan to have the ADSL router forward all traffic to the linux gateway
using something similar to a BIMAP rule where all incoming and outgoing
traffic is made to appear to come from the public IP address.  I welcome any
and all suggestions but would possibly prefer the most elegant of solutions
J

 

Many thanks in advance

 

Rangi 


[-- Attachment #1.2: Type: text/html, Size: 7032 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] 30+ messages in thread

* AW: [LARTC] Traffic Shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
                   ` (24 preceding siblings ...)
  2007-05-06 20:14 ` [LARTC] Traffic Shaping Rangi Biddle
@ 2007-05-07  8:25 ` Simo
  2007-05-07 18:06 ` Rangi Biddle
                   ` (2 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Simo @ 2007-05-07  8:25 UTC (permalink / raw)
  To: lartc


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

 

Hi Rangi,

Bandwidth ist important, but VoIP needs more than this. Voice traffic needs
low latency of packets. That's why traffic shaping maybe not lose your
problem.                

in this a HFCS queuing descipline is used instead of HTB, because this can
separate between bandwidth and delay. For more Information about this can
you find here: http://linux-ip.net/articles/hfsc.en/

 

bye

Simo



 

Von: lartc-bounces@mailman.ds9a.nl [mailto:lartc-bounces@mailman.ds9a.nl] Im
Auftrag von Rangi Biddle
Gesendet: Sonntag, 6. Mai 2007 22:15
An: lartc@mailman.ds9a.nl
Betreff: [LARTC] Traffic Shaping

 

Dear List,

 

I am wanting to perform some traffic shaping as the subject of this email
suggests.

 

What I am wanting to do is this;  I would like to have traffic shaping
performed on the following protocols:  HTTP, RDP, GRE, PPTP, SIP and IAX.
Obviously I would like to have highest priority set for voice packets so
much so that the general http traffic does not impede on the voice packets.
I would like to have ample bandwidth available for RDP so that I am able to
connect to a remote site and not have too much lag but ample enough that
most tasks can be done.  HTTP traffic would possibly have the lowest
priority of all the protocols that I have listed.  So to clarify priority
would be something such as this:

 

1.       IAX

2.       SIP

3.       GRE

4.       PPTP

5.       RDP

6.       HTTP

 

I have a linux gateway that I will use for performing the traffic shaping
and is setup in the following way:

 

                 -------------                         ------------
---------

                |    ADSL     | <----------> |   LINUX  |  <----------> |
LAN   |

                 -------------                         ------------
---------

 

I plan to have the ADSL router forward all traffic to the linux gateway
using something similar to a BIMAP rule where all incoming and outgoing
traffic is made to appear to come from the public IP address.  I welcome any
and all suggestions but would possibly prefer the most elegant of solutions
J

 

Many thanks in advance

 

Rangi 


[-- Attachment #1.2: Type: text/html, Size: 10768 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] 30+ messages in thread

* RE: [LARTC] Traffic Shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
                   ` (25 preceding siblings ...)
  2007-05-07  8:25 ` AW: " Simo
@ 2007-05-07 18:06 ` Rangi Biddle
  2007-05-08  3:16 ` Rangi Biddle
  2007-10-24 18:37 ` [LARTC] Traffic shaping Mohammad Shakir
  28 siblings, 0 replies; 30+ messages in thread
From: Rangi Biddle @ 2007-05-07 18:06 UTC (permalink / raw)
  To: lartc


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

HI Simo,

 

Thanks for the info.  Very interesting read.  I forgot to mention in the
post that I am still relatively new to traffic shaping with Linux but was
still able to more than comprehend the info in that document.  Many thanks
again.

 

One thing that I am slightly uncertain of though is that I would prefer not
to divide the bandwidth between x amount of people but rather designate a
priority that packets take over each other which that info doesn't cover.
Is it still possible using HFSC to accomplish this?

 

Kind regards,

 

Rangi

 

From: Simo [mailto:simo@mix4web.de] 
Sent: Monday, May 07, 2007 8:25 PM
To: 'Rangi Biddle'; lartc@mailman.ds9a.nl
Subject: AW: [LARTC] Traffic Shaping

 

 

Hi Rangi,

Bandwidth ist important, but VoIP needs more than this. Voice traffic needs
low latency of packets. That's why traffic shaping maybe not lose your
problem.                

in this a HFCS queuing descipline is used instead of HTB, because this can
separate between bandwidth and delay. For more Information about this can
you find here: http://linux-ip.net/articles/hfsc.en/

 

bye

Simo

 

Von: lartc-bounces@mailman.ds9a.nl [mailto:lartc-bounces@mailman.ds9a.nl] Im
Auftrag von Rangi Biddle
Gesendet: Sonntag, 6. Mai 2007 22:15
An: lartc@mailman.ds9a.nl
Betreff: [LARTC] Traffic Shaping

 

Dear List,

 

I am wanting to perform some traffic shaping as the subject of this email
suggests.

 

What I am wanting to do is this;  I would like to have traffic shaping
performed on the following protocols:  HTTP, RDP, GRE, PPTP, SIP and IAX.
Obviously I would like to have highest priority set for voice packets so
much so that the general http traffic does not impede on the voice packets.
I would like to have ample bandwidth available for RDP so that I am able to
connect to a remote site and not have too much lag but ample enough that
most tasks can be done.  HTTP traffic would possibly have the lowest
priority of all the protocols that I have listed.  So to clarify priority
would be something such as this:

 

1.       IAX

2.       SIP

3.       GRE

4.       PPTP

5.       RDP

6.       HTTP

 

I have a linux gateway that I will use for performing the traffic shaping
and is setup in the following way:

 

                 -------------                         ------------
---------

                |    ADSL     | <----------> |   LINUX  |  <----------> |
LAN   |

                 -------------                         ------------
---------

 

I plan to have the ADSL router forward all traffic to the linux gateway
using something similar to a BIMAP rule where all incoming and outgoing
traffic is made to appear to come from the public IP address.  I welcome any
and all suggestions but would possibly prefer the most elegant of solutions
J

 

Many thanks in advance

 

Rangi 


[-- Attachment #1.2: Type: text/html, Size: 11943 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] 30+ messages in thread

* RE: [LARTC] Traffic Shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
                   ` (26 preceding siblings ...)
  2007-05-07 18:06 ` Rangi Biddle
@ 2007-05-08  3:16 ` Rangi Biddle
  2007-10-24 18:37 ` [LARTC] Traffic shaping Mohammad Shakir
  28 siblings, 0 replies; 30+ messages in thread
From: Rangi Biddle @ 2007-05-08  3:16 UTC (permalink / raw)
  To: lartc


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

Hi Simo,

 

I’ve just started to take a look into tcng.  Looks promising, but I’m not
sure that  I have the time to spend fully investigating the tool.  Plus I
haven’t had much luck getting tcsim to compile as I am running a 2.6.9
kernel and tcsim is currently targeted at a 2.5.4 kernel.  What would be
very helpful is something complete that I can fiddle with and customize to
my needs.  I don’t believe I mentioned this already but it is for a client
that has only recently been having issues since they have begun using RDP
clients.  They are looking at VOIP at a later stage but I would like to have
something at least in place to prioritize packets.

 

Kind regards,

 

Rangi

 

PS.  I am still rather new to tc in linux.

 

From: Simo [mailto:simo@mix4web.de] 
Sent: Tuesday, May 08, 2007 8:49 AM
To: 'Rangi Biddle'
Subject: AW: [LARTC] Traffic Shaping

 

Hi Rangi,

if i have understoud, what do you mean. I´ll say, you need to use the PRIO
queuing descipline. With this qdisc you can define an amount of Bands
(priority FIFOs) to serve the network packets and you don´t need to devide
the bandwidth. Here a link to an illustration:
http://www.linux-ip.net/articles/Traffic-Control-HOWTO/images/pfifo_fast-qdi
sc.png 

The Problem by this qdisc is, if too many high priority Packets in the qdisc
were enqued, the rest of the traffic in the other low priority bands or
FIFOs will be ignored und will have a high latency…That´s why you can use
the prio qdisc combined with  tbf qdisc. I think that will solve your
problem…

How do you use the linux traffic control system? Do you use the tcng tool?
If so, i can send you a script for your problem, and we can simulate this
with the tcsim component of tcng tool befor use…

 

Sorry for my english, i´m from morocco and i´m studying in germany ;)…

Kind regards

Simo

 

Von: lartc-bounces@mailman.ds9a.nl [mailto:lartc-bounces@mailman.ds9a.nl] Im
Auftrag von Rangi Biddle
Gesendet: Montag, 7. Mai 2007 20:07
An: lartc@mailman.ds9a.nl
Betreff: RE: [LARTC] Traffic Shaping

 

HI Simo,

 

Thanks for the info.  Very interesting read.  I forgot to mention in the
post that I am still relatively new to traffic shaping with Linux but was
still able to more than comprehend the info in that document.  Many thanks
again.

 

One thing that I am slightly uncertain of though is that I would prefer not
to divide the bandwidth between x amount of people but rather designate a
priority that packets take over each other which that info doesn’t cover.
Is it still possible using HFSC to accomplish this?

 

Kind regards,

 

Rangi

 

From: Simo [mailto:simo@mix4web.de] 
Sent: Monday, May 07, 2007 8:25 PM
To: 'Rangi Biddle'; lartc@mailman.ds9a.nl
Subject: AW: [LARTC] Traffic Shaping

 

 

Hi Rangi,

Bandwidth ist important, but VoIP needs more than this. Voice traffic needs
low latency of packets. That’s why traffic shaping maybe not lose your
problem.                

in this a HFCS queuing descipline is used instead of HTB, because this can
separate between bandwidth and delay. For more Information about this can
you find here: http://linux-ip.net/articles/hfsc.en/

 

bye

Simo

 

Von: lartc-bounces@mailman.ds9a.nl [mailto:lartc-bounces@mailman.ds9a.nl] Im
Auftrag von Rangi Biddle
Gesendet: Sonntag, 6. Mai 2007 22:15
An: lartc@mailman.ds9a.nl
Betreff: [LARTC] Traffic Shaping

 

Dear List,

 

I am wanting to perform some traffic shaping as the subject of this email
suggests.

 

What I am wanting to do is this;  I would like to have traffic shaping
performed on the following protocols:  HTTP, RDP, GRE, PPTP, SIP and IAX.
Obviously I would like to have highest priority set for voice packets so
much so that the general http traffic does not impede on the voice packets.
I would like to have ample bandwidth available for RDP so that I am able to
connect to a remote site and not have too much lag but ample enough that
most tasks can be done.  HTTP traffic would possibly have the lowest
priority of all the protocols that I have listed.  So to clarify priority
would be something such as this:

 

1.       IAX

2.       SIP

3.       GRE

4.       PPTP

5.       RDP

6.       HTTP

 

I have a linux gateway that I will use for performing the traffic shaping
and is setup in the following way:

 

                 -------------                         ------------
---------

                |    ADSL     | <----------> |   LINUX  |  <----------> |
LAN   |

                 -------------                         ------------
---------

 

I plan to have the ADSL router forward all traffic to the linux gateway
using something similar to a BIMAP rule where all incoming and outgoing
traffic is made to appear to come from the public IP address.  I welcome any
and all suggestions but would possibly prefer the most elegant of solutions
J

 

Many thanks in advance

 

Rangi 


[-- Attachment #1.2: Type: text/html, Size: 17365 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] 30+ messages in thread

* [LARTC] Traffic shaping
  2001-01-04 12:22 [LARTC] traffic shaping Wouter
                   ` (27 preceding siblings ...)
  2007-05-08  3:16 ` Rangi Biddle
@ 2007-10-24 18:37 ` Mohammad Shakir
  28 siblings, 0 replies; 30+ messages in thread
From: Mohammad Shakir @ 2007-10-24 18:37 UTC (permalink / raw)
  To: lartc

I am using HTB for traffic shaping, my scenario is 
Eth1 is my local interface and I wan to shape bandwidth for IP 172.16.173.245.
Now I want if any request from above IP comes its get 1mb speed and all others get 96kb speed, for this setup I make following script but it does not work. Can anyone help me ?
 
htb script
--------------
tc qdisc del dev eth1 root 2> /dev/null > /dev/null
tc qdisc add dev eth1 root handle 11: htb
tc class add dev eth1 parent 11: classid 11:1 htb rate 10mbit
tc class add dev eth1 parent 11:1 classid 11:21 htb rate 1024kbit ceil 1024kbit prio 5
tc qdisc add dev eth1 parent 11:21 handle 21: sfq perturb 10
tc filter add dev eth1 parent 11: protocol ip prio 100 handle 5000 fw flowid 11:21
tc class add dev eth1 parent 11:1 classid 11:22 htb rate 96kbit ceil 96kbit prio 5
tc qdisc add dev eth1 parent 11:22 handle 22: sfq perturb 10
tc filter add dev eth1 protocol ip parent 11: prio 2 u32 match ip dst 172.16.173.254 flowid 11:22

iptables -t mangle -A PREROUTING -s 172.16.173.245 -p tcp --dport 80 -j MARK --set-mark 5000


htp result
--------------
[root@test ~]# tc -s class show dev eth1

class htb 11:22 parent 11:1 leaf 22: prio 5 rate 96000bit ceil 96000bit burst 1647b cburst 1647b
 Sent 179720 bytes 247 pkt (dropped 0, overlimits 0 requeues 0)
 rate 29728bit 5pps backlog 0b 42p requeues 0
 lended: 205 borrowed: 0 giants: 0
 tokens: -141972 ctokens: -141972

class htb 11:1 root rate 10000Kbit ceil 10000Kbit burst 6600b cburst 6600b
 Sent 129540 bytes 205 pkt (dropped 0, overlimits 0 requeues 0)
 rate 56bit 0pps backlog 0b 0p requeues 0
 lended: 0 borrowed: 0 giants: 0
 tokens: 3953 ctokens: 3953

class htb 11:21 parent 11:1 leaf 21: prio 5 rate 1024Kbit ceil 1024Kbit burst 2112b cburst 2112b
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
 lended: 0 borrowed: 0 giants: 0
 tokens: 16500 ctokens: 16500

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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

end of thread, other threads:[~2007-10-24 18:37 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-04 12:22 [LARTC] traffic shaping Wouter
2001-01-04 18:17 ` Sander
2001-01-05  3:52 ` Sander
2001-01-05 11:42 ` Wouter
2001-01-05 13:56 ` Junus
2001-01-05 13:56 ` Junus
2001-01-06  9:25 ` [LARTC] Traffic shaping Bruno
2001-01-07 13:54 ` Junus
2001-12-25 12:15 ` [LARTC] Traffic Shaping Sahil Gupta - NET4U
2001-12-25 12:27 ` bert hubert
2001-12-25 12:33 ` Sahil Gupta - NET4U
2001-12-25 12:34 ` Sahil Gupta - NET4U
2001-12-25 12:42 ` bert hubert
2002-01-22  4:52 ` [LARTC] traffic shaping Antonis Lazaridis
2002-01-22  7:44 ` Martin Devera
2002-01-23  8:23 ` Martin Devera
2002-01-23  9:42 ` Antonis Lazaridis
2002-01-23  9:51 ` Martin Devera
2002-01-25  8:11 ` Antonis Lazaridis
2002-01-26 23:00 ` Martin Devera
2002-01-27  1:21 ` Re[2]: " Will Lotto
2002-01-27  8:47 ` Stef Coene
2002-02-08  5:17 ` Antonis Lazaridis
2002-02-08 17:22 ` Riaz Mahmood
2006-10-04 20:45 ` Roberto Scattini
2007-05-06 20:14 ` [LARTC] Traffic Shaping Rangi Biddle
2007-05-07  8:25 ` AW: " Simo
2007-05-07 18:06 ` Rangi Biddle
2007-05-08  3:16 ` Rangi Biddle
2007-10-24 18:37 ` [LARTC] Traffic shaping Mohammad Shakir

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.