Re: Re: HTB 3.13 please help

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



//Just to not forget eth0 is WAN and eth1 is LAN . The box is NATing my lan.
I configured tcng to shape both download and upload
and i got connection loss again.
Maybe it is my script fault or it is something bad with packets marking .
this is how i mark outgoing packets
iptables -t mangle -A MYSHAPER-OUT -p tcp -s 192.168.1.23 -j MARK --set-mark
$ip

and this part of my script which is intented to shape upload:
dev eth0 {
    egress {
    class (<$default>) if 1;
    htb ( r2q 1 ) {
    class ( rate 800kbps, ceil 800kbps ) {

//192.168.1.0-----------------------------------------------------------
        $ruter = class ( rate 15kbps, ceil 250kbps  ) { sfq( perturb 10secs,
quantum 1500Bytes ); } ;
  fw {

class $ruter on (23);
//ruter---------------------------------------------------------------------
----


//--------------------- fw
    }//fw
    }//main class
    }//htb
    }//egress
    }//eth0(none):/skrytpy#

and these are a bit of `tc -s -d class show dev eth0` prints while
connection loss after running my tcng script :

class htb 2:f parent 2:1 leaf 10: prio 0 quantum 1875 rate 1875bps ceil
15000bps burst 1617b/8 mpu 0b cburst 1749b/8 mpu 0b level 0
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 706914 ctokens: 95572

class htb 2:1e parent 2:1 leaf 1f: prio 0 quantum 1875 rate 1875bps ceil
15000bps burst 1617b/8 mpu 0b cburst 1749b/8 mpu 0b level 0
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 706914 ctokens: 95572

class htb 2:2d parent 2:1 leaf 2e: prio 0 quantum 1875 rate 1875bps ceil
15000bps burst 1617b/8 mpu 0b cburst 1749b/8 mpu 0b level 0
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 706914 ctokens: 95572


