Skip to contentSkip to conversation

Monitoring problem,

LARTC hare ram 2 participants 5 messages Apr 22, 2003 – Apr 24, 2003

lore
Share & tools
lore

hare ram

author
#0 lore raw

Hi all

i have downloaded monitor_tc.pl, and try to monitor my imq0 Device

modprobe imq numdevs=1
tc qdisc add dev imq0 handle 1: root htb default 1 tc class add dev imq0 parent 1: classid 1:1 htb rate 1mbit

tc qdisc add dev imq0 parent 1:1 handle 10: htb default 5

tc class add dev imq0 parent 10: classid 10:1 htb rate 128kbit burst 3k
prio 1
tc class add dev imq0 parent 10: classid 10:2 htb rate 128kbit burst 3k
prio 2
tc class add dev imq0 parent 10: classid 10:5 htb rate 1mbit prio 3 tc qdisc add dev imq0 parent 10:1 handle 21:0 sfq
tc qdisc add dev imq0 parent 10:2 handle 22:0 sfq
tc qdisc add dev imq0 parent 10:5 handle 23:0 sfq
tc filter add dev imq0 protocol ip pref 1 parent 10: handle 1 fw classid
10:1
tc filter add dev imq0 protocol ip pref 2 parent 10: handle 2 fw classid
10:2
iptables -t mangle -A POSTROUTING -j IMQ --todev 0
iptables -t mangle -A POSTROUTING -s $myip -j MARK --set-mark 1 iptables -t mangle -A PREROUTING -j IMQ --todev 0
iptables -t mangle -A PREROUTING -d $myip -j MARK --set-mark 1 ip link set imq0 up

when i upload from my laptop to internet the stats looks like below

Classid tokens ctokens bytes speed
------------------------------------------

10:2      153600   88149   0      0.000 KB
10:5      -611     -611    49698  16.07 KB
1:1       -910     -910    101334 32.76 KB
10:1      -85783   -151234 51636  16.69 KB
10:2      153600   88149   0      0.000 KB
10:5      16138    16138   55538  17.89 KB
1:1       16138    16138   105934 34.14 KB
10:1      -83019   -148470 50396  16.24 KB

when i download from internet to laptop like below

Classid tokens ctokens bytes speed
------------------------------------------

10:2      153600   88149   0      0.000 KB
10:5      17888    17888   960    0.310 KB
1:1       -1309    -1309   51968  16.80 KB
10:1      -85219   -150670 51008  16.49 KB

in upload i have seen the traffic is going to 10:5 also, why this is happening, is anything script wrong

hare

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

author
#1 lore raw

Hi
----- Original Message -----
From: "Stef Coene" <[email protected]>
To: "hare ram" <[email protected]>; <[email protected]>
Sent: Tuesday, April 22, 2003 8:04 PM
Subject: Re: [LARTC] Monitoring problem,

Quoted 5 lines · hare ram
Quoted 3 lines

Hi all

i have downloaded monitor_tc.pl, and try to monitor my imq0 Device

That's from docum.org.

Yes I have downloaded from Docum.org and i have changed from eth0 to imq0

Quoted 9 lines
Quoted 7 lines

modprobe imq numdevs=1
tc qdisc add dev imq0 handle 1: root htb default 1

tc class add dev imq0 parent 1: classid 1:1 htb rate 1mbit

tc qdisc add dev imq0 parent 1:1 handle 10: htb default 5

Adding a htb qdisc to a class is useless and will only add extra delays.

Ok i understand now, let me correct it, since let it be delay the proceedure should work right ?

Quoted 9 lines
Quoted 9 lines

tc class add dev imq0 parent 10: classid 10:1 htb rate 128kbit burst 3k
prio 1
tc class add dev imq0 parent 10: classid 10:2 htb rate 128kbit burst 3k
prio 2
tc class add dev imq0 parent 10: classid 10:5 htb rate 1mbit prio 3 tc qdisc add dev imq0 parent 10:1 handle 21:0 sfq
tc qdisc add dev imq0 parent 10:2 handle 22:0 sfq
tc qdisc add dev imq0 parent 10:5 handle 23:0 sfq
tc filter add dev imq0 protocol ip pref 1 parent 10: handle 1 fw

