* [LARTC] tc not working
@ 2001-10-06 17:31 oarmas
2001-10-08 15:27 ` bert hubert
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: oarmas @ 2001-10-06 17:31 UTC (permalink / raw)
To: lartc
I have a computer with RH 7.1 and want to control bandwith to a set of
networks.
This is the configuration:
Internet
|
eth0: 200.39.191.182
eth1: 200.39.178.129
|
client network (200.39.178.128/26)
I use the next script:
--------------------begin-----------------------
tc qdisc add dev eth0 root handle 10: cbq bandwidth 10Mbit avpkt 1000
tc class add dev eth0 parent 10:0 classid 10:1 cbq bandwidth 10Mbit rate \
10Mbit allot 1514 weight 1Mbit prio 8 maxburst 20 avpkt 1000
tc class add dev eth0 parent 10:1 classid 10:64 cbq bandwidth 10Mbit rate
\
64Kbit allot 1514 weight 6Kbit prio 5 maxburst 20 avpkt 1000 bounded
tc class add dev eth0 parent 10:1 classid 10:128 cbq bandwidth 10Mbit rate
\
128Kbit allot 1514 weight 12Kbit prio 5 maxburst 20 avpkt 1000 bounded
tc class add dev eth0 parent 10:1 classid 10:256 cbq bandwidth 10Mbit rate
\
256Kbit allot 1514 weight 25Kbit prio 5 maxburst 20 avpkt 1000 bounded
tc class add dev eth0 parent 10:1 classid 10:512 cbq bandwidth 10Mbit rate
\
512Kbit allot 1514 weight 51Kbit prio 5 maxburst 20 avpkt 1000 bounded
tc class add dev eth0 parent 10:1 classid 10:1024 cbq bandwidth 10Mbit
rate \
1024Kbit allot 1514 weight 102Kbit prio 5 maxburst 20 avpkt 1000 bounded
tc qdisc add dev eth0 parent 10:64 sfq quantum 1514b perturb 15
tc qdisc add dev eth0 parent 10:128 sfq quantum 1514b perturb 15
tc qdisc add dev eth0 parent 10:256 sfq quantum 1514b perturb 15
tc qdisc add dev eth0 parent 10:512 sfq quantum 1514b perturb 15
tc qdisc add dev eth0 parent 10:1024 sfq quantum 1514b perturb 15
tc filter add dev eth0 parent 10:0 protocol ip prio 100 u32 match ip dst
200.39.178.128/26 flowid 10:256
-------------------------end----------------------------
It shoud limit this network to 256, but it does not.
When I test it, it shows no bandwidth limit, since I get rates higher
than the allowed from the client side(32kB/s should be maximum).
Example:
ncftp / > put redhat-6.2-i386.iso
redhat-6.2-i386.iso: 0.59/ 2.10 MB 83.03 kB/s
For both, outgoing and incoming trafic.
Any idea of what can be wrong?
--
Omar
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LARTC] tc not working
2001-10-06 17:31 [LARTC] tc not working oarmas
@ 2001-10-08 15:27 ` bert hubert
2001-10-08 17:24 ` Omar Armas Aleman
2001-10-12 6:51 ` Stef Coene
2 siblings, 0 replies; 4+ messages in thread
From: bert hubert @ 2001-10-08 15:27 UTC (permalink / raw)
To: lartc
On Sat, Oct 06, 2001 at 11:31:59AM -0600, oarmas@mpsnet.net.mx wrote:
>
> I have a computer with RH 7.1 and want to control bandwith to a set of
> networks.
>
> This is the configuration:
>
> Internet
> |
> eth0: 200.39.191.182
> eth1: 200.39.178.129
> |
> client network (200.39.178.128/26)
>
>
> I use the next script:
>
> --------------------begin-----------------------
>
> tc qdisc add dev eth0 root handle 10: cbq bandwidth 10Mbit avpkt 1000
> tc class add dev eth0 parent 10:0 classid 10:1 cbq bandwidth 10Mbit rate \
> 10Mbit allot 1514 weight 1Mbit prio 8 maxburst 20 avpkt 1000
> tc class add dev eth0 parent 10:1 classid 10:64 cbq bandwidth 10Mbit rate
> \
> 64Kbit allot 1514 weight 6Kbit prio 5 maxburst 20 avpkt 1000 bounded
> tc class add dev eth0 parent 10:1 classid 10:128 cbq bandwidth 10Mbit rate
> \
> 128Kbit allot 1514 weight 12Kbit prio 5 maxburst 20 avpkt 1000 bounded
> tc class add dev eth0 parent 10:1 classid 10:256 cbq bandwidth 10Mbit rate
> \
> 256Kbit allot 1514 weight 25Kbit prio 5 maxburst 20 avpkt 1000 bounded
> tc class add dev eth0 parent 10:1 classid 10:512 cbq bandwidth 10Mbit rate
> \
> 512Kbit allot 1514 weight 51Kbit prio 5 maxburst 20 avpkt 1000 bounded
> tc class add dev eth0 parent 10:1 classid 10:1024 cbq bandwidth 10Mbit
> rate \
> 1024Kbit allot 1514 weight 102Kbit prio 5 maxburst 20 avpkt 1000 bounded
>
>
> tc qdisc add dev eth0 parent 10:64 sfq quantum 1514b perturb 15
> tc qdisc add dev eth0 parent 10:128 sfq quantum 1514b perturb 15
> tc qdisc add dev eth0 parent 10:256 sfq quantum 1514b perturb 15
> tc qdisc add dev eth0 parent 10:512 sfq quantum 1514b perturb 15
> tc qdisc add dev eth0 parent 10:1024 sfq quantum 1514b perturb 15
>
> tc filter add dev eth0 parent 10:0 protocol ip prio 100 u32 match ip dst
> 200.39.178.128/26 flowid 10:256
> -------------------------end----------------------------
>
> It shoud limit this network to 256, but it does not.
>
> When I test it, it shows no bandwidth limit, since I get rates higher
> than the allowed from the client side(32kB/s should be maximum).
> Example:
Can you show the output of tc statistics?
>
--
http://www.PowerDNS.com Versatile DNS Software & Services
Trilab The Technology People
Netherlabs BV / Rent-a-Nerd.nl - Nerd Available -
'SYN! .. SYN|ACK! .. ACK!' - the mating call of the internet
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LARTC] tc not working
2001-10-06 17:31 [LARTC] tc not working oarmas
2001-10-08 15:27 ` bert hubert
@ 2001-10-08 17:24 ` Omar Armas Aleman
2001-10-12 6:51 ` Stef Coene
2 siblings, 0 replies; 4+ messages in thread
From: Omar Armas Aleman @ 2001-10-08 17:24 UTC (permalink / raw)
To: lartc
> Can you show the output of tc statistics?
For simplicity, I put here a smaller example:
The OS: RH 7.1
The configuracion:
|Internet|
|
eth0: 200.39.191.182/255.255.255.252
eth1:3: 200.39.190.225/255.255.255.224
|
200.39.190.224/27 (The office network)
The script:
----------begin------------------
[root@pruebas bin]# cat ban
tc qdisc add dev eth0 root handle 10: cbq bandwidth 10Mbit avpkt 1000
#root class
tc class add dev eth0 parent 10:0 classid 10:1 cbq bandwidth 10Mbit rate
10Mbit allot 1514 weight 1Mbit prio 8 maxburst 20 avpkt 1000
#root class
tc class add dev eth0 parent 10:1 classid 10:64 cbq bandwidth 10Mbit rate
64Kbit allot 1514 weight 6Kbit prio 5 maxburst 20 avpkt 1000 bounded
#root class
tc qdisc add dev eth0 parent 10:64 sfq quantum 1514b perturb 15
#restriction
tc filter add dev eth0 parent 10:0 protocol ip prio 100 u32 match ip dst
200.39.190.224/27 flowid 10:64
[root@pruebas bin]#
--------------end----------------------------
The output of tc:
# tc qdisc show dev eth0
qdisc sfq 8001: quantum 1514b perturb 15sec
qdisc cbq 10: rate 10Mbit (bounded,isolated) prio no-transmit
# tc class show dev eth0
class cbq 10: root rate 10Mbit (bounded,isolated) prio no-transmit
class cbq 10:1 parent 10: rate 10Mbit prio no-transmit
class cbq 10:64 parent 10:1 leaf 8001: rate 64Kbit (bounded) prio 5
# tc class show dev eth0 parent 10:1
class cbq 10: root rate 10Mbit (bounded,isolated) prio no-transmit
class cbq 10:1 parent 10: rate 10Mbit prio no-transmit
class cbq 10:64 parent 10:1 leaf 8001: rate 64Kbit (bounded) prio 5
# tc filter show dev eth0 parent 10:0
filter protocol ip pref 100 u32
filter protocol ip pref 100 u32 fh 800: ht divisor 1
filter protocol ip pref 100 u32 fh 800::800 order 2048 key ht 800 bkt 0
flowid 10:64
match c827bee0/ffffffe0 at 16
filter protocol ip pref 100 u32 fh 800::801 order 2049 key ht 800 bkt 0
flowid 10:64
match c827bee0/ffffffe0 at 16
(hope this is what you wanted)
My problem: I want to limit 200.39.190.224/27 to 64K of bandwidth and
it's not working. I testet it with ougoing and incoming traffic and show
no limit.
Thanks,
Omar
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LARTC] tc not working
2001-10-06 17:31 [LARTC] tc not working oarmas
2001-10-08 15:27 ` bert hubert
2001-10-08 17:24 ` Omar Armas Aleman
@ 2001-10-12 6:51 ` Stef Coene
2 siblings, 0 replies; 4+ messages in thread
From: Stef Coene @ 2001-10-12 6:51 UTC (permalink / raw)
To: lartc
You use the destination in you filter, but that's wring. Since you are
shaping the packets that leave eth0, you have to match against the source and
not the destination.ping
Stef
> Internet
>
> eth0: 200.39.191.182
> eth1: 200.39.178.129
>
> client network (200.39.178.128/26)
> tc filter add dev eth0 parent 10:0 protocol ip prio 100 u32 match ip dst
> 200.39.178.128/26 flowid 10:256
--
stef.coene@docum.org stef.coene@belgacom.net
More QOS info : http://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/2.4Routing/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-10-12 6:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-06 17:31 [LARTC] tc not working oarmas
2001-10-08 15:27 ` bert hubert
2001-10-08 17:24 ` Omar Armas Aleman
2001-10-12 6:51 ` Stef Coene
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox