Skip to contentSkip to conversation

tc download always to "default" [solved]

DISCUSSION Mihamina Rakotomandimby 1 participant 1 message Mar 23, 2010 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#2 lore raw
In reply to a message not in the archive
Quoted 9 lines

Bruno Wolff III <[email protected]> :

Quoted 4 lines

My problem is all the traffic is caught by "classid 1:10", the default class.
Nothing is trapped by "classid 1:301" -> "classid 1:426" At a first glance, would you see something wrong in these?

I took a quick look and didn't see anything obvious. But I haven't played with this stuff for a while and my scripts were set up a bit differently.
How are you checking that everything is ending up in the default class?

1°) As I wrote my rules, each IP address has one handler.
I use this script to display UP and DOWN traffic for the handler in $1:

#!/bin/sh

INIF=eth1
OUTIF=ifb0

  RATEIN=$(tc -s -d class show dev $INIF \
    | egrep -A 5 "class htb 1:$1 " \
    | egrep "rate .+ backlog" \
    | awk '{print $2}')
  
  RATEOUT=$(tc -s -d class show dev $OUTIF \
    | egrep -A 5 "class htb 1:$1 " \
    | egrep "rate .+ backlog" \
    | awk '{print $2}')

echo $RATEIN
echo $RATEOUT

I launch it like this:

# get-bw.sh $NNN
Where $NNN is the handler.

When I launch it, I see "0bit" for IN traffic, that means nothing is trapped.
When I launch it with the handler of the default, I see much traffic.

2°) When varying the "default" allocated bandwidth, I see in my charts it is the one seen.

Quoted 4 lines

I remember there is a command that tells you how much stuff is ending up getting handled by the different qdiscs. Is that what you are doing or are you just assuming that's what's happening because traffic isn't being limited the way you expect?

Anyway, I solved my problem:
The LAN interface is "eth1" but there is a tunnel "tun0" coupled to it (I use coova chilli access point).
Just to test, I switched to "tun0" and it suddenly worked.

In all the rules I gave, just replacing "eth1" with "tun0" made it! (What a dumb I am...)

Thanks for everything.

Signature · 3 lines
       Architecte Informatique chez Blueline/Gulfsat:
    Administration Systeme, Recherche & Developpement
                +261 34 29 155 34 / +261 33 11 207 36