classid

Quoted 2 lines
Quoted 2 lines

10:1
tc filter add dev imq0 protocol ip pref 2 parent 10: handle 2 fw

classid

Quoted 32 lines
Quoted 32 lines

10:2
iptables -t mangle -A POSTROUTING -j IMQ --todev 0 iptables -t mangle -A POSTROUTING -s $myip -j MARK --set-mark 1 iptables -t mangle -A PREROUTING -j IMQ --todev 0 iptables -t mangle -A PREROUTING -d $myip -j MARK --set-mark 1 ip link set imq0 up

when i upload from my laptop to internet the stats looks like below

Classid tokens ctokens bytes speed
------------------------------------------

10:2      153600   88149   0      0.000 KB
10:5      -611     -611    49698  16.07 KB
1:1       -910     -910    101334 32.76 KB
10:1      -85783   -151234 51636  16.69 KB
10:2      153600   88149   0      0.000 KB
10:5      16138    16138   55538  17.89 KB
1:1       16138    16138   105934 34.14 KB
10:1      -83019   -148470 50396  16.24 KB

when i download from internet to laptop like below

Classid tokens ctokens bytes speed
------------------------------------------

10:2      153600   88149   0      0.000 KB
10:5      17888    17888   960    0.310 KB
1:1       -1309    -1309   51968  16.80 KB
10:1      -85219   -150670 51008  16.49 KB
Quoted 3 lines
Quoted 2 lines

in upload i have seen the traffic is going to 10:5 also, why this is happening, is anything script wrong

If you upload, the packets are entering the box with destination address

the

Quoted 1 line

ip-address of your box. I'm not sure when the packet gets demasqued but

when

Quoted 1 line

this happens AFTER the marking, your packets have not the dst address of

your

Quoted 2 lines

host so they are not marked and they end up in the default class.

See while iam uploading to test FTP Server,
i have table which all the packets which is belong to ftp or any to go to IMQ Device
and while iam downloading also the same
Please correct if iam wrong

Quoted 2 lines

An other question. Is this is a test setup to see if imq is working?

Yes, i want to make this box with IMQ Device to work, so i can take this to live Setup

another Question mine or may be iam confused

i have lot of individual clients, who required up+down=total b/w so for each customer i need to have different IMQ Device or
all can be used with one IMQ Device , and make some classes for each IP to solve the problem

what is the suggestions

Quoted 9 lines

Stef

--

[email protected]
"Using Linux as bandwidth manager"
http://www.docum.org/
#lartc @ irc.oftc.net

Thanks
hare

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#2 lore raw
In reply to hare ram
Quoted 3 lines
Quoted 2 lines
Quoted 1 line

i have downloaded monitor_tc.pl, and try to monitor my imq0 Device

That's from docum.org.

Yes I have downloaded from Docum.org and i have changed from eth0 to imq0

I said that for the other members of the list so they know what monitor_tc.pl is.

Quoted 7 lines
Quoted 5 lines
Quoted 4 lines

modprobe imq numdevs=1
tc qdisc add dev imq0 handle 1: root htb default 1 tc class add dev imq0 parent 1: classid 1:1 htb rate 1mbit tc qdisc add dev imq0 parent 1:1 handle 10: htb default 5

Adding a htb qdisc to a class is useless and will only add extra delays.

Ok i understand now, let me correct it, since let it be delay the proceedure should work right ?

Yes. It works with that extra qdisc.

Quoted 4 lines
Quoted 1 line

If you upload, the packets are entering the box with destination address

the

Quoted 1 line

ip-address of your box. I'm not sure when the packet gets demasqued but

when

Quoted 8 lines
Quoted 1 line

this happens AFTER the marking, your packets have not the dst address of

your

Quoted 1 line

host so they are not marked and they end up in the default class.

See while iam uploading to test FTP Server,
i have table which all the packets which is belong to ftp or any to go to IMQ Device
and while iam downloading also the same
Please correct if iam wrong

Sorry, bot our english is not so good. I have no idea about what you want to say.

