Re: Throttling ethernet to emulate 56k

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

 



On Fri, 2002-11-01 at 17:10, Tony Nugent wrote:
> On Fri Nov 01 2002 at 12:05, "Taylor, ForrestX" wrote:
> 
> > One of my users wants to using Linux to act as a simple router.  He
> > needs to emulate a 56k line through the linux router transparently.  All
> > packets would pass through unchanged, but the bandwidth would be
> > limited, preferably dynamically.  Does anyone have any ideas?
> 
> Linux Advanced Routing & Traffic Control:	http://lartc.org/
> 
> Also have a look at /sbin/tc which comes with the iproute package,
> and use google to find the advanced routing howto.
> 

Yes, use tc (traffic control) shapecfg is not as accurate nor reliable. 
for instance the following as root:

tc qdisc add dev ethX root tbf rate 560bps latency 100ms burst 565 
where ethX is th # of the ethernet card that you want to affect.

This will effectively do what you want.  However the caveat is that
shapecfg, tc et all only limit in the --?transmit<-- direction.  That is
only the output of the device (ppp0 is valid as well as ethX) will be
"limited".  There is an experimental module (I forget the name at this
time) that will limit both the Transmit & the Receive, however if you
are going over the internet, unless the entire path is IPv6 the Rx will
probably not be reliable at all.

tc works by assinging each packet a "token".  Then the tokens are put
into a bucket & only "allowed" to come out at the rate you specify.  You
can only set latency down to 10ms.  The rate can be in bps, Kbytes,
Kbits, the default I think is in kbytes.  I use it to limit my kids when
they are on Kaaza & I want to play Q3,  I normally knock them down to
200bps, which gives them about 2k ob b/w while I get the rest of the DSL
:)!

The lartc site is a good one to start out & you can make some very
complex scenarios.  I have given a very simple example, but you can
write a tc script that can make decisions based upon changing b/w
priorites that you specifiy.  man tc & man tc qdisc for all options


> > Thanks,
> > 
> > Forrest
> 
> Cheers
> Tony
> 
> 
> 
> -- 
> Psyche-list mailing list
> Psyche-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/psyche-list




-- 
Psyche-list mailing list
Psyche-list@redhat.com
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux