/* HINT: Search archives @ http://www.indyramp.com/masq/ before posting! */
On Sun, 31 Oct 1999, Safiki wrote:
> I've got the following problem with my IP-masquerading.
> My linuxbox (kernel 2.2.12) got an ISDN connection what
> can do at most approx 8 kb/s.
> My clients can surf, ICQ, IRC, etc through the IP-masq linux server.
>
> But when I'm going to download something by ftp, my IRC-connection
> get large lags, my ICQ stops and www-surfing gets very, very slow.
> When the file is transferred and the ftp-connection stops, everything
> clears up and works fine again.
>
> I think its because ftp gets almost all the bandwith. I'm not sure,
> but when so : is there a way to put a maximum throughput on the
> ftp-connection, like 5 or 6 kb/s. And if so, how do I do that.
> I thought I've read some time ago it's possible, but now I'm
> looking for it I can't find it anywhere.
Your isdn link has a two queues of packets, one at each end, of
packets waiting to cross it. When you have a large amount of data trying
to cross, it tends to crowd out any other packets that are also trying to
cross.
There are two approaches to making the link "fairer" and you can
use either or both.
The first is try to limit the amount of data that's being queued
up at both ends by the ftp program. You can't directly affect the
inbound side unless you also run the ISP, but you can limit the outbound
queue, which _sort_ _of_ affects the inbound queue.
When the link comes up, use
ifconfig ppp0 txqueuelen 3
From the ifconfig man page:
txqueuelen length
Set the length of the transmit queue of the device. It is useful to
set this to small values for slower devices with a high latency (modem
links, ISDN) to prevent fast bulk transfers from disturbing interactive
traffic like telnet too much.
Play around with different values until you get one you like.
The more effective approach is to shorten the largest packet size,
so that ftp data doesn't tie up the link as long. In /etc/ppp/options (or
in /etc/diald.conf if you're using diald), add the following two lines:
mru 576
mtu 576
This cuts the size of the largest packet this machine will,
respectively, receive and transmit in third. Because more packets will be
required to carry the same amount of data, and therefore you have more
packet header data to carry, this slightly reduces the maximum amount of
user data/second, but the link is much more responsive; you should be able
to carry on even a telnet session with a lot less patience required.
One final note. It is possible to use something like the
bandwidth shaper to specifically limit the amount of bandwidth the ftp
connection uses. Unfortunately, the shaper has to be in place at the
_transmitting_ end of the link (i.e., you'd have to set it up at your
ISP); I don't believe there's any value in trying to set it up at your
end.
Cheers,
- Bill
---------------------------------------------------------------------------
"SCSI is *NOT* magic. There are *fundamental technical reasons*
why it is necessary to sacrifice a young goat to your SCSI chain now and
then."
-- [EMAIL PROTECTED]
--------------------------------------------------------------------------
William Stearns ([EMAIL PROTECTED]). Mason, Buildkernel, named2hosts,
and ipfwadm2ipchains are at: http://www.pobox.com/~wstearns/
_______________________________________________
Masq maillist - [EMAIL PROTECTED]
Admin requests can be handled at http://www.indyramp.com/masq-list/ -- THIS INCLUDES
UNSUBSCRIBING!
or email to [EMAIL PROTECTED]
PLEASE read the HOWTO and search the archives before posting.
You can start your search at http://www.indyramp.com/masq/
Please keep general linux/unix/pc/internet questions off the list.