PDA

View Full Version : P2P Tweak for Netgear DG834G/GT Router


View Full Version : P2P Tweak for Netgear DG834G/GT Router


Goldmember
June 8th, 2006, 12:03 PM
Hello guys,

I thought I'd share a p2p tweak I found (http://www.expansys.com/forumthread.asp?code=110551&thread=502) via Google sometime ago. This tweak is for Netgear DG834 / DG834G / DG834GT routers, and maybe other 'busybox' linux-based routers but you will have to check and make a script yourself. Google is your friend.

Since I couldn't find any ready-made script on the internet for my Netgear DG834GT router, I modified one to work with it. It can also work with the earlier model, the DG834G.

This tweak is mainly for people who use p2p apps.

After applying this tweak to the router, I noticed eMule downloaded faster, web browsing was smooth and sometimes, depending how fast eMule is downloading in the background, I can even play Counterstrike with decent pings. Bare in mind my connection speed is 6000/768 so your gaming experience may vary if downloading at the same time.

What this tweak does is it basically optimizes the NAT timings on the router in order to free up the idle connections taking up slots and increase NAT's concurrent sessions. There's more technical stuff behind it but I am not a nerd so I won't bore you. :icon_sunn

Anyway. If you leave the router running with its original factory/firmware settings then you will probably notice the following symptoms:

Slow web browsing
Websites timing out
MSN Messenger disconnects
Not able to connect to a bittorrent tracker
Connection generally behaving strange

If you get the above symptoms when your p2p application is running then chances are that this tweak will fix these problems.

The only problem is that once you reboot your router for any reason, you will lose the tweaked settings, but not to worry, there is a quick way to re-apply the tweak with a few clicks. In order to make it easier to apply the tweak, you need to follow this simple guide below.

Let's get busy

First, download Telnet Scripting Tool (TS10) by Albert Yale (http://users.telenet.be/tontonzen/gg/TST10.zip). Extract it to a safe place and in that same folder make a text file called 'p2ptweak.txt'.

Paste the following script into that 'p2ptweak.txt' text file:

192.168.0.1 23
WAIT "#"
SEND "cd /proc/sys/net/ipv4/netfilter\m"
WAIT "#"
SEND "echo 8192 > ip_conntrack_max\m"
WAIT "#"
SEND "echo 600 > ip_conntrack_generic_timeout\m"
WAIT "#"
SEND "echo 10 > ip_conntrack_tcp_timeout_close\m"
WAIT "#"
SEND "echo 120 > ip_conntrack_tcp_timeout_close_wait\m"
WAIT "#"
SEND "echo 1200 > ip_conntrack_tcp_timeout_established\m"
WAIT "#"
SEND "echo 120 > ip_conntrack_tcp_timeout_fin_wait\m"
WAIT "#"
SEND "echo 60 > ip_conntrack_tcp_timeout_time_wait\m"
WAIT "#"
SEND "echo 30 > ip_conntrack_udp_timeout\m"
WAIT "#"
SEND "cd /proc/sys/net/ipv4\m"
WAIT "#"
SEND "echo 1200 > tcp_keepalive_time\m"
WAIT "#"
SEND "echo 3 > tcp_keepalive_probes\m"
WAIT "#"
SEND "cd /\m"
WAIT "#"
SEND "exit\m"

Save the 'p2ptweak.txt' file.

Next, on your desktop, right-click and make a shortcut to the telnet script tool, the TS10.exe file you extracted.

Good. Now you can run TS10 from the desktop. Go ahead and rename the desktop icon to e.g. 'Optimize Router' so you know what it is. OK right-click on it and select 'Properties'. In the 'Target' field the end of the line should look similar to this:

\TST10.exe" /r:p2ptweak.txt

Make sure it is written like this or else it might not work.

OK now you are probably wondering why it didn't work, e.g. when you run the icon, the TS10 window remains black and then disappears. This is because you need to enable telnet on your Netgear router. I'm afraid this is the only way to enable telnet access on the router so here's how (no worries, it's a doddle!).

NOTE: This is for Netgear DG834G/GT routers. Click this link http://192.168.0.1/setup.cgi?todo=debug and save the page to your desktop. It should be a html file that you saved to the desktop. Good. Just rename that html file to 'Enable Telnet on Router'.

That's it! DONE!

Now whenever you need to optimize your router, just double-click the 'Enable Telnet on Router' icon (sometimes you may be prompted for username/password, in that case, type 'admin' and 'password') followed by the 'Optimize Router' icon. The TS10 window should briefly appear with the script being applied. It will happen fast but don't worry, the tweak gets applied.

To confirm if the tweak got applied, telnet to the router and type the following line:

cd /proc/sys/net/ipv4/netfilter/
cat ip_conntrack_max

It should say '8192'. You can check and confirm the other lines by similar method.

I hope this helps you guys out as it has helped me.

Original credit goes to samPT (for the values), rperkin (for the script idea) and Albert Yale (for TS10).

NOTE: This tweak does not damage the router - at least to my knowledge. Since the tweaked settings are not permanently saved, you have nothing to worry about as the router reverts back to its original factory/firmware settings, once you reboot it.

zeal27
August 3rd, 2006, 01:19 AM
Hi

This does not seem to work on my Netgear DG834G router. We have three computers connected to the router and all three use P2P. The download speed becomes very slow. In fact one of the computers just times out. I tried the tweak and didn't make any difference. In fact I think it's actually slower. Any ideas?