Hello list. I''m trying to set up traffic shaping on a (web) server which is also a router(NAT) for my LAN. It is connected to the LAN via Ethernet and also has PPP Internet connection on another interface. I need traffic shaping to make sure that the upstream is fully available to the web-server when it''s active so when a LAN client is bulk downloading the web-server clients won''t wait for hours. Its kind giving high priority to the upstream and lowering the downstream. it will be nice that when the web-server is not using any upstream, LAN clients will enjoy full bandwidth. I''ve found lots of information on how to ensure downloading while uploading. but not on the reverse way. Any idea for such a setup ? Thanks.
On Wednesday 06 July 2005 22:53, o7sh@actcom.net.il wrote:> it will be nice that when the web-server is not using any upstream, LAN > clients will enjoy full bandwidth.Somehow I doubt that traffic shaping is the right approach here; after all, we''re talking about traffic on two different interfaces. There is no need to do shaping in that situation, because there is no way that traffic on interface A interferes with traffic on interface B (unless one is a virtual interface that actually uses the other to transfer). Even if you put HTB on interface A, this qdisc has no way of knowing how much load there is on another interface. To shape multiple interfaces at once, you''d have to cheat by using IMQ or something like that. If the fast transfer rates of the LAN puts too much load on your web server, the only thing you could do with traffic shaping here is to limit these transfer rates to a lower value at all times. A better method would be to configure this in the webserver; tell the webserver that internet clients are more important than LAN clients. Depending on which webserver you use, this might be possible or not. HTH Andreas
Hi Andreas . And thank you for your reply.> A better method would be to configure this in the webserver; tell the > webserver that internet clients are more important than LAN clients. > Depending on which webserver you use, this might be possible or not. > > HTH > AndreasThe main problem is that LAN clients connect to other web-servers on the Internet via this box. in fact, any Internet traffic they consume, even if they downloading, affect the upstream available for the web-server. Well, If i don''t find a "dynamic" solution. I don''t care lowering the upstream available for the LAN all the time.. let''s say I''ll shape the upstream on the Ethernet, will it solve the problem ? Thanks.
On Thursday 07 July 2005 10:51, o7sh@actcom.net.il wrote:> The main problem is that LAN clients connect to other web-servers on the > Internet via this box. in fact, any Internet traffic they consume, even > if they downloading, affect the upstream available for the web-server.Oh, I''m sorry, I seem to have misunderstood. I thought the LAN clients were downloading from your web server, causing too much load for it. You were talking about Internet traffic, so that''s a completely different story. To make upstream fully available to your webserver, I suggest using a PRIO qdisc with 2 bands... band one for webserver traffic, band two for everything else. The PRIO qdisc will make sure that your webserver always gets to send his packets first. LAN traffic will only be allowed to send when the webserver sent all his packets. However, this means that your LAN will get effectively zero bandwidth as long as the webserver is working (someone downloading from it). If this is too harsh for you, use HTB instead - there you can specify whatever balance between web server and LAN traffic you wish (50-50 or 75-25). HTH Andreas
> To make upstream fully available to your webserver, I suggest using a PRIO > qdisc with 2 bands... band one for webserver traffic, band two for > everything else. > > The PRIO qdisc will make sure that your webserver always gets to send his > packets first. LAN traffic will only be allowed to send when the webserver > sent all his packets. >Hi again.. it sounds like just what I need but I find it hard to implement. Here are my rules: ----- tc qdisc add dev ppp0 root handle 1: prio tc filter add dev ppp0 parent 1:0 protocol ip prio 1 u32 match ip sport 80 0xffff flowid 1:1 tc filter add dev ppp0 parent 1:0 protocol ip prio 3 u32 ----- I''ve been testing this for a while. But still got the dowload running while the upstream was full... Can you explain why?