Bandwidth by port
Active FTP uses 20/21 tcp on the server side
Quoted 23 lines · you
Quoted 22 lines · David Coello
Hi
I am trying to limit the bandwidth by port buy without success.
The code is :
# Disciplina de encolamiento
tc qdisc add dev eth1 root handle 10: cbq bandwidth 10Mbit avpkt 1000 mpu 64# Clase
tc class add dev eth1 parent 10:0 classid 10:1 cbq bandwidth 1kbps rate 1kbps allot 1514 prio 1 maxburst 10 avpkt 100 bounded isolated# Filtro
# tc filter add dev eth1 parent 10:0 protocol ip handle 3 fw classid 10:1tc filter add dev eth1 parent 10:0 protocol ip u32 match ip dst 0.0.0.0 match ip sport 20
0xffffflowid 10:1
tc filter add dev eth1 parent 10:0 protocol ip u32 match ip dst 0.0.0.0 match ip sport 210xffffflowid 10:1
Quoted 7 lines
Quoted 2 lines
What am i making bad? I have probed with mark&iptables but with identical result. When i make ftp i download without band limit.
Ftp is very difficult to shape because it can use dynamic ports. Try using active or passive ftp. I'm not sure wich one uses fixed ports.
Stef
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hi
I am trying to limit the bandwidth by port buy without success.
The code is :
# Disciplina de encolamiento
tc qdisc add dev eth1 root handle 10: cbq bandwidth 10Mbit avpkt 1000 mpu 64
# Clase
tc class add dev eth1 parent 10:0 classid 10:1 cbq bandwidth 1kbps rate 1kbps allot 1514 prio 1 maxburst 10 avpkt 100 bounded isolated
# Filtro
# tc filter add dev eth1 parent 10:0 protocol ip handle 3 fw classid 10:1
tc filter add dev eth1 parent 10:0 protocol ip u32 match ip dst 0.0.0.0 match ip sport 20 0xffff flowid 10:1
tc filter add dev eth1 parent 10:0 protocol ip u32 match ip dst 0.0.0.0 match ip sport 21 0xffff flowid 10:1
What am i making bad? I have probed with mark&iptables but with identical result. When i make ftp i download without band limit.
Thanks and regards
David Coello
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 17 lines · David Coello
Hi
I am trying to limit the bandwidth by port buy without success.
The code is :
# Disciplina de encolamiento
tc qdisc add dev eth1 root handle 10: cbq bandwidth 10Mbit avpkt 1000 mpu 64# Clase
tc class add dev eth1 parent 10:0 classid 10:1 cbq bandwidth 1kbps rate 1kbps allot 1514 prio 1 maxburst 10 avpkt 100 bounded isolated# Filtro
# tc filter add dev eth1 parent 10:0 protocol ip handle 3 fw classid 10:1
Quoted 7 lines
tc filter add dev eth1 parent 10:0 protocol ip u32 match ip dst 0.0.0.0 match ip sport 20
0xffffflowid 10:1
tc filter add dev eth1 parent 10:0 protocol ip u32 match ip dst 0.0.0.0 match ip sport 210xffffflowid 10:1What am i making bad? I have probed with mark&iptables but with identical result. When i make ftp i download without band limit.
Ftp is very difficult to shape because it can use dynamic ports. Try using active or passive ftp. I'm not sure wich one uses fixed ports.
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/
Hi
But why the code of above doesn´t work? Anybody knows other systanx thats works to limit bandwidth by port?
Thanks and regards
David
Quoted 29 lines
Active FTP uses 20/21 tcp on the server side
Quoted 26 lines · you
Quoted 24 lines · David Coello
Hi
I am trying to limit the bandwidth by port buy without success.
The code is :
# Disciplina de encolamiento
tc qdisc add dev eth1 root handle 10: cbq bandwidth 10Mbit avpkt 1000 mpu 64# Clase
tc class add dev eth1 parent 10:0 classid 10:1 cbq bandwidth 1kbps rate 1kbps allot 1514 prio 1 maxburst 10 avpkt 100 bounded isolated# Filtro
# tc filter add dev eth1 parent 10:0 protocol ip handle 3 fw classid 10:1tc filter add dev eth1 parent 10:0 protocol ip u32 match ip dst 0.0.0.0 match ip sport 20
0xffffflowid 10:1
tc filter add dev eth1 parent 10:0 protocol ip u32 match ip dst 0.0.0.0 match ip sport 210xffffflowid 10:1What am i making bad? I have probed with mark&iptables but with identical result. When i make ftp i download without band limit.
Quoted 7 lines
Quoted 4 lines
Ftp is very difficult to shape because it can use dynamic ports. Try using active or passive ftp. I'm not sure wich one uses fixed ports.
Stef
_______________________________________________
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/
Hmm,
I'm brand new to both tc and the list, so forgive me if I'm uttering nonsense :)
The example below seems good to me if eth1 is the interface connected to the side your clients are on, not the side the ftp servers are on. Are u sure that is the interface setup you have? I have done a similar setup, but based on ip-range. I both used fw marks and route realm marks and that worked in both occasions.
serge.
-----Original Message-----
From: David Coello [mailto:[email protected]]
Sent: Wednesday, December 11, 2002 7:16 PM
To: [email protected]
Subject: Re: [LARTC] Bandwidth by port
Hi
But why the code of above doesn´t work? Anybody knows other systanx thats works to limit bandwidth by port?
Thanks and regards
David
Quoted 29 lines
Active FTP uses 20/21 tcp on the server side
Quoted 26 lines · you
Quoted 24 lines · David Coello
Hi
I am trying to limit the bandwidth by port buy without success.
The code is :
# Disciplina de encolamiento
tc qdisc add dev eth1 root handle 10: cbq bandwidth 10Mbit avpkt 1000 mpu 64# Clase
tc class add dev eth1 parent 10:0 classid 10:1 cbq bandwidth 1kbps rate 1kbps allot 1514 prio 1 maxburst 10 avpkt 100 bounded isolated# Filtro
# tc filter add dev eth1 parent 10:0 protocol ip handle 3 fw classid 10:1tc filter add dev eth1 parent 10:0 protocol ip u32 match ip dst 0.0.0.0 match ip sport 20
0xffffflowid 10:1
tc filter add dev eth1 parent 10:0 protocol ip u32 match ip dst 0.0.0.0 match ip sport 210xffffflowid 10:1What am i making bad? I have probed with mark&iptables but with identical result. When i make ftp i download without band limit.
Quoted 7 lines
Quoted 4 lines
Ftp is very difficult to shape because it can use dynamic ports. Try using active or passive ftp. I'm not sure wich one uses fixed ports.
Stef
_______________________________________________
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/
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/