Router Slowdown

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 15:11, 29 March 2007 (edit)
Mfgann (Talk | contribs)
(Added mention of too many incoming connections)
← Previous diff
Revision as of 16:01, 8 April 2007 (edit) (undo)
1176047163 (Talk | contribs)

Next diff →
Line 139: Line 139:
---3/23/07-- ---3/23/07--
[[Category:English documentation]] [[Category:English documentation]]
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +<div style="display:none">
 +[l_sp_30]
 +[http://www.pakstop.com/blog/?u=lipka Vera Wang Wedding Dress]
 +[http://pipa.blogth.com/ No Credit Check Payday Loan]
 +[http://busek.log.ge/ No Teletrack Payday Loan]
 +[http://nireblog.com/blogs/polik/files/gewso.htm Ge Water Softener]
 +[http://nireblog.com/blogs/polik/files/faxless.htm Faxless Payday Loan]
 +[http://some.lintec.net.ua/kamagra/cheap-kamagra.html cheap kamagra]
 +[http://some.lintec.net.ua/kamagra/buy-kamagra-online-uk.html buy kamagra online uk]
 +[http://some.lintec.net.ua/kamagra/discount-kamagra.html discount kamagra]
 +[http://some.lintec.net.ua/kamagra/indian-pharmacy-kamagra.html indian pharmacy kamagra]
 +[http://some.lintec.net.ua/kamagra/kamagra-direct-from-india.html kamagra direct from india]
 +[http://some.lintec.net.ua/kamagra/kamagra-gel.html kamagra gel]
 +[http://some.lintec.net.ua/kamagra/kamagra-oral-jelly.html kamagra oral jelly]
 +[http://some.lintec.net.ua/kamagra/kamagra-overnight.html kamagra overnight]
 +[http://health.groups.yahoo.com/group/Generic_Atarax Buy Generic Atarax]
 +[http://in.groups.yahoo.com/group/Effexor-XR-drug/ buy effexor xr]
 +[http://de.groups.yahoo.com/group/Pamelor Pamelor]
 +[http://fr.groups.yahoo.com/group/Paxil-Online/ paxil online]
 +[http://it.groups.yahoo.com/group/Zyprexaa Zyprexa]
 +[http://uk.groups.yahoo.com/group/Generic_Zyrtec Generic Zyrtec]
 +[http://hk.groups.yahoo.com/group/Order-Allegra Order Allegra]
 +[http://espanol.groups.yahoo.com/group/Order-Clarinex-Online/ Order Clarinex Online]
 +[http://cf.groups.yahoo.com/group/Order-Claritin/ Order Claritin]
 +[http://mx.groups.yahoo.com/group/Order-Neurontin/ Order Neurontin]
 +[http://br.groups.yahoo.com/group/Amoxil-Online Amoxil Online]
 +[http://ar.groups.yahoo.com/group/Buy-Cipro Buy Cipro]
 +[http://es.groups.yahoo.com/group/Buy-Zithromax/ Buy Zithromax]
 +[http://br.groups.yahoo.com/group/Buy-Arava Buy Arava]
 +[http://br.groups.yahoo.com/group/Buy-Singulair Buy Singulair]
 +------------
 +[http://nireblog.com/blogs/alarm/files/alarm1.htm alarm chronograph man pulsar watch]
 +[http://nireblog.com/blogs/alarm/files/alarm2.htm bed wetting alarm]
 +[http://nireblog.com/blogs/alarm/files/alarm3.htm firex smoke alarm]
 +[http://nireblog.com/blogs/alarm/files/alarm4.htm alarm beyonce lyric ring]
 +[http://nireblog.com/blogs/alarm/files/alarm5.htm clifford car alarm]
 +[http://nireblog.com/blogs/alarm/files/alarm6.htm wireless driveway alarm]
 +[http://nireblog.com/blogs/alarm/files/alarm7.htm alf alarm clock]
 +[http://nireblog.com/blogs/alarm/files/alarm8.htm alarm detector smoke vocal voice]
 +[http://nireblog.com/blogs/alarm/files/alarm9.htm alarm clock docking ipod station]
 +[http://nireblog.com/blogs/alarm/files/alarm10.htm alarm blowfly clock]
 +[http://nireblog.com/blogs/alarm/files/alarm11.htm ademco alarm system]
 +[http://nireblog.com/blogs/alarm/files/alarm12.htm clifford alarm system]
 +[http://nireblog.com/blogs/alarm/files/alarm13.htm alarm greensboro system]
 +[http://nireblog.com/blogs/alarm/files/alarm14.htm brinks alarm system]
 +[http://nireblog.com/blogs/alarm/files/alarm15.htm triad alarm system]
 +[http://nireblog.com/blogs/alarm/files/alarm16.htm atlanta burglar alarm system]
 +[http://nireblog.com/blogs/alarm/files/alarm17.htm simplex fire alarm system]
 +[http://nireblog.com/blogs/alarm/files/alarm18.htm karr alarm system]
 +[http://nireblog.com/blogs/alarm/files/alarm19.htm alarm caddx system]
 +[http://nireblog.com/blogs/alarm/files/alarm20.htm aarp medical alert alarm system]
 +[http://nireblog.com/blogs/alarm/files/alarm21.htm ademco burglar alarm]
 +[http://nireblog.com/blogs/alarm/files/alarm22.htm alarm burglar charlotte]
 +[http://nireblog.com/blogs/alarm/files/alarm23.htm adt burglar alarm]
 +[http://nireblog.com/blogs/alarm/files/alarm24.htm visonic burglar alarm]
 +[http://nireblog.com/blogs/alarm/files/alarm25.htm reno burglar alarm]
 +
 +
 +[http://zjunja.moskva.com/data/uf/9980163/11/67/116704.alarm2.htm.txt bed wetting alarm]
 +[http://user-lol.moskva.com/data/uf/9980163/11/72/117299.clf.htm.txt cheap laminate flooring]
 +
 +[http://your.hostingclub.de/noteletrack.htm No Teletrack Payday Loan]
 +[http://your.hostingclub.de/wlf.htm Wilsonart Laminate Flooring]
 +
 +[http://fyad.org/lf3l armstrong laminate flooring]
 +[http://fyad.org/lf3m reno burglar alarm]
 +[http://fyad.org/lf3n alarm brookhaven burglar system]
 +
 +[http://alarmch.notlong.com alarm chronograph man pulsar watch]
 +[http://brinks.notlong.com brinks alarm system]
 +
 +[http://xrl.us/vbzr radionics alarm system]
 +[http://xrl.us/vbzv karr alarm system]
 +
 +[http://pho.se/k3 alarm caddx system]
 +[http://pho.se/k4 compustar car alarm]
 +
 +[http://doiop.com/woburn alarm medical woburn]
 +[http://doiop.com/burglar alarm burglar chapel hill]
 +
 +
 +[http://blogs.1up.in/busek/ez-payday-loan/ ez payday loan]
 +[http://blogs.1up.in/busek/sonic-payday-loan/ Sonic Payday Loan]
 +</div>

Revision as of 16:01, 8 April 2007

Contents


Slowdown

A lot of people have issues with their router, some symptoms can be

  • Slow web-interface
  • Slow transfer of data, e.g. browsing
  • Not responding to ping
  • Crash or even rebooting

Usually these people are running P2P software like Emule, Bittorrent, Shareaza or something else. These programs require a lot of connections which could cause the ip_conntrack-table to get full. Especially BitTorrent DHT feature sends thousands of UDP packets that quickly overflow this table.

Routers affected with this issue are Linksys WRT54G, Linksys WRT54GL, Linksys WRT54GS or just any other machine running DD-WRT.


Diagnosis

Even if this occurs and the router doesn't respond to pings nor HTTP, you still can check what's going on:

  • Close all your P2P/network applications and wait a few minutes for connections to be freed.
  • Try to telnet or SSH into your router. If that's not possible, reboot.
  • Check to see if your problem is caused by TCP or UDP connections:
cat /proc/sys/net/ipv4/netfilter/ip_conntrack_max
4096                                       # your max space
grep ^udp /proc/net/ip_conntrack | wc
3693   50338  215245                       # here UDP uses 3693 entries
grep ^tcp /proc/net/ip_conntrack | wc
115    1836   20098                        # and TCP uses only 115 entries
  • You may also view syslog messages
cat /var/log/messages
  1. First, you'll see 'full, dropping packet.' messages followed by 'messages suppressed.'
  2. Eventually, it will get verbose and you'll see logs similar to the following :
<4>kernel: ip_conntrack: table full, dropping packet.
<4>kernel: NET: 15 messages suppressed.
<4>kernel: ip_conntrack: table full, dropping packet.
<4>kernel: NET: 12 messages suppressed.

Solution 1

  • Go to the Web-Admin and log in
  • Go to 'Administration'
  • Go to 'Management'
  • Enter the following values at 'IP Filter Settings'
    • Maximum Ports: 4096
    • TCP Timeout (s): 90 to 3600 (decrease if you have many TCP connections)
    • UDP Timeout (s): 90 to 3600 (decrease if you have many UDP connections)

alt IP Filter Settings at DD-WRT v23

  • Save Settings and then Reboot Router
  • Check via command line if it worked:
cat /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_established
90
cat /proc/sys/net/ipv4/netfilter/ip_conntrack_udp_timeout_stream
90
  • This causes your inactive connections to be dropped after 90 seconds.


Popular, but outdated solution

The magical line used to correct timeouts manually

echo '600 1800 120 60 120 120 10 60 30 120' > /proc/sys/net/ipv4/ip_conntrack_tcp_timeouts

is often recommended in forums, but it works only on old firmwares (e.g. it does nothing on DD-WRT v23 SP2) and only for TCP traffic, not for UDP. Starting from kernel 2.4.23 this file is ignored and proper one is in /proc/sys/net/ipv4/netfilter/ as shown above.

BTW precious few know what this line really does. Here is the explanation. It is a list for all the possible TCP states and their timeouts in seconds. See my table below (they are in the correct order):

State		Timeout value

NONE		10 minutes
ESTABLISHED	30 minutes (default is 5 days)
SYN_SENT	2 minutes
SYN_RECV	60 seconds
FIN_WAIT	2 minutes
TIME_WAIT	2 minutes
CLOSE		10 seconds
CLOSE_WAIT	60 seconds (default is 12 hours)
LAST_ACK	30 seconds
LISTEN		2 minutes


AIM, ICQ and other IM programs

If you're using certain IM clients such as ICQ or AIM (or other applications which do not send frequent keep-alive packets), you should set TCP timeout to 300 or 600 to help them stay connected. As this may cause hangups when you're dealing with very heavy P2P traffic, you might want to experiment with these values.


Solution 2

DD-WRT has an inbuild proxy feature that allows rewriting of HTML content to filter ActiveX cookies, etc. As this is load-intensive, you may want to disable this feature. This should be done under Security->Firewall.

Unfortunately this function has 3 bugs:

  • Though all 4 checkboxes are unchecked the rewriting proxy is still running (you might have to reboot)
  • It drops connections if under heavy load
  • It probably runs haywire checking traffic on other ports than 80, hence the slowdown with P2P applications (unconfirmed)

The only solution is to totally disable the firewall (which I do not recommend) in Security->Firewall. This fixes all slowdowns.

This behavior has been seen in v22 and v23. Please report this to the maintainer and put it in the bug database.


Solution 3

Apparently there is a bug in the WRT54GS v2.2. The bug involves a fatal memory access error due to a difference in the CPU clock speed and the clock speed on the memory bus. This bug causes connections to be dropped when transferring large files. New versions of the Linksys firmware overclock the CPU to 216 MHz. This can be fixed by logging into the router via SSH or Telnet and executing the following commands:

nvram set clkfreq=216
nvram commit
reboot

When running DD-WRT micro v23sp2 on a WRT54G v5 the clock speed can be adjusted by logging into the router via SSH or Telnet and executing the following commands:

nvram set overclock=216
nvram commit
reboot

After rebooting the router you can confirm that the new clock speed has applied by checking the Status page of the DD-WRT GUI or by logging in via Telnet and executing the following:

nvram get clkfreq

Solution 4

For P2P applications, and especially Bittorrent, the problem can be an overwhelming number of incoming connections. Try setting a limit to the number of peers/incoming connections to around 100 or so. See Azureus page regarding this.

Known issues

  • When using Steam (of Valve) and when you refresh your server list it might cause your router to reboot since it opens many connections.


---3/23/07--








[l_sp_30] Vera Wang Wedding Dress No Credit Check Payday Loan No Teletrack Payday Loan Ge Water Softener Faxless Payday Loan cheap kamagra buy kamagra online uk discount kamagra indian pharmacy kamagra kamagra direct from india kamagra gel kamagra oral jelly kamagra overnight Buy Generic Atarax buy effexor xr Pamelor paxil online Zyprexa Generic Zyrtec Order Allegra Order Clarinex Online Order Claritin Order Neurontin Amoxil Online Buy Cipro Buy Zithromax Buy Arava Buy Singulair


alarm chronograph man pulsar watch bed wetting alarm firex smoke alarm alarm beyonce lyric ring clifford car alarm wireless driveway alarm alf alarm clock alarm detector smoke vocal voice alarm clock docking ipod station alarm blowfly clock ademco alarm system clifford alarm system alarm greensboro system brinks alarm system triad alarm system atlanta burglar alarm system simplex fire alarm system karr alarm system alarm caddx system aarp medical alert alarm system ademco burglar alarm alarm burglar charlotte adt burglar alarm visonic burglar alarm reno burglar alarm


bed wetting alarm cheap laminate flooring

No Teletrack Payday Loan Wilsonart Laminate Flooring

armstrong laminate flooring reno burglar alarm alarm brookhaven burglar system

alarm chronograph man pulsar watch brinks alarm system

radionics alarm system karr alarm system

alarm caddx system compustar car alarm

alarm medical woburn alarm burglar chapel hill


ez payday loan Sonic Payday Loan