Router Slowdown

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 10:01, 10 January 2007 (edit)
1168422543 (Talk | contribs)

← Previous diff
Revision as of 14:59, 10 January 2007 (edit) (undo)
P1415 (Talk | contribs)
(reverted spam by 1168422543)
Next diff →
Line 120: Line 120:
[[Category:English documentation]] [[Category:English documentation]]
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
-<div style="display:none"> 
-[l_sp_24] 
- 
-[http://z.la/25yq5 aciphex 20mg] 
-[http://z.la/2wy7h Deltasone] 
-[http://z.la/a6emg buy amaryl] 
-[http://br.groups.yahoo.com/group/actos_met_plus/ actos met plus] 
-[http://br.groups.yahoo.com/group/adalat_xl/ adalat xl] 
-[http://br.groups.yahoo.com/group/adalat_cc/ adalat cc] 
-[http://ar.groups.yahoo.com/group/altace/ altace and hair thinning] 
-[http://ar.groups.yahoo.com/group/arava/ arava side effects] 
-[http://ar.groups.yahoo.com/group/atarax/ atarax hydroxyzine] 
- 
-[http://z.la/ltdhd beach flower sympathy] 
-[http://z.la/ua7ss mlm local lead] 
-[http://z.la/x1q93 chicago sympathy flower] 
-[http://z.la/41rwa affiliate lead marketing mlm network] 
-[http://z.la/vw936 mlm lead generation] 
-[http://z.la/f0p3k art clip flower sympathy] 
-[http://z.la/40j9i mlm lead generation company] 
-[http://z.la/5wdkf generation lead site web mlm] 
-[http://z.la/wrdc6 lead generation network marketing mlm software] 
-[http://z.la/nk3pp free sample mlm lead] 
-[http://z.la/wtnv4 free mlm lead generation] 
-[http://z.la/slvh1 1,000 free lead mlm] 
-[http://z.la/mc188 1000 free lead mlm] 
-[http://z.la/1f4ah sympathy flower toronto] 
-[http://z.la/p6ihy mlm lead generation online] 
-[http://z.la/pfrhv generation lead mlm program] 
-[http://z.la/9hor2 generation lead real time mlm] 
-[http://z.la/uujmx buy flower funeral sympathy uk] 
-[http://z.la/9zuws generation in lead mlm real time] 
-[http://z.la/hxiry generation lead marketing mlm network] 
-[http://z.la/mvq6k flower ontario sympathy] 
-[http://z.la/y75l3 everyday free lead mlm] 
-[http://z.la/hrb8a targeted mlm lead] 
-[http://z.la/acb62 opt in mlm email lead] 
-[http://z.la/3cw4j mlm opt in lead] 
-[http://z.la/30x6i opt in mlm lead] 
-[http://z.la/qt0gf opt mlm lead] 
-[http://z.la/e1vz3 flor carpet tile] 
-[http://z.la/v5eda milliken carpet] 
-[http://z.la/t3myy carpet cleaning franchise] 
-[http://z.la/pvch9 chem dry carpet cleaning] 
-[http://z.la/4k6qp mohawk carpet] 
-[http://z.la/x61sz berber carpet] 
-[http://z.la/4gjjh dalton carpet] 
-[http://z.la/w7a5l miele vacuum cleaner] 
-[http://z.la/28bbh electrolux vacuum cleaner]  
-[http://z.la/6ckn3 ultrasonic cleaner] 
-[http://z.la/ko39x kirby vacuum cleaner] 
-[http://z.la/y2mpf ultrasonic jewelry cleaner] 
-[http://z.la/77hv9 grout cleaner] 
-[http://z.la/tgjsv hardwood floor cleaner]  
-[http://z.la/788hk upholstery cleaner] 
-[http://z.la/6rorw hoover steam cleaner] 
-[http://z.la/2gty3 exclusive mlm lead] 
-[http://z.la/2prld 20 generation lead marketing mlm network] 
-[http://z.la/hlvwp wild flower triathlon] 
-[http://z.la/xmwc6 email free in lead mlm opt] 
-[http://z.la/ptw9v generation mlm lead custom] 
-[http://z.la/h6mnm business free lead mlm opportunity seeker] 
-[http://z.la/2knx2 capture free lead mlm] 
-[http://z.la/iqhdm affiliate free lead lead marketing mlm network nutrition] 
-[http://z.la/i1n3h business opportunity seeker mlm lead] 
-[http://z.la/4iczl capture free lead mlm system] 
-[http://z.la/z5ndk flower from made silk sympathy wreath] 
-[http://z.la/65i2g mlm genealogy lead] 
-[http://z.la/iieqs ikebana flower arrangement] 
-[http://z.la/9nk5c flower hibiscus picture tattoo] 
-[http://z.la/llh3f double opt in mlm lead] 
-[http://z.la/sfit6 flower mississauga sympathy] 
-[http://z.la/xz3f3 generating guerilla lead marketing mlm program] 
-[http://z.la/ocaxq etobicoke flower sympathy] 
-</div> 

Revision as of 14:59, 10 January 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 it happens the router doesn't answer pings anymore and no more HTTP, you still can check what's going.

  • 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 it's not possible reboot.
  • Check 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

---12/23/06-- I also used the above solution on a WRT54G v5 running DD-WRT micro v23sp2.