Re: Checking Configuration

Linux Advanced Routing and Traffic Control

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

 



On Wednesday 27 November 2002 00:10, Dorneles Treméa wrote:
> ### Sorry for the long mail... :-( ###
>
> Hi folks,
>
> I'm playing with traffic control, trying to improve network
> performance, minimizing delay and privileging some hosts, in
> a small local ISP, around here.
>
> This sketch tries to show the network structure:
>
>              +------+       +------+       +---+
> Internet --- |Cisco | ----- |Linux | ----- |HUB| --- LAN
>
>              |Router|   eth1|Box   |eth0   +---+
>
>              +------+       +------+
>
> Cisco is connected to Internet at 256Kbp/s and LAN runs at
> 100Mbp/s. Servers in LAN uses public address. Linux box
> just do traffic control and packet filtering.
>
> Main problem is a LAN mail server, which generates a lot
> of traffic (SMTP in & out, POP out), causing long delays
> in web and ssh connections...
>
> So, I write a little script (attached) to try to solve this
> issues.
>
> After reading lartc.org docs again, I see that I have made
> a grave mistake: filter incoming and outcoming traffic in
> the same interface (I still have to fix this...).
>
> Furthermore, script last line gives me an error: 'Unknown
> filter "flowid", hence option "1:5" is unparsable'.
>
> ---
> Q1: How can I solve this parser error?
> $FILTER flowid 1:5
You have to match something.  Try this :
$FILTER  u32 match ip src 0/0 flowid 1:5

> Q2: Can someone point me a example to filter in/out at the
> same interface? I accecpt RTFMs (with links)... :-)
> Q3: Just to confirm: is internal interface (etho) the right
> place to control traffic?
You can only shape outgoing traffic with htb or cbq (or you have to use the 
imq device).  But why not shaping on eth0 _and_ eth1?  Shaping on eth0 is for 
the traffic that goes to the LAN.  Shaping on eth1 is done for the traffic 
that goes to the internet.  You have a dedicated shaping box this can 
perfectly be done.  And it's the best solution.
Shaping incoming traffic can be done, but why if you can shape on both 
interfaces ??

> Q4: These values at 'avgidle' and 'undertime' make sense?
I think so.  They are used for internal cbq calculations and I have no idea 
what happens if you change them.

> Q5: There is a better way to improve performance?
Yes.  You add all the class directly to the qdisc and you use the wrong 
bandwidth parameter.  Bandwidth parameter = NIC bandwidth, so 10mbit or 
100mbit.  To share the same bandwidth, you have to add 1 bounded class to the 
qdisc with rate = link bandwidth.  All the other classes are attached to this 
class (each bandwidth = NIC bandwidth).

> Q6: Is it necessary to attach qdiscs to each final class?
No, but the default qdisc is a simple one.  Don't forget that each class has 
always 1 qdisc attached to it, even if you don't add one.

> There is some kind of advantage in this?
If you add a sfq qdisc, data streams within 1 class will get better balanced.

> Thanks in advance and sorry my poor English...
Mine is not better :)

Stef

-- 

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
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