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

Re: throttling incoming traffic



Hi Armando,


my guesses are:

Remember that you can only controle OUTGOING queues of your network cards (
exept with ingress ).

You've set up your eth0 interface ( to Host A ) correctly, but you also have to
setup your eth1 ( to all outside hosts ) to control traffic from host A through
the router.

Patrick


On Aug 17, 19:45, Armando L. Caro Jr. wrote:
> Subject: Re: throttling incoming traffic
> On Wed, 16 Aug 2000, Aki M Laukkanen wrote:
>
> > Just to make sure, you have tried with a dedicated router and still have
> > problems?
>
> YES. YES.
>
> > If so then could you please resend your exact configuration
> > and what you're trying to achieve.
>
> Ok, I am trying to control the data rate going through a particular router
> and to & from a particular host. Let me give u a diagram....
>
>
>             (all outside hosts)
>
>                     /\
>                     ||
>                     ||
>              	    \/
> 		+--------+
> 		| Router |
> 		+--------+
>                     /\
> 		    ||  throttle this traffic to/from Host A
>                     ||
>                     \/
> 		+--------+
> 		| Host A |
> 		+--------+
>
> Therefore, I setup the Router with the following class and filters by
> doing the following...
>
> /usr/local/sbin/tc qdisc add dev eth0 root handle 1: cbq bandwidth 6Mbit
>     avpkt 1000
>
> /usr/local/sbin/tc class replace dev eth0 parent 1:0 classid 1:1 cbq
>     bandwidth 6Mbit rate 1Mbit prio 2 maxburst 20 avpkt 1000 bounded
>     isolated
>
> /usr/local/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 1
>     handle 1: u32 divisor 1
>
> /usr/local/sbin/tc filter add dev eth0 parent 1:0 prio 1 u32 match ip src
>     192.4.20.232/32 flowid 1:1
>
> /usr/local/sbin/tc filter add dev eth0 parent 1:0 prio 1 u32 match ip dst
>     192.4.20.232/32 flowid 1:1
>
>
> I get the following setup:
>
> qdisc cbq 1: dev eth0 rate 6Mbit (bounded,isolated) prio no-transmit
> class cbq 1: root rate 6Mbit (bounded,isolated) prio no-transmit
> class cbq 1:1 parent 1: rate 1Mbit (bounded,isolated) prio 2
> filter parent 1: protocol ip pref 1 u32
> filter parent 1: protocol ip pref 1 u32 fh 1: ht divisor 1
> filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1
> filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800
> bkt 0 flowid 1:1
>   match c00414e8/ffffffff at 12
> filter parent 1: protocol ip pref 1 u32 fh 800::801 order 2049 key ht 800
> bkt 0 flowid 1:1
>   match c00414e8/ffffffff at 16
>
>
> Now, when I test throughput... the downlink works. In other words, all
> traffic TO Host A can is throttled to a data rate of 1Mbit. However, the
> uplink does not work. That is, all traffic FROM Host A is transmitted as
> fast the device will allow.
>
> Any ideas about what my problem could be?
>
> -----------------------------------------------------------------------
> Armando L. Caro Jr.                                  acaro@cis.udel.edu
> University of Delaware                   http://www.cis.udel.edu/~acaro
> -----------------------------------------------------------------------
>
>
>
>-- End of excerpt from Armando L. Caro Jr.