> that is interesting. let me know then. other test might be to
> reboot with maxcpus=1 to mitigate smp related bugs.
>
> On Sat, 25 Jan 2003 mjoachimiak@xxxxxxxxxxxxxx wrote:
>
> > Yes I'm using smp kernel.
> > I thought that i make some error that i canot see so i decided to write
my
> > classes using tcng this time.
> > Currently i'm shaping only outgoing traffic to my local network(using
tcng)
> > and it seems to work (it work one day without errors).
> > Today i'm going to configure upload too.
> > The difference i could see at once is that there is no connection loss
when
> > i'm starting htb.
> > ----- Original Message -----
> > From: "devik" <devik@xxxxxx>
> > To: <mjoachimiak@xxxxxxxxxxxxxx>
> > Cc: "lartc" <lartc@xxxxxxxxxxxxxxx>
> > Sent: Sunday, July 25, 2004 10:26 AM
> > Subject: Re:  Re: HTB 3.13 please help
> >
> >
> > > From the stats is seems that no data are queued - as if nobody
> > > is sending them. You are using smp kernel, is your box SMP ?
> > > I haven't seen many smp+htb boxes thus there might be possibility
> > > of a bug...
> > > devik
> > >
> > > On Thu, 23 Jan 2003 mjoachimiak@xxxxxxxxxxxxxx wrote:
> > >
> > > > I've attached outputs for eth0 and eth1.
> > > > I was trying to get this script running. I've added one class for my
> > NATed
> > > > BOX, and it helped. Shaping was stable almost one day but then i
added
> > "prio
> > > > 0" to eth0 filters and prio 0 for eth1 filters it has braken. So i
> > removed
> > > > every "prio 0" and reboot the box but it didnt helped :(.
> > > > I've noticed that when the traffic is not much (14 hosts from 50 are
up)
> > > > tc/htb works very well.
> > > > If you want new version of my script say a word.
> > > > ----- Original Message -----
> > > > From: "devik" <devik@xxxxxx>
> > > > To: <mjoachimiak@xxxxxxxxxxxxxx>
> > > > Sent: Thursday, July 22, 2004 3:48 PM
> > > > Subject: Re: HTB 3.13 please help
> > > >
> > > >
> > > > > I need
> > > > > tc -s -d class show dev xxx
> > > > > output during that non-working period. 3.6 is older than 3.13.
> > > > >
> > > > > -------------------------------
> > > > >     Martin Devera aka devik
> > > > > Linux kernel QoS/HTB maintainer
> > > > >   http://luxik.cdi.cz/~devik/
> > > > >
> > > > > On Wed, 21 Jul 2004 mjoachimiak@xxxxxxxxxxxxxx wrote:
> > > > >
> > > > > > Thanks for your reply. I've recent put my problem on lartc list.
I'm
> > > > using
> > > > > > htb 3.13 in 2-4-25smp.
> > > > > > I wonder if upgrade to 3.6 will help? Could you be so kind and
take
> > a
> > > > look
> > > > > > at it. I'll be grateful.
> > > > > > If you have no time for me i'll understand and try to resolve it
for
> > > > myself.
> > > > > > Thanks.
> > > > > >
> > > > > > Hello everybody!
> > > > > > Since week i dig lists and www and can't find solution for my
> > problem.
> > > > > > I'm using HTB 3.13 kernel 2-4-25 smp iptables 1.2.9.
> > > > > > I've got situation like this:
> > > > > >
> > > > > > LAN------Linux Box(routing only)------- Linux Box
> > > > > > (HTB)--------------Hardware Router(say:HD)------Internet
> > > > > > When I start HTB it takes about 5 min. to start working and it
> > works...
> > > > > > within this 5min starting i can't ping HD and after about 5min I
> > start
> > > > > > pinging. It works like this for cuple of hours, then something
> > strange
> > > > is
> > > > > > happening. Ping stops, www doesn't work but radio (36kbps) (from
> > > > clients)
> > > > > > works. There is no ping at all for about 1min and it starts
pinging
> > for
> > > > > > about 2-3min and it stops for 1-2min and so on.....
> > > > > > When I stop HTB ping starts. It's look like HTB is filled to
> > much(sorry
> > > > for
> > > > > > my english :/)
> > > > > > All my children classes rate doesn't exceeds root classes. I
have 50
> > > > classes
> > > > > > on 900kbit-10kbit(for default class) - downstream and
800-10kbit(for
> > > > > > default)  up.
> > > > > > I shape bandwidth matching ip. r2q is set to 1 . no erros during
> > doing
> > > > shape
> > > > > > script.
> > > > > > I'm attaching this script
> > > > > > in ip1 is  file where are written ip's for C classes.
> > > > > >
> > > > > > I'm including my script.
> > > > > > ---------------------------------------------------cut
> > > > > >
> > > >
> >
here -----------------------------------------------------------------------
> > > > > > ------------
> > > > > > #!/bin/bash
> > > > > > #x=$[100/20]
> > > > > > #echo "$1" > /skrytpy/status
> > > > > > rxmax=900 #WAN max transfer -down (physically it is
960kbit/960kbit)
> > > > > > kbit=kbit
> > > > > > rxmaxluser=250
> > > > > > txmax=800 #WAN max transfer - up
> > > > > > txmaxluser=100
> > > > > > #counting users
> > > > > > # ip1 file is like this:
> > > > > > # 11 #Somebody
> > > > > > # 23 #Somebody II
> > > > > > #EOF
> > > > > > licznik=0
> > > > > > for   x in $(awk '{ print $1 }' /skrytpy/ip1); do
> > > > > > licznik=$[$licznik+1]
> > > > > > done
> > > > > >
> > > > > >
> > > > > > #Server
> > > > > > licznik=$[$licznik+1]
> > > > > > #plus router
> > > > > > licznik=$[$licznik+1]
> > > > > >
> > > > > > echo number of users to $licznik
> > > > > > #counting rate
> > > > > > rx1=$[$rxmax-10]
> > > > > > tx1=$[$txmax-10] # dla klasy domyslnej
> > > > > > rxmin=$[$rx1/$licznik]
> > > > > > txmin=$[$tx1/$licznik]
> > > > > > echo rx $rxmin tx $txmin
> > > > > > #echo $rxmin
> > > > > > #root classes
> > > > > > #rx
> > > > > > tc qdisc del root dev eth1
> > > > > > tc qdisc add dev eth1 root handle 1:0 htb r2q 1 default 2
> > > > > > tc class add dev eth1 parent 1:0 classid 1:1 htb rate
$rxmax$kbit
> > ceil
> > > > > > $rxmax$kbit
> > > > > > #tx
> > > > > > tc qdisc del root dev eth0
> > > > > > tc qdisc add dev eth0 root handle 2:0 htb r2q 1 default 4
> > > > > > tc class add dev eth0 parent 2:0 classid 2:1 htb rate
$txmax$kbit
> > ceil
> > > > > > $txmax$kbit
> > > > > > #r="$rxmax$kbit"
> > > > > > #default classes
> > > > > > #rx
> > > > > > tc class add dev eth1 parent 1:1 classid 1:2 htb rate 10kbit
ceil
> > 10kbit
> > > > > > #tx
> > > > > > tc class add dev eth0 parent 2:1 classid 2:4 htb rate 10kbit
ceil
> > 10kbit
> > > >
> > > > > > #siec 1.0
> > > > > > siec=1
> > > > > > for ip in $(awk '{ print $1 }' /skrytpy/ip1); do
> > > > > > echo -n "$ip "
> > > > > > #rx
> > > > > > tc class add dev eth1 parent 1:1 classid 1:$ip htb rate
$rxmin$kbit
> > ceil
> > > > > > $rxmaxluser$kbit
> > > > > > tc filter add dev eth1 protocol ip parent 1:0 u32 match ip dst
> > > > > > 192.168.$siec.$ip flowid 1:$ip
> > > > > > tc qdisc add dev eth1 parent 1:$ip handle $ip:0 sfq perturb 10
> > > > > > #tx
> > > > > > #marking packets
> > > > > > iptables -t mangle -A MYSHAPER-OUT -p tcp -s
192.168.$siec.$ip -j
> > > > > > MARK --set-mark $ip
> > > > > > #tc
> > > > > > tc class add dev eth0 parent 2:1 classid 2:$ip htb rate
$txmin$kbit
> > ceil
> > > > > > $txmaxluser$kbit
> > > > > > #filtering by mark
> > > > > > tc filter add dev eth0 protocol ip preference 1 parent 2:0
handle
> > $ip fw
> > > > > > flowid 2:$ip
> > > > > > tc qdisc add dev eth0 parent 2:$ip handle $ip:1 sfq perturb 10
> > > > > > done
> > > > > > echo ""
> > > > > >
> > > > >
> >
> --------------------------------------------------------------------cut
> > > > > >
> > here ------------------------------------------------------------------
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> > > _______________________________________________
> > > LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
> > > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
> >
> > _______________________________________________
> > LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
> > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
> >
> >
>

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

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux