Skip to contentSkip to conversation

HTB? (NEWBIE)

LARTC Simone84bo 4 participants 4 messages Jan 19, 2007 – Jan 22, 2007

lore
Share & tools
lore

Simone84bo

author
#0 lore raw

Hi to all
I am studying HTB on LARTC how to. I realize a simple configuration on router:
tc qdisc add dev eth0 root handle 1: htb default 30
tc class add dev eth0 parent 1: classid 1:1 htb rate 3mbit burst 15k tc class add dev eth0 parent 1:1 classid 1:10 htb rate 2mbit burst 15k tc class add dev eth0 parent 1:1 classid 1:20 htb rate 1mbit burst 15k tc qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10
tc qdisc add dev eth0 parent 1:20 handle 20: sfq perturb 10
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 80 0xffff flowid 1:10

After this configuration I make a ssh connection between client and server. How the guide say I expect to see on router (with command tc -s qdisc ls dev eth0) that unclassified traffic, like ssh, get rounded to 20: but it doesn't happen. The count of ssh traffic packet result only on root qdisc. Why? A second question if i want to limited rate of all my router which configuration can i realize?

Thanks
--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f

Sponsor:
Problemi di Liquidità? Con Logos Finanziaria 30.000 € in 24 ore a
dipendenti e lavoratori autonomi con rimborsi fino a 120 mesi, clicca qui

Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid)11&d 070120

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#1 lore raw

You should propably try:
tc qdisc add dev eth0 root handle 1: htb default 20 and not 30 cause your default class is 20 no?

Quoted 35 lines · On 1/20/07, Simone84bo <[email protected]> wrote:

Hi to all
I am studying HTB on LARTC how to. I realize a simple configuration on router:
tc qdisc add dev eth0 root handle 1: htb default 30
tc class add dev eth0 parent 1: classid 1:1 htb rate 3mbit burst 15k tc class add dev eth0 parent 1:1 classid 1:10 htb rate 2mbit burst 15k tc class add dev eth0 parent 1:1 classid 1:20 htb rate 1mbit burst 15k tc qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10
tc qdisc add dev eth0 parent 1:20 handle 20: sfq perturb 10
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 80 0xffff flowid 1:10

After this configuration I make a ssh connection between client and server. How the guide say I expect to see on router (with command tc -s qdisc ls dev eth0) that unclassified traffic, like ssh, get rounded to 20: but it doesn't happen. The count of ssh traffic packet result only on root qdisc. Why? A second question if i want to limited rate of all my router which configuration can i realize?

Thanks
--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f

Sponsor:
Problemi di Liquidità? Con Logos Finanziaria 30.000 € in 24 ore a
dipendenti e lavoratori autonomi con rimborsi fino a 120 mesi, clicca qui

Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid)11&d 070120

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

Signature · 13 lines
Jordi Segués Daina
-------------------------------------------------------
Andorra GSM: (+376) 35 35 68
France GSM: (+33) (0)6 81 88 35 55
E-m@il / MSN: [email protected]
AIM: superjordix
Skype: callto://superjordix
-------------------------------------------------------
http://www.JordiX.com
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
#2 lore raw
In reply to Simone84bo
Quoted 13 lines · On Jan 20, 2007, at 12:05 AM, Simone84bo wrote:

Hi to all
I am studying HTB on LARTC how to. I realize a simple configuration on router:
tc qdisc add dev eth0 root handle 1: htb default 30
tc class add dev eth0 parent 1: classid 1:1 htb rate 3mbit burst 15k tc class add dev eth0 parent 1:1 classid 1:10 htb rate 2mbit burst 15k tc class add dev eth0 parent 1:1 classid 1:20 htb rate 1mbit burst 15k tc qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10 tc qdisc add dev eth0 parent 1:20 handle 20: sfq perturb 10 tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 80
0xffff flowid 1:10

Quoted 10 lines

After this configuration I make a ssh connection between client and server.
How the guide say I expect to see on router (with command tc -s qdisc ls dev
eth0) that unclassified traffic, like ssh, get rounded to 20: but it doesn't
happen. The count of ssh traffic packet result only on root qdisc. Why?
A second question if i want to limited rate of all my router which configuration can i realize?

You'd see that if you used filter on port 22 instead of 80. 'Cause 22 is the port of ssh. And your default class is wrong. It should be 1,10 or 20. 10 or 20 preferably.
regards

Signature · 10 lines
Bartek Krawczyk
JID: [email protected]
GG: 2094683



_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
#3 lore raw
In reply to Simone84bo

How the guide say I expect to see on router (with command tc -s qdisc ls dev eth0) that unclassified traffic, like ssh, get rounded to 20: but it doesn't happen.

- Traffic just doesn't get rounded to a class. If you want traffic going to a class you need to specify a filter. Did you by chance man the default class 1:30. Any traffic not classified should end up there.

- Packet shaping is only done on the Egress/root side of an interface. That is why you will only see stats for that. You won't see stats for the ingress side. Does this answer any of your questions?

Jon Flechsenhaar
Boeing WNW Team
Network Services
(714)-762-1231
202-E7

-----Original Message-----
From: Simone84bo [mailto:[email protected]]
Sent: Friday, January 19, 2007 3:05 PM
To: [email protected]
Subject: [LARTC] HTB? (NEWBIE)

Hi to all
I am studying HTB on LARTC how to. I realize a simple configuration on
router:
tc qdisc add dev eth0 root handle 1: htb default 30 tc class add dev eth0 parent 1: classid 1:1 htb rate 3mbit burst 15k tc class add dev eth0 parent 1:1 classid 1:10 htb rate 2mbit burst 15k tc class add dev eth0 parent 1:1 classid 1:20 htb rate 1mbit burst 15k tc qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10 tc qdisc add dev eth0 parent 1:20 handle 20: sfq perturb 10 tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 80 0xffff flowid 1:10

After this configuration I make a ssh connection between client and server.
How the guide say I expect to see on router (with command tc -s qdisc ls dev
eth0) that unclassified traffic, like ssh, get rounded to 20: but it doesn't happen. The count of ssh traffic packet result only on root qdisc. Why? A second question if i want to limited rate of all my router which configuration can i realize?

Thanks
--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f

Sponsor:
Problemi di Liquidità? Con Logos Finanziaria 30.000 € in 24 ore a dipendenti e lavoratori autonomi con rimborsi fino a 120 mesi, clicca qui

Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2911&d=20070120

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc