* [LARTC] traffic shaping
@ 2001-01-04 12:22 Wouter
2001-01-04 18:17 ` Sander
` (28 more replies)
0 siblings, 29 replies; 37+ 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="/sbin/tc"
IF="eth1"
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] 37+ 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; 37+ 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:
><i>Hello,
</I>><i>
</I>><i>I'm trying to limit all outgoing traffic by means of TC. With six students
</I>><i>we are connected through the server (Debian 2.2 kernel 2.2.18) with a
</I>><i>cablemodem. When one person uploads (usually with full bandwidth available
</I>><i>15KB/s) none of the others can make use of the internet because no requests
</I>><i>for information can be send.
</I>><i>
</I>><i>So, i want to limit the maximum individual upload to 5KB/s so this doesnt
</I>><i>disturb others useing the internet.
</I>><i>
</I>><i>Situation:
</I>><i>
</I>><i>Server: 192.168.1.1
</I>><i>Clients: 192.168.1.2 - 192.168.1.7
</I>><i>eth0: LAN
</I>><i>eth1: Cablemodem
</I>><i>
</I>><i>Below is what I came up with myself but it doesnt seem to work. Also when do
</I>><i>i activate this rules? pre- of post configuring interfaces?
</I>><i>
</I>><i>Thnx,
</I>><i>Wouter Smit
</I>><i>
</I>><i>------------------------------------------------
</I>><i>#!/bin/sh
</I>><i>
</I>><i>TC="/sbin/tc"
</I>><i>IF="eth1"
</I>><i>
</I>><i>echo Configure queueing discipline
</I>><i>$TC qdisc add dev $IF root handle 10: cbq bandwidth 120Kbit avpkt 1000
</I>><i>
</I>><i>echo Configure root class
</I>><i>$TC class add dev $IF parent 10:0 classid 10:1 cbq bandwidth 120Kbit rate \
</I>><i> 120Kbit allot 1514 weight 12Kbit prio 8 maxburst 20 avpkt 1000
</I>><i>
</I>><i>echo Configure class divisions
</I>><i>$TC class add dev $IF parent 10:1 classid 10:100 cbq bandwidth 120Kbit rate
</I>><i>\
</I>><i> 40Kbit allot 1514 weight 4Kbit prio 5 maxburst 20 avpkt 1000 bounded
</I>><i>
</I>><i>echo Configure queue management
</I>><i>$TC qdisc add dev $IF parent 10:100 sfq perturb 15 quantum 1514
</I>><i>
</I>><i>echo Configure which packets belong to which class
</I>><i>$TC filter add dev $IF parent 10:0 protocol ip prio 25 u32 match ip src \
</I>><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] 37+ 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; 37+ 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:
><i>Is eth1 your lan of inet interface?
</I>><i>
</I>><i>Thnx,
</I>><i>Wouter
</I>><i>
</I>><i>----- Original Message -----
</I>><i>From: "Sander" <<A HREF="mailto:thrill12@gmx.net">thrill12@gmx.net</A>>
</I>><i>To: "Wouter Smit" <<A HREF="mailto:wouter@smit.dhs.org">wouter@smit.dhs.org</A>>
</I>><i>Cc: <<A HREF="mailto:lartc@mailman.ds9a.nl">lartc@mailman.ds9a.nl</A>>
</I>><i>Sent: Thursday, January 04, 2001 7:17 PM
</I>><i>Subject: Re: [LARTC] traffic shaping
</I>><i>
</I>><i>
</I>><i> > At 13:22 4-1-01 +0100, you wrote:
</I>><i> > >Hello,
</I>><i> > >
</I>><i> > >I'm trying to limit all outgoing traffic by means of TC. With six
</I>><i>students
</I>><i> > >we are connected through the server (Debian 2.2 kernel 2.2.18) with a
</I>><i> > >cablemodem. When one person uploads (usually with full bandwidth
</I>><i>available
</I>><i> > >15KB/s) none of the others can make use of the internet because no
</I>><i>requests
</I>><i> > >for information can be send.
</I>><i> > >
</I>><i> > >So, i want to limit the maximum individual upload to 5KB/s so this doesnt
</I>><i> > >disturb others useing the internet.
</I>><i> > >
</I>><i> > >Situation:
</I>><i> > >
</I>><i> > >Server: 192.168.1.1
</I>><i> > >Clients: 192.168.1.2 - 192.168.1.7
</I>><i> > >eth0: LAN
</I>><i> > >eth1: Cablemodem
</I>><i> > >
</I>><i> > >Below is what I came up with myself but it doesnt seem to work. Also when
</I>><i>do
</I>><i> > >i activate this rules? pre- of post configuring interfaces?
</I>><i> > >
</I>><i> > >Thnx,
</I>><i> > >Wouter Smit
</I>><i> > >
</I>><i> > >------------------------------------------------
</I>><i> > >#!/bin/sh
</I>><i> > >
</I>><i> > >TC="/sbin/tc"
</I>><i> > >IF="eth1"
</I>><i> > >
</I>><i> > >echo Configure queueing discipline
</I>><i> > >$TC qdisc add dev $IF root handle 10: cbq bandwidth 120Kbit avpkt 1000
</I>><i> > >
</I>><i> > >echo Configure root class
</I>><i> > >$TC class add dev $IF parent 10:0 classid 10:1 cbq bandwidth 120Kbit rate
</I>><i>\
</I>><i> > > 120Kbit allot 1514 weight 12Kbit prio 8 maxburst 20 avpkt 1000
</I>><i> > >
</I>><i> > >echo Configure class divisions
</I>><i> > >$TC class add dev $IF parent 10:1 classid 10:100 cbq bandwidth 120Kbit
</I>><i>rate
</I>><i> > >\
</I>><i> > > 40Kbit allot 1514 weight 4Kbit prio 5 maxburst 20 avpkt 1000 bounded
</I>><i> > >
</I>><i> > >echo Configure queue management
</I>><i> > >$TC qdisc add dev $IF parent 10:100 sfq perturb 15 quantum 1514
</I>><i> > >
</I>><i> > >echo Configure which packets belong to which class
</I>><i> > >$TC filter add dev $IF parent 10:0 protocol ip prio 25 u32 match ip src \
</I>><i> > > 192.168.1.0/24 flowid 10:100
</I>><i> >
</I>><i> > We have the exact same situation, so here is our configuration script,
</I>><i>with
</I>><i> > a little tweaking you should be able to implement it. Most important is
</I>><i> > that you MARK the packets that enter the router with ipchains.
</I>><i> >
</I>><i> > # setup packetforwarding
</I>><i> > /sbin/ipchains -P forward DENY
</I>><i> > # here we mark the packets with -m
</I>><i> > /sbin/ipchains -A forward -s 192.168.0.1/32 -j MASQ -m 0x1
</I>><i> > /sbin/ipchains -A forward -s 192.168.0.4/32 -j MASQ -m 0x4
</I>><i> > /sbin/ipchains -A forward -s 192.168.0.3/32 -j MASQ -m 0x3
</I>><i> > /sbin/ipchains -A forward -s 192.168.0.6/32 -j MASQ -m 0x6
</I>><i> > /sbin/ipchains -A forward -s 192.168.0.7/32 -j MASQ -m 0x7
</I>><i> > /sbin/ipchains -A forward -s 192.168.0.10/32 -j MASQ -m 0xa
</I>><i> > # eliminate spoofing
</I>><i> > /sbin/ipchains -A forward -i $extip -s 192.168.0.0/24 -d 0.0.0.0/0 -j DENY
</I>><i> >
</I>><i> > #root device for upstream, divided in various subclasses to more or less
</I>><i> > guarantee a fair loadbalancing (see below..)
</I>><i> > /usr/bin/tc qdisc add dev eth1 root handle 1: cbq bandwidth 128Kbit avpkt
</I>><i>1000
</I>><i> > /usr/bin/tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth
</I>><i>128Kbit
</I>><i> > rate 128Kbit \
</I>><i> > allot 1514 weight 12Kbit prio 8 maxburst 20 avpkt 1000
</I>><i> > /usr/bin/tc class add dev eth1 parent 1:1 classid 1:2 cbq bandwidth
</I>><i>128Kbit
</I>><i> > rate 64Kbit \
</I>><i> > allot 1514 weight 6Kbit prio 8 maxburst 20 avpkt 1000
</I>><i> > /usr/bin/tc class add dev eth1 parent 1:1 classid 1:3 cbq bandwidth
</I>><i>128Kbit
</I>><i> > rate 64Kbit \
</I>><i> > allot 1514 weight 6Kbit prio 8 maxburst 20 avpkt 1000
</I>><i> >
</I>><i> > # configure ip 1 here for 40 kbit (to ensure fairnes..) WITH borrowing
</I>><i> > /usr/bin/tc class add dev eth1 parent 1:2 classid 1:11 cbq bandwidth
</I>><i> > 128Kbit rate 40Kbit \
</I>><i> > allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:2
</I>><i> > /usr/bin/tc qdisc add dev eth1 parent 1:11 sfq quantum 1514b perturb 15
</I>><i> > /usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle 1
</I>><i>fw
</I>><i> > classid 1:11
</I>><i> > #192.168.0.3
</I>><i> > /usr/bin/tc class add dev eth1 parent 1:2 classid 1:13 cbq bandwidth
</I>><i> > 128Kbit rate 40Kbit \
</I>><i> > allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:2
</I>><i> > /usr/bin/tc qdisc add dev eth1 parent 1:13 sfq quantum 1514b perturb 15
</I>><i> > /usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle 3
</I>><i>fw
</I>><i> > classid 1:13
</I>><i> > #192.168.0.4
</I>><i> > /usr/bin/tc class add dev eth1 parent 1:2 classid 1:14 cbq bandwidth
</I>><i> > 128Kbit rate 35Kbit \
</I>><i> > allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:2
</I>><i> > /usr/bin/tc qdisc add dev eth1 parent 1:14 sfq quantum 1514b perturb 15
</I>><i> > /usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle 4
</I>><i>fw
</I>><i> > classid 1:14
</I>><i> > #192.168.0.6
</I>><i> > /usr/bin/tc class add dev eth1 parent 1:3 classid 1:16 cbq bandwidth
</I>><i> > 128Kbit rate 40Kbit \
</I>><i> > allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:3
</I>><i> > /usr/bin/tc qdisc add dev eth1 parent 1:16 sfq quantum 1514b perturb 15
</I>><i> > /usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle 6
</I>><i>fw
</I>><i> > classid 1:16
</I>><i> > #192.168.0.7
</I>><i> > /usr/bin/tc class add dev eth1 parent 1:3 classid 1:17 cbq bandwidth
</I>><i> > 128Kbit rate 40Kbit \
</I>><i> > allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:3
</I>><i> > /usr/bin/tc qdisc add dev eth1 parent 1:17 sfq quantum 1514b perturb 15
</I>><i> > /usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle 7
</I>><i>fw
</I>><i> > classid 1:17
</I>><i> > #192.168.0.10
</I>><i> > /usr/bin/tc class add dev eth1 parent 1:3 classid 1:20 cbq bandwidth
</I>><i> > 128Kbit rate 40Kbit \
</I>><i> > allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:3
</I>><i> > /usr/bin/tc qdisc add dev eth1 parent 1:20 sfq quantum 1514b perturb 15
</I>><i> > /usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle 10
</I>><i> > fw classid 1:20
</I>><i> >
</I>><i> > So we now have 1 root class of 128 kbit, two subclasses of 64 kbit, each
</I>><i>of
</I>><i> > those subclass serving 3 people.
</I>><i> > The 40kbit per person thing was done with one purpose: when 1 person
</I>><i>starts
</I>><i> > the upload, and another person kicks in, the first person still gets
</I>><i> > 128Kbit - 40Kbit and the second one gets that 40 Kbit. This is more then
</I>><i> > one would get when we would simply divide 128Kbit by 6. I don't yet know
</I>><i> > how to get the loadbalancing system to divide the space evenly (1
</I>><i> > person\x128 Kbit, 2 persons = 64Kbit, 3CKbit etc..), but haven't come up
</I>><i> > with a solution yet.
</I>><i> >
</I>><i> > Sander
</I>
</PRE>
^ permalink raw reply [flat|nested] 37+ 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; 37+ 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="2 3 4 5 6 7"
## 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: "Sander" <<A HREF="mailto:thrill12@gmx.net">thrill12@gmx.net</A>>
To: "Wouter Smit" <<A HREF="mailto:wouter@smit.dhs.org">wouter@smit.dhs.org</A>>
Cc: <<A HREF="mailto:lartc@mailman.ds9a.nl">lartc@mailman.ds9a.nl</A>>
Sent: Friday, January 05, 2001 4:52 AM
Subject: Re: [LARTC] traffic shaping
><i> That is my internet-interface ;) It is quite simple:
</I>><i>
</I>><i> -the packets enter eth0
</I>><i> -then they are marked by ipchains
</I>><i> -then they enter eth1 and thus the 128kbit class I made
</I>><i> -and then they are balanced
</I>><i>
</I>><i> Sander
</I>><i>
</I>><i> At 21:27 4-1-01 +0100, you wrote:
</I>><i> >Is eth1 your lan of inet interface?
</I>><i> >
</I>><i> >Thnx,
</I>><i> >Wouter
</I>><i> >
</I>><i> >----- Original Message -----
</I>><i> >From: "Sander" <<A HREF="mailto:thrill12@gmx.net">thrill12@gmx.net</A>>
</I>><i> >To: "Wouter Smit" <<A HREF="mailto:wouter@smit.dhs.org">wouter@smit.dhs.org</A>>
</I>><i> >Cc: <<A HREF="mailto:lartc@mailman.ds9a.nl">lartc@mailman.ds9a.nl</A>>
</I>><i> >Sent: Thursday, January 04, 2001 7:17 PM
</I>><i> >Subject: Re: [LARTC] traffic shaping
</I>><i> >
</I>><i> >
</I>><i> > > At 13:22 4-1-01 +0100, you wrote:
</I>><i> > > >Hello,
</I>><i> > > >
</I>><i> > > >I'm trying to limit all outgoing traffic by means of TC. With six
</I>><i> >students
</I>><i> > > >we are connected through the server (Debian 2.2 kernel 2.2.18) with a
</I>><i> > > >cablemodem. When one person uploads (usually with full bandwidth
</I>><i> >available
</I>><i> > > >15KB/s) none of the others can make use of the internet because no
</I>><i> >requests
</I>><i> > > >for information can be send.
</I>><i> > > >
</I>><i> > > >So, i want to limit the maximum individual upload to 5KB/s so this
</I>doesnt
><i> > > >disturb others useing the internet.
</I>><i> > > >
</I>><i> > > >Situation:
</I>><i> > > >
</I>><i> > > >Server: 192.168.1.1
</I>><i> > > >Clients: 192.168.1.2 - 192.168.1.7
</I>><i> > > >eth0: LAN
</I>><i> > > >eth1: Cablemodem
</I>><i> > > >
</I>><i> > > >Below is what I came up with myself but it doesnt seem to work. Also
</I>when
><i> >do
</I>><i> > > >i activate this rules? pre- of post configuring interfaces?
</I>><i> > > >
</I>><i> > > >Thnx,
</I>><i> > > >Wouter Smit
</I>><i> > > >
</I>><i> > > >------------------------------------------------
</I>><i> > > >#!/bin/sh
</I>><i> > > >
</I>><i> > > >TC="/sbin/tc"
</I>><i> > > >IF="eth1"
</I>><i> > > >
</I>><i> > > >echo Configure queueing discipline
</I>><i> > > >$TC qdisc add dev $IF root handle 10: cbq bandwidth 120Kbit avpkt
</I>1000
><i> > > >
</I>><i> > > >echo Configure root class
</I>><i> > > >$TC class add dev $IF parent 10:0 classid 10:1 cbq bandwidth 120Kbit
</I>rate
><i> >\
</I>><i> > > > 120Kbit allot 1514 weight 12Kbit prio 8 maxburst 20 avpkt 1000
</I>><i> > > >
</I>><i> > > >echo Configure class divisions
</I>><i> > > >$TC class add dev $IF parent 10:1 classid 10:100 cbq bandwidth
</I>120Kbit
><i> >rate
</I>><i> > > >\
</I>><i> > > > 40Kbit allot 1514 weight 4Kbit prio 5 maxburst 20 avpkt 1000
</I>bounded
><i> > > >
</I>><i> > > >echo Configure queue management
</I>><i> > > >$TC qdisc add dev $IF parent 10:100 sfq perturb 15 quantum 1514
</I>><i> > > >
</I>><i> > > >echo Configure which packets belong to which class
</I>><i> > > >$TC filter add dev $IF parent 10:0 protocol ip prio 25 u32 match ip
</I>src \
><i> > > > 192.168.1.0/24 flowid 10:100
</I>><i> > >
</I>><i> > > We have the exact same situation, so here is our configuration script,
</I>><i> >with
</I>><i> > > a little tweaking you should be able to implement it. Most important
</I>is
><i> > > that you MARK the packets that enter the router with ipchains.
</I>><i> > >
</I>><i> > > # setup packetforwarding
</I>><i> > > /sbin/ipchains -P forward DENY
</I>><i> > > # here we mark the packets with -m
</I>><i> > > /sbin/ipchains -A forward -s 192.168.0.1/32 -j MASQ -m 0x1
</I>><i> > > /sbin/ipchains -A forward -s 192.168.0.4/32 -j MASQ -m 0x4
</I>><i> > > /sbin/ipchains -A forward -s 192.168.0.3/32 -j MASQ -m 0x3
</I>><i> > > /sbin/ipchains -A forward -s 192.168.0.6/32 -j MASQ -m 0x6
</I>><i> > > /sbin/ipchains -A forward -s 192.168.0.7/32 -j MASQ -m 0x7
</I>><i> > > /sbin/ipchains -A forward -s 192.168.0.10/32 -j MASQ -m 0xa
</I>><i> > > # eliminate spoofing
</I>><i> > > /sbin/ipchains -A forward -i $extip -s 192.168.0.0/24 -d 0.0.0.0/0 -j
</I>DENY
><i> > >
</I>><i> > > #root device for upstream, divided in various subclasses to more or
</I>less
><i> > > guarantee a fair loadbalancing (see below..)
</I>><i> > > /usr/bin/tc qdisc add dev eth1 root handle 1: cbq bandwidth 128Kbit
</I>avpkt
><i> >1000
</I>><i> > > /usr/bin/tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth
</I>><i> >128Kbit
</I>><i> > > rate 128Kbit \
</I>><i> > > allot 1514 weight 12Kbit prio 8 maxburst 20 avpkt 1000
</I>><i> > > /usr/bin/tc class add dev eth1 parent 1:1 classid 1:2 cbq bandwidth
</I>><i> >128Kbit
</I>><i> > > rate 64Kbit \
</I>><i> > > allot 1514 weight 6Kbit prio 8 maxburst 20 avpkt 1000
</I>><i> > > /usr/bin/tc class add dev eth1 parent 1:1 classid 1:3 cbq bandwidth
</I>><i> >128Kbit
</I>><i> > > rate 64Kbit \
</I>><i> > > allot 1514 weight 6Kbit prio 8 maxburst 20 avpkt 1000
</I>><i> > >
</I>><i> > > # configure ip 1 here for 40 kbit (to ensure fairnes..) WITH borrowing
</I>><i> > > /usr/bin/tc class add dev eth1 parent 1:2 classid 1:11 cbq bandwidth
</I>><i> > > 128Kbit rate 40Kbit \
</I>><i> > > allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:2
</I>><i> > > /usr/bin/tc qdisc add dev eth1 parent 1:11 sfq quantum 1514b perturb
</I>15
><i> > > /usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle
</I>1
><i> >fw
</I>><i> > > classid 1:11
</I>><i> > > #192.168.0.3
</I>><i> > > /usr/bin/tc class add dev eth1 parent 1:2 classid 1:13 cbq bandwidth
</I>><i> > > 128Kbit rate 40Kbit \
</I>><i> > > allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:2
</I>><i> > > /usr/bin/tc qdisc add dev eth1 parent 1:13 sfq quantum 1514b perturb
</I>15
><i> > > /usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle
</I>3
><i> >fw
</I>><i> > > classid 1:13
</I>><i> > > #192.168.0.4
</I>><i> > > /usr/bin/tc class add dev eth1 parent 1:2 classid 1:14 cbq bandwidth
</I>><i> > > 128Kbit rate 35Kbit \
</I>><i> > > allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:2
</I>><i> > > /usr/bin/tc qdisc add dev eth1 parent 1:14 sfq quantum 1514b perturb
</I>15
><i> > > /usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle
</I>4
><i> >fw
</I>><i> > > classid 1:14
</I>><i> > > #192.168.0.6
</I>><i> > > /usr/bin/tc class add dev eth1 parent 1:3 classid 1:16 cbq bandwidth
</I>><i> > > 128Kbit rate 40Kbit \
</I>><i> > > allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:3
</I>><i> > > /usr/bin/tc qdisc add dev eth1 parent 1:16 sfq quantum 1514b perturb
</I>15
><i> > > /usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle
</I>6
><i> >fw
</I>><i> > > classid 1:16
</I>><i> > > #192.168.0.7
</I>><i> > > /usr/bin/tc class add dev eth1 parent 1:3 classid 1:17 cbq bandwidth
</I>><i> > > 128Kbit rate 40Kbit \
</I>><i> > > allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:3
</I>><i> > > /usr/bin/tc qdisc add dev eth1 parent 1:17 sfq quantum 1514b perturb
</I>15
><i> > > /usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle
</I>7
><i> >fw
</I>><i> > > classid 1:17
</I>><i> > > #192.168.0.10
</I>><i> > > /usr/bin/tc class add dev eth1 parent 1:3 classid 1:20 cbq bandwidth
</I>><i> > > 128Kbit rate 40Kbit \
</I>><i> > > allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:3
</I>><i> > > /usr/bin/tc qdisc add dev eth1 parent 1:20 sfq quantum 1514b perturb
</I>15
><i> > > /usr/bin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 handle
</I>10
><i> > > fw classid 1:20
</I>><i> > >
</I>><i> > > So we now have 1 root class of 128 kbit, two subclasses of 64 kbit,
</I>each
><i> >of
</I>><i> > > those subclass serving 3 people.
</I>><i> > > The 40kbit per person thing was done with one purpose: when 1 person
</I>><i> >starts
</I>><i> > > the upload, and another person kicks in, the first person still gets
</I>><i> > > 128Kbit - 40Kbit and the second one gets that 40 Kbit. This is more
</I>then
><i> > > one would get when we would simply divide 128Kbit by 6. I don't yet
</I>know
><i> > > how to get the loadbalancing system to divide the space evenly (1
</I>><i> > > person\x128 Kbit, 2 persons = 64Kbit, 3CKbit etc..), but haven't come
</I>up
><i> > > with a solution yet.
</I>><i> > >
</I>><i> > > Sander
</I>
</PRE>
^ permalink raw reply [flat|nested] 37+ 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; 37+ 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
><i> To: "Wouter Smit" <<A HREF="mailto:wouter@smit.dhs.org">wouter@smit.dhs.org</A>>
</I>><i> From: Sander <<A HREF="mailto:thrill12@gmx.net">thrill12@gmx.net</A>>
</I>><i> Subject: Re: [LARTC] traffic shaping
</I>><i> So we now have 1 root class of 128 kbit, two subclasses of 64 kbit, each
</I>of
><i> those subclass serving 3 people.
</I>><i> The 40kbit per person thing was done with one purpose: when 1 person
</I>starts
><i> the upload, and another person kicks in, the first person still gets
</I>><i> 128Kbit - 40Kbit and the second one gets that 40 Kbit. This is more then
</I>><i> one would get when we would simply divide 128Kbit by 6. I don't yet know
</I>><i> how to get the loadbalancing system to divide the space evenly (1
</I>><i> person\x128 Kbit, 2 persons = 64Kbit, 3CKbit etc..), but haven't come up
</I>><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] 37+ 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; 37+ 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
><i> To: "Wouter Smit" <<A HREF="mailto:wouter@smit.dhs.org">wouter@smit.dhs.org</A>>
</I>><i> From: Sander <<A HREF="mailto:thrill12@gmx.net">thrill12@gmx.net</A>>
</I>><i> Subject: Re: [LARTC] traffic shaping
</I>><i> So we now have 1 root class of 128 kbit, two subclasses of 64 kbit, each
</I>of
><i> those subclass serving 3 people.
</I>><i> The 40kbit per person thing was done with one purpose: when 1 person
</I>starts
><i> the upload, and another person kicks in, the first person still gets
</I>><i> 128Kbit - 40Kbit and the second one gets that 40 Kbit. This is more then
</I>><i> one would get when we would simply divide 128Kbit by 6. I don't yet know
</I>><i> how to get the loadbalancing system to divide the space evenly (1
</I>><i> person\x128 Kbit, 2 persons = 64Kbit, 3CKbit etc..), but haven't come up
</I>><i> with a solution yet.
</I>
</PRE>
^ permalink raw reply [flat|nested] 37+ 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; 37+ 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] 37+ 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; 37+ 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.
><i> Router: eth0: 192.168.0.207
</I>><i> eth1: 10.0.1.1
</I>><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] 37+ 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; 37+ 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] 37+ 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; 37+ 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] 37+ 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; 37+ 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] 37+ 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; 37+ 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] 37+ 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; 37+ 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] 37+ 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; 37+ 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] 37+ 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; 37+ 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] 37+ 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; 37+ 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] 37+ 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; 37+ 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] 37+ 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; 37+ 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] 37+ 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; 37+ 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] 37+ 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; 37+ 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] 37+ 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; 37+ 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] 37+ 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; 37+ 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] 37+ messages in thread
* Re: Re[2]: [LARTC] traffic shaping
@ 2002-01-31 8:25 Antonis Lazaridis
2002-01-31 8:44 ` Martin Devera
` (5 more replies)
0 siblings, 6 replies; 37+ messages in thread
From: Antonis Lazaridis @ 2002-01-31 8:25 UTC (permalink / raw)
To: lartc
Hi...
>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.
You made it sound very simple, so i thought i can do it.
But my beginner-ness didn't allow me...
I have set the different IP aliases, but i don't know how i can share
folders on different aliases.
I suppose this has to be done in smb.conf, right?
I have read all of the smb.conf man, but couldn't find anything.
How can i share different folders on different aliases?
Thanks,
antonis.
PS: My smb.conf file:
[global]
netbios name = smbSrv
workgroup = myGroup
security = user
encrypt passwords = yes
[public]
path = /tmp
read only = no
[video]
path = /d/video
read only = no
guest ok = true
[d_drive]
path = /d
read only = no
guest ok = true
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.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] 37+ messages in thread
* Re: Re[2]: [LARTC] traffic shaping
2002-01-31 8:25 Re[2]: [LARTC] traffic shaping Antonis Lazaridis
@ 2002-01-31 8:44 ` Martin Devera
2002-01-31 9:07 ` Stef Coene
` (4 subsequent siblings)
5 siblings, 0 replies; 37+ messages in thread
From: Martin Devera @ 2002-01-31 8:44 UTC (permalink / raw)
To: lartc
I have not reply to this question just general thought. The
probably best would be to hack samba to add new per folder
option "TOS". Samba then would use SO_PRIORITY to dynamicaly
mark TCP's packets with changing priority - it can be then
utilized properly by qos module.
Just idea ...
devik
On Thu, 31 Jan 2002, Antonis Lazaridis wrote:
> Hi...
>
> >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.
>
> You made it sound very simple, so i thought i can do it.
> But my beginner-ness didn't allow me...
> I have set the different IP aliases, but i don't know how i can share
> folders on different aliases.
>
> I suppose this has to be done in smb.conf, right?
> I have read all of the smb.conf man, but couldn't find anything.
>
> How can i share different folders on different aliases?
> Thanks,
> antonis.
>
> PS: My smb.conf file:
>
> [global]
> netbios name = smbSrv
> workgroup = myGroup
> security = user
> encrypt passwords = yes
>
> [public]
> path = /tmp
> read only = no
>
> [video]
> path = /d/video
> read only = no
> guest ok = true
>
> [d_drive]
> path = /d
> read only = no
> guest ok = true
>
>
>
> _________________________________________________________________
> Chat with friends online, try MSN Messenger: http://messenger.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] 37+ messages in thread
* Re: Re[2]: [LARTC] traffic shaping
2002-01-31 8:25 Re[2]: [LARTC] traffic shaping Antonis Lazaridis
2002-01-31 8:44 ` Martin Devera
@ 2002-01-31 9:07 ` Stef Coene
2002-02-01 1:45 ` Antonis Lazaridis
` (3 subsequent siblings)
5 siblings, 0 replies; 37+ messages in thread
From: Stef Coene @ 2002-01-31 9:07 UTC (permalink / raw)
To: lartc
On Thursday 31 January 2002 09:25, Antonis Lazaridis wrote:
> Hi...
>
> >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.
>
> You made it sound very simple, so i thought i can do it.
> But my beginner-ness didn't allow me...
> I have set the different IP aliases, but i don't know how i can share
> folders on different aliases.
>
> I suppose this has to be done in smb.conf, right?
> I have read all of the smb.conf man, but couldn't find anything.
From the smb.conf man ;-)
(http://samba.nip.nl/samba/docs/man/smb.conf.5.html#SOCKETADDRESS)
-----------------------------
socket address (G)
This option allows you to control what address Samba will listen for
connections on. This is used to support multiple virtual interfaces on the
one server, each with a different configuration.
By default Samba will accept connections on any address.
Example: socket address = 192.168.2.20
-----------------------------
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] 37+ messages in thread
* Re: Re[2]: [LARTC] traffic shaping
2002-01-31 8:25 Re[2]: [LARTC] traffic shaping Antonis Lazaridis
2002-01-31 8:44 ` Martin Devera
2002-01-31 9:07 ` Stef Coene
@ 2002-02-01 1:45 ` Antonis Lazaridis
2002-02-01 9:16 ` Martin Devera
` (2 subsequent siblings)
5 siblings, 0 replies; 37+ messages in thread
From: Antonis Lazaridis @ 2002-02-01 1:45 UTC (permalink / raw)
To: lartc
Sorry Stef,
but i don't understand...
'socket address' is a global parameter, right?
If i use
socket address = 192.1.1.2
then samba shares everything on 192.1.1.2
How can i use it for shareing different folders on different IPs?
antonis.
>From: Stef Coene <stef.coene@docum.org>
>To: "Antonis Lazaridis" <antonis_san@hotmail.com>, lotto@impulse.net.au,
> lartc@mailman.ds9a.nl
>Subject: Re: Re[2]: [LARTC] traffic shaping
>Date: Thu, 31 Jan 2002 10:07:53 +0100
>
>On Thursday 31 January 2002 09:25, Antonis Lazaridis wrote:
> > Hi...
> >
> > >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.
> >
> > You made it sound very simple, so i thought i can do it.
> > But my beginner-ness didn't allow me...
> > I have set the different IP aliases, but i don't know how i can share
> > folders on different aliases.
> >
> > I suppose this has to be done in smb.conf, right?
> > I have read all of the smb.conf man, but couldn't find anything.
From the smb.conf man ;-)
>(http://samba.nip.nl/samba/docs/man/smb.conf.5.html#SOCKETADDRESS)
>
>-----------------------------
>socket address (G)
>
>
>This option allows you to control what address Samba will listen for
>connections on. This is used to support multiple virtual interfaces on the
>one server, each with a different configuration.
>
>By default Samba will accept connections on any address.
>
>Example: socket address = 192.168.2.20
>-----------------------------
>
>Stef
>
>--
>
>stef.coene@docum.org
> More QOS info : http://www.docum.org/
> Title : "Using Linux as bandwidth manager"
>
>
_________________________________________________________________
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] 37+ messages in thread
* Re: Re[2]: [LARTC] traffic shaping
2002-01-31 8:25 Re[2]: [LARTC] traffic shaping Antonis Lazaridis
` (2 preceding siblings ...)
2002-02-01 1:45 ` Antonis Lazaridis
@ 2002-02-01 9:16 ` Martin Devera
2002-02-01 9:57 ` Antonis Lazaridis
2002-02-01 10:05 ` Martin Devera
5 siblings, 0 replies; 37+ messages in thread
From: Martin Devera @ 2002-02-01 9:16 UTC (permalink / raw)
To: lartc
> 'socket address' is a global parameter, right?
>
> If i use
> socket address = 192.1.1.2
>
> then samba shares everything on 192.1.1.2
>
> How can i use it for shareing different folders on different IPs?
probably run more smbd on the server each with different
config file.
devik
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: Re[2]: [LARTC] traffic shaping
2002-01-31 8:25 Re[2]: [LARTC] traffic shaping Antonis Lazaridis
` (3 preceding siblings ...)
2002-02-01 9:16 ` Martin Devera
@ 2002-02-01 9:57 ` Antonis Lazaridis
2002-02-01 10:05 ` Martin Devera
5 siblings, 0 replies; 37+ messages in thread
From: Antonis Lazaridis @ 2002-02-01 9:57 UTC (permalink / raw)
To: lartc
>probably run more smbd on the server each with different
>config file.
>devik
Yes,
I tried this too, but there is a "lock" on smbd.pid.
I am have been searching the internet for 1 full day, to find out how i can
run multiple smbd deamons, but didn't find anything!
Is there nothing on this, or don't i know where to search?
antonis.
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: Re[2]: [LARTC] traffic shaping
2002-01-31 8:25 Re[2]: [LARTC] traffic shaping Antonis Lazaridis
` (4 preceding siblings ...)
2002-02-01 9:57 ` Antonis Lazaridis
@ 2002-02-01 10:05 ` Martin Devera
5 siblings, 0 replies; 37+ messages in thread
From: Martin Devera @ 2002-02-01 10:05 UTC (permalink / raw)
To: lartc
> >probably run more smbd on the server each with different
> >config file.
> >devik
> Yes,
> I tried this too, but there is a "lock" on smbd.pid.
Is not there some option to select another lock file ? Ask
ok samba list they are pretty responsible.
devik
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/
^ permalink raw reply [flat|nested] 37+ 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; 37+ 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] 37+ 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; 37+ 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] 37+ 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; 37+ 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] 37+ 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; 37+ 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] 37+ 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; 37+ 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] 37+ 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; 37+ 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] 37+ 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; 37+ 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,
Ive just started to take a look into tcng. Looks promising, but Im not
sure that I have the time to spend fully investigating the tool. Plus I
havent 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 dont 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 doesnt 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. Thats 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] 37+ 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; 37+ 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] 37+ messages in thread
end of thread, other threads:[~2007-10-24 18:37 UTC | newest]
Thread overview: 37+ 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
-- strict thread matches above, loose matches on Subject: below --
2002-01-31 8:25 Re[2]: [LARTC] traffic shaping Antonis Lazaridis
2002-01-31 8:44 ` Martin Devera
2002-01-31 9:07 ` Stef Coene
2002-02-01 1:45 ` Antonis Lazaridis
2002-02-01 9:16 ` Martin Devera
2002-02-01 9:57 ` Antonis Lazaridis
2002-02-01 10:05 ` Martin Devera
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.