2002-07-28 19:53:42

by Benson Chow

[permalink] [raw]
Subject: traffic shaper in 2.4.18 working?

(initial conditions)
I have two existing IP addresses on eth0 belonging to the same subnet as a
virtual host. This machine is a dual CPU box at 450MHz with an Intel
EtherPro 100.

(what I've done)
I've executed:
shapecfg attach shaper0 eth0
shapecfg speed shaper0 19000
ifconfig shaper0 10.0.0.80

However, it seems whenever I subsequently connect to this
machine's 10.0.0.80 from another machine, it still transmits at full
bandwidth of the media and not the 19K (Bytes/sec?) that I expect?

Is this a proper usage of this device or is it a bug?

Thanks,

-bc


2002-07-28 20:16:49

by bert hubert

[permalink] [raw]
Subject: Re: traffic shaper in 2.4.18 working?

On Sun, Jul 28, 2002 at 01:56:49PM -0600, Benson Chow wrote:
> (initial conditions)
> I have two existing IP addresses on eth0 belonging to the same subnet as a
> virtual host. This machine is a dual CPU box at 450MHz with an Intel
> EtherPro 100.
>
> (what I've done)
> I've executed:
> shapecfg attach shaper0 eth0
> shapecfg speed shaper0 19000
> ifconfig shaper0 10.0.0.80
>
> However, it seems whenever I subsequently connect to this
> machine's 10.0.0.80 from another machine, it still transmits at full
> bandwidth of the media and not the 19K (Bytes/sec?) that I expect?
>
> Is this a proper usage of this device or is it a bug?

Add a route to your remote machine via shaper0 and check again. Linux does
not automatically route traffic with the source address of an interface out
over that interface. This is not a bug. If you want to force this, use
policy routing.

See http://lartc.org/howto/lartc.rpdb.html

Regards,

bert hubert

--
http://www.PowerDNS.com Versatile DNS Software & Services
http://www.tk the dot in .tk
http://lartc.org Linux Advanced Routing & Traffic Control HOWTO

2002-07-28 23:16:15

by Alan

[permalink] [raw]
Subject: Re: traffic shaper in 2.4.18 working?

On Sun, 2002-07-28 at 20:56, Benson Chow wrote:
> However, it seems whenever I subsequently connect to this
> machine's 10.0.0.80 from another machine, it still transmits at full
> bandwidth of the media and not the 19K (Bytes/sec?) that I expect?
>
> Is this a proper usage of this device or is it a bug?

You need to route via shaper0 too