RE: [LARTC] very simple problem to help me understand

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ASCII art below:


Internet ======== eth0-Linux-eth1===== LAN

Assuming ftp traffic is active thus ftp-data port is 20 and connection
port is 21. PASV uses high ports available and would be more cumbersome
to filter.

Incoming traffic on eth0 from the Internet is outgoing traffic on eth1
(Remember only outgoing traffic can be shaped). Shaping ftp traffic on
eth1 will be equivalent to shaping incoming traffic on eth0.

tc qdisc add dev eth1 root handle 1 htb default 20
tc class add dev eth1 parent 1: classid 1:10 htb rate 10kbit
tc class add dev eth1 parent 1: classid 1:20 htb rate 100kbit ceil
128kbit
#Match ftp and direct to class 1:10
tc filter add dev eth1 parent 1:0 protocol ip u32 match ip dport 21
classid 1:10
tc filter add dev eth1 parent 1:0 protocol ip u32 match ip dport 20
classid 1:10

This should get you started. Hook on to http://www.docum.org and you'll
get some good stuff.

Mohan
-----Original Message-----
From: lartc-admin@xxxxxxxxxxxxxxx [mailto:lartc-admin@xxxxxxxxxxxxxxx]
On Behalf Of Jeremy Hansen
Sent: Wednesday, March 19, 2003 8:56 PM
To: LARTC@xxxxxxxxxxxxxxx
Subject: [LARTC] very simple problem to help me understand



I want a small excersize to understand how everything fits together.
What 
I'd like to do is limit incoming ftp traffic to 10k/second.  That's all.

This should be enough to understadn how everything works.  Can someone 
help me with a quick recipe?

Thanks
-jeremy

_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux