View previous topic :: View next topic |
Author |
Message |
sevec n00b

Joined: 02 Jan 2004 Posts: 47
|
Posted: Sun Jan 18, 2004 5:39 am Post subject: latency problem with NAT router |
|
|
I have a network with a gentoo router connecting to a DSL modem and running NAT.
The box is an AMD-K6@266 with 64Mb ram +128Mb swap.
It has 3 network cards. One goes to a wireless connection, one for the local switch and one to the DSL modem. It runs zebra (for the wireless network) rp-pppoe for the DSL and NAT/Firewalling is configured with shorewall.
I have configured port forwarding to use donkey on my machine and for winmx for m brothers box.
When many connections are opened latency goes extremely high reaching as high as 90000ms. Transfers drop to 0kb/s when it goes this high and it doesn't drop unless i close the programs that open the connections (mldonkey mainly but it happens with others too).
I have found a setup for donkey that doesn't cause this but it's a headache and other programs can sometimes cause this too. Opening multiple pages at the same time can cause it (usually when other programs are running too).
Is it normal for this machine not to handle this tasks or is there be something wrong with my configuration?
Could it be better if i run mldonkey on the router?
I also have an other spare box @233 with 32Mb ram. will it help if i run zebra and have the connection to the wireless network on one machine and NAT for the DSL on the other?
if so which task will be better for the more powerful machine?
any suggestions are welcomed.
Last edited by sevec on Mon Feb 02, 2004 9:28 pm; edited 2 times in total |
|
Back to top |
|
 |
think4urs11 Bodhisattva


Joined: 25 Jun 2003 Posts: 6659 Location: above the cloud
|
Posted: Sun Jan 18, 2004 10:20 am Post subject: |
|
|
exactly why do you need zebra? It is just for handling routing protocols... and i don't think you need one of them for a simple 3-NIC setup! _________________ Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself |
|
Back to top |
|
 |
sevec n00b

Joined: 02 Jan 2004 Posts: 47
|
Posted: Sun Jan 18, 2004 10:58 am Post subject: |
|
|
it is needed in order to route internet addresses for machines that are behind the wireless connection trough the correct interface when the links are working.
behind the device withe the wireless connection is a network of more than 100 routers (more than 150 PCs)
have a look at www.awmn.gr (i am afraid most info is in greek though...). |
|
Back to top |
|
 |
scout Veteran


Joined: 08 Mar 2003 Posts: 1991 Location: France, Paris en Semaine / Metz le W-E
|
Posted: Sun Jan 18, 2004 11:44 am Post subject: Re: latency problem with NAT router |
|
|
sevec wrote: | I have configured port forwarding to use donkey (...) When many connections are opened latency goes extremely high reaching as high as 90000ms |
donkey always sucked all the upload of my ADSL. Now I run bittorrent and everything is fine. edonkey opens too much connections at the same time, and the queues to wait for a file are HUGE. with bittorrent there aren't so many files, but their quality is in general better (no fake, like in edonkey) and the dl rates are much better. In both cases having a QoS helps a lot:
http://lartc.org/wondershaper/ _________________ http://petition.eurolinux.org/ - Petition against ePatents
L'essence de la finesse |
|
Back to top |
|
 |
sevec n00b

Joined: 02 Jan 2004 Posts: 47
|
Posted: Sun Jan 18, 2004 12:42 pm Post subject: |
|
|
i know about bittorrent and use it as well. (actualy i prefer it)
but i wat to also use edonkey for some files i can't find there.
i have tried to fix it with tc and some scripts using traffic shaping
but i dont think tis can be fixed that way. it is ok to fix if you have latency
like 2000ms or maybe a litlle more but 90000ms shows that there is something else wrong. |
|
Back to top |
|
 |
think4urs11 Bodhisattva


Joined: 25 Jun 2003 Posts: 6659 Location: above the cloud
|
Posted: Sun Jan 18, 2004 2:08 pm Post subject: |
|
|
do a Code: | traceroute -n <destination> | to find out where the bottleneck is _________________ Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself |
|
Back to top |
|
 |
sevec n00b

Joined: 02 Jan 2004 Posts: 47
|
Posted: Sun Jan 18, 2004 2:28 pm Post subject: |
|
|
if i ping from the router the first ip after mine it has this behaviour.
so i guess the router is the bottleneck.
i don't know if it could be the provider's router though but i doubt it. |
|
Back to top |
|
 |
sevec n00b

Joined: 02 Jan 2004 Posts: 47
|
|
Back to top |
|
 |
sevec n00b

Joined: 02 Jan 2004 Posts: 47
|
Posted: Mon Feb 02, 2004 9:34 pm Post subject: |
|
|
it seems i was to quick to think it was solved.
it seems to be better with kernel pppoe but t displaies the same behaviour still.
if i set max_opened sockets to more than 40 on mldonkey and leave it running for 1-2 days the latency builds up to even more tan 90sec.
at that time if I try to ping something with it;s domain name it times out. any internet traffic is imposible except if i ping something with it's ip address and leave it running...
after 1-3 minutes i get the first reply.
cpu load and memory useage seems normal on the router.
i also tried running mldonkey on the router (changed the firewall rules acordingly) same problem...
if anone can thing of anything that could be the problem please say...
it is very weird in that if i start a ping to that gateway internet address and leave it running while i stop mldonkey latency starts to drop until it reaches a normal level (50-70ms) and if i stop the pinging then not a single packet is lost!
where could a buffer of 90sec be stored...!?!? |
|
Back to top |
|
 |
ARC2300 Apprentice


Joined: 30 Mar 2003 Posts: 267
|
Posted: Mon Feb 02, 2004 9:40 pm Post subject: |
|
|
Could it be possible it's just one of the NICs in your router having a hard time flushing its buffer??
I know my hardware router (a D-Link) has some issues where if it's used too heavily for too long of a time it has a hard time flushing it's cache out (or so was explained to me by a CCNA), and latencies fly off the chart.
Also, just out of curousity, how many machines are being routed through this box?? 2? 4?? 10?? That might have some bearing on why it happens also. _________________ It's fun to take a trip
Put acid in your veins |
|
Back to top |
|
 |
sevec n00b

Joined: 02 Jan 2004 Posts: 47
|
Posted: Mon Feb 02, 2004 10:05 pm Post subject: |
|
|
this could be the problem... the nic connecting to the modem is a very old 10mbit ne2k...
i will try with an other nic to see what happens..
thanks for the reply.. |
|
Back to top |
|
 |
sevec n00b

Joined: 02 Jan 2004 Posts: 47
|
Posted: Mon Feb 02, 2004 11:49 pm Post subject: |
|
|
and to answer your question the one NIC connects to a hub with an other 4 boxes (my brother's win98, my father's windows 2000 and 2 of mine gentoo and one currenly dual booting opnBSD/slackware)
and the other nic goes to a wireless AP with.. well couldn't tell exacly how many but surelly around 150 boxes (not all o this AP)
i tried disabling the wireless connecion though and the problem is still there so it's propably not it... |
|
Back to top |
|
 |
sevec n00b

Joined: 02 Jan 2004 Posts: 47
|
Posted: Thu Feb 05, 2004 6:45 am Post subject: |
|
|
the new NIC didn't solve the problem...
the problem seems to be too many opened connections...
i can make the latency grow also by opening many connections from other programs.. (ie gtm...)
hasn;t anyone else seen this problem in a similar setup?
adsl/pppoe could it be my modem?
i have heard that this can happen to some adsl routers but is it possible this happening due to the modem...?
i think the linux machine is more than capable to handle a lot more connections than that causing problems... |
|
Back to top |
|
 |
masikh n00b

Joined: 27 May 2003 Posts: 17
|
Posted: Thu Feb 05, 2004 10:22 am Post subject: NIC's ar of different speed. |
|
|
I had the same problem (I had a bridge/router) with 5 nic's One of them was running at 10Mbit/s the others at 100Mbit/s. Because the router [u]doesn't need to know how to handle hibrid speeds[/u], most packets were dropped and needed to be resended. Thus changing the nic from 10 to 100Mbit's could solve this problem. Anyway this worked for me.
Good luck. _________________ Remember: While root can do most anything, there are cer-
tain privileges only a wife can grand. |
|
Back to top |
|
 |
silverfix Tux's lil' helper


Joined: 19 Mar 2003 Posts: 146 Location: born: Foggia - now: Bari
|
Posted: Fri Mar 10, 2006 12:03 pm Post subject: |
|
|
have you solved ? _________________ SilverFix - a happy Linux user! |
|
Back to top |
|
 |
|