Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I've got a lan + routrer (Mandrake 10.1) + 64 kB/s channel. I want to shape traffic among users, so I've given the highest priority to the http traffic - rate 40kbps ceil 64kbps, then I've limited the usage of th external ftp server ip 184.108.40.206 to rate 8kbps ceil 8kbps (I want everyone to use my local ftp rather than external), finally I've given rate 16kbps ceil 24kbps to all the other traffic. So I've written a script and put it into etc/rc.d/rc.local:
# eth1 is plugged to DSL
tc qdisc add dev eth1 root handle 1: htb default 4
tc class add dev eth1 parent 1: classid 1:1 htb rate 64kbps ceil 64kbps
tc class add dev eth1 parent 1:1 classid 1:2 htb rate 40kbps ceil 64kbps
tc class add dev eth1 parent 1:1 classid 1:3 htb rate 8kbps ceil 8kbps
tc class add dev eth1 parent 1:1 classid 1:4 htb rate 16kbps ceil 24kbps
tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip sport 80
0xffff flowid 1:2
tc filter add dev eth1 protocol ip parent 1:0 prio 3 u32 match ip src
220.127.116.11 match ip dst 192.168.0.0/24 flowid 1:3
But it doesn't work. It doesn't shape any traffic, moreover whenever anyone is connected to that ftp the channel is usually congested and it is impossible to browse inet. Please, help if you can. Thanks in advance.
I may be all wrong, but are your users on your local LAN and downloading from a remote FTP server ?
If so, then QoS won't help very much, since there's no point to use QoS on incomming trafic from a DSL line.
The heavy trafic you have is incomming trafic from the ftp server, but when it hits your Linux box (or QoS enabled router) the harm is allready done : ftp trafic has used your DSL bandwidth, it's only dropped when incomming your box...
QoS on icoming trafic can only have a meaning if both your network links have the same rate. If you wabt to have real QoS in your case, you enable it on your ftp server also.
With that script of yours, you're only shaping what users are sending to the internet, and not what they are receiving from the internet. So it doesn't do anything for http which is download traffic, and nothing for ftp downloads. It should do something for ftp uploads, though, as long as those filter rules work.
To affect download traffic, you'll have to shape incoming packets, if you are on a router probably by shaping outgoing traffic of the LAN interface. @fr_laz while it is true that shaping incoming traffic like that isn't the optimal solution, reordering / dropping incoming packets on the router can improve usability a lot.