Quoted 4 lines

i have lot of individual clients, who required up+down=total b/w so for each customer i need to have different IMQ Device or
all can be used with one IMQ Device , and make some classes for each IP to solve the problem

You can create 1 imq device and give each client a class. So each client has his traffic in his own class.

Stef

Signature · 8 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
author
#3 lore raw
In reply to hare ram

Hi

thanks, for the quick reply

I have made configuration like
each block like x.x.x.0/24 should get 128kbps
another Block y.y.y.0/24 should get 256kbps

when when i mark them and divert to IMQ Device

iam not able to achive this, iam able to control only uploads

but downloads iam able to see maximum ceil of b/w

would mind give me small example where i can control both sides

and another question is, i have created the rules more than 2 class But iam not able to see more than 2 class, when i do monitor_tc.pl

thanks
hare
----- Original Message -----
From: "Stef Coene" <[email protected]>
To: "hare ram" <[email protected]>
Cc: <[email protected]>
Sent: Thursday, April 24, 2003 1:36 AM
Subject: Re: [LARTC] Monitoring problem,

Quoted 3 lines
Quoted 3 lines
Quoted 2 lines
Quoted 1 line

i have downloaded monitor_tc.pl, and try to monitor my imq0 Device

That's from docum.org.

Yes I have downloaded from Docum.org and i have changed from eth0 to

imq0

Quoted 1 line

I said that for the other members of the list so they know what

monitor_tc.pl

Quoted 7 lines

is.

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

modprobe imq numdevs=1
tc qdisc add dev imq0 handle 1: root htb default 1 tc class add dev imq0 parent 1: classid 1:1 htb rate 1mbit tc qdisc add dev imq0 parent 1:1 handle 10: htb default 5

Adding a htb qdisc to a class is useless and will only add extra

delays.

Quoted 5 lines
Quoted 2 lines

Ok i understand now, let me correct it, since let it be delay the proceedure should work right ?

Yes. It works with that extra qdisc.

Quoted 1 line
Quoted 1 line

If you upload, the packets are entering the box with destination

address

Quoted 2 lines
Quoted 2 lines

the

Quoted 1 line

ip-address of your box. I'm not sure when the packet gets demasqued

but

Quoted 2 lines
Quoted 2 lines

when

Quoted 1 line

this happens AFTER the marking, your packets have not the dst address

of

Quoted 4 lines
Quoted 4 lines

your

Quoted 1 line

host so they are not marked and they end up in the default class.

See while iam uploading to test FTP Server,
i have table which all the packets which is belong to ftp or any to go

to

Quoted 4 lines
Quoted 3 lines

IMQ Device
and while iam downloading also the same
Please correct if iam wrong

Sorry, bot our english is not so good. I have no idea about what you want

to

Quoted 5 lines

say.

Quoted 3 lines

i have lot of individual clients, who required up+down=total b/w so for each customer i need to have different IMQ Device or all can be used with one IMQ Device , and make some classes for each IP

to

Quoted 2 lines
Quoted 1 line

solve the problem

You can create 1 imq device and give each client a class. So each client

has

Quoted 6 lines

his traffic in his own class.

Stef

--

Quoted 9 lines

[email protected]
"Using Linux as bandwidth manager"
http://www.docum.org/
#lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#4 lore raw
In reply to hare ram
Quoted 8 lines · hare ram

Hi

thanks, for the quick reply

I have made configuration like
each block like x.x.x.0/24 should get 128kbps
another Block y.y.y.0/24 should get 256kbps

Quoted 7 lines

when when i mark them and divert to IMQ Device

iam not able to achive this, iam able to control only uploads

but downloads iam able to see maximum ceil of b/w

would mind give me small example where i can control both sides

No, because I don't have one.

Quoted 2 lines

and another question is, i have created the rules more than 2 class But iam not able to see more than 2 class, when i do monitor_tc.pl

monitor_tc.pl uses the output of
tc -s -d class show dev eth0
It works fine for me. What do you see when you execute that command? Do you see all classes? Maybe my script can't handle the fact that you add a htb qdisc to a htb class.

Stef

Signature · 8 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/