Jump to content

For D-Link DSL-G604T or Similar Routers with P2P Problems


nf0rc3r

Recommended Posts

D-LINK (& Several other major routers, netgear, linksys, etc.) has a maximum connection threshold. There are several firmware upgrades for improved p2p performance and also some 3rd party firmware. Please google for it. However, if you don't trust these 3rd party firmware, there is a workaround.

This problem is extremely easy to identify. You utorrent downloads continue running, all connections continues. For example, a Internet explorer downloads continues with no problem. But "non-continuous" connections stops. You can't ping your router. Your MSN Disconnects. You can't use internet explorer to surf the web. Then this is most probably your problem.

PLEASE NOTE THE FOLLOWING IS TO BE USED ON D-LINK DSL-G604T ADSL ROUTERS ONLY. ALTHOUGH OTHER ROUTERS MAY CONTAIN SIMILAR OS, DIRECTORY STRUCTURE & TELNET COMMANDS. USE IT AT YOUR OWN RISK.

This post documents how to automate this process, and how to simplify the re-issuing of commands should it be necessary to reboot or restart the router.

The process is called Telnet Scripting. To use it you need:

- a Telnet Scripting tool

- a file containing Telnet commands (that is, a script file)

Although you can use a normal telnet. You will have to type the commands all over again everytime the router restarts. This includes changing firewall settings, virtual server settings, etc. With a telnet scripting tool, you can do it with 2 clicks.

The Telnet Scripting tool that I use is TST10.EXE, written by Albert Yale. It can be downloaded from at http://users.telenet.be/tontonzen/gg/TST10.zip

Here's a trivial example of its use, a script to login to the DSL-G604T and display the help text:

192.168.1.1 23

WAIT "login:"

SEND "root\m"

WAIT "Password:"

SEND "admin\m"

WAIT "#"

SEND "help\m"

WAIT "#"

The script assumes the default IP address of the router (192.168.1.1) and the default login password (admin).

If the script were stored in the file help.txt then the command to issue it (assuming it is in the same directory as TST10.EXE) would be:

tst10 /r:help.txt

Info on the script syntax and the parameters of TST10.EXE can be found by running the program.

If you like, you can also write a .bat file on your own to run the script so all you have to do is double click to execute the commands. That is what I did.

A real life example of where this is useful is given below. This provides a script to set the NAT session parameters for success (?) with P2P applications, by increasing the number of concurrent NAT sessions and setting appropriate timeout values to ensure 'stale' session data is discarded. Acknowledgement and thanks to a post by samPT in this forum for the values.

192.168.1.1 23

WAIT "login:"

SEND "root\m"

WAIT "Password:"

SEND "admin\m"

WAIT "#"

SEND "cd /proc/sys/net/ipv4/netfilter\m"

WAIT "#"

SEND "echo 4096 > ip_conntrack_max\m"

WAIT "#"

SEND "echo 50 > ip_conntrack_generic_timeout\m"

WAIT "#"

SEND "echo 5 > 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 10 > ip_conntrack_udp_timeout\m"

WAIT "#"

SEND "cd /\m"

WAIT "#"

SEND "exit\m"

Save this in a file (say) nat_sessions.txt, edit the default IP address and password to match your installation. Run a command prompt, change to the directory with the script + program, and execute it with:

tst10 /r:nat_sessions.txt /m

Just to confirm that these commands have taken effect and that the values have been written to the specific files, change directory and type them out. Here's an example:

cd /proc/sys/net/ipv4/netfilter/

cat ip_conntrack_max

You can extend this Telnet Scripting technique to do as many things as your Linux knowledge and the embedded toolset in the DSL-G604T allows. Which means that you perhaps won't need to wait for new firmware releases and fixes. Clearly this won't cover everything, but I'm sure you get the idea...

Hope this helps

Link to comment
Share on other sites

  • Replies 51
  • Created
  • Last Reply

upon further looking into this on other sites, i found changing

SEND "echo 32768 > ip_conntrack_max\m"

to

SEND "echo 2048 > ip_conntrack_max\m"

(doubling the original amount of connections)

works more effectively, due to the router only having 16mb of ram and probably unable to control too many open ports

while using the original setting i couldnt goto any websites, now i dont seem to have problems

Link to comment
Share on other sites

upon further looking into this on other sites, i found changing

SEND "echo 32768 > ip_conntrack_max\m"

to

SEND "echo 2048 > ip_conntrack_max\m"

(doubling the original amount of connections)

works more effectively, due to the router only having 16mb of ram and probably unable to control too many open ports

while using the original setting i couldnt goto any websites, now i dont seem to have problems

I tried both 2048 and 32768.

2048 leaving the router with a little less then 700kb of ram.

32768 eats up 300kb more (inactive memory) leaving it with a little more then 300kb

Considering active memory is the high chunk getitng eaten and it has 16MB. Doesn't make much difference :)

Link to comment
Share on other sites

D-LINK (& Several other major routers, netgear, linksys, etc.) has a maximum connection threshold. There are several firmware upgrades for improved p2p performance and also some 3rd party firmware. Please google for it. However, if you don't trust these 3rd party firmware, there is a workaround.

Help!!

Is there a 3rd party firmware upgrade you know to be a proven fix? I'm not quite at the skill level of using a scripting tool to solve this. I think this is the cause of non-consistant seeding performance with a 512u/l ISP and perhaps a seeding issue I'm having which is causing connections to start/stop for very short periods.

I also have a Alcatel Speedtouch 545 or a ZyXel 652R-11 router that I could change out with but prefer the G604T

Recently applied 'Sticky: Mini-guide to help all of you with your speed problems...' and have tried peer.lazy_field both true and false

Any advice would be welcomed....

Link to comment
Share on other sites

your problem seems a little off the topic... depending on your region visit www.dlink.com for instructions on resetting your router to factory default (pretty simple to do). Firmware upgrades should be done very carefully as they are not reversable and can damage the router so in this case a default factory reset should answer this. Remember to to open prots etc for utorrent but solve your surfing the net issue first... good luck

Link to comment
Share on other sites

D-LINK (& Several other major routers, netgear, linksys, etc.) has a maximum connection threshold. There are several firmware upgrades for improved p2p performance and also some 3rd party firmware. Please google for it. However, if you don't trust these 3rd party firmware, there is a workaround.

This problem is extremely easy to identify. You utorrent downloads continue running, all connections continues. For example, a Internet explorer downloads continues with no problem. But "non-continuous" connections stops. You can't ping your router. Your MSN Disconnects. You can't use internet explorer to surf the web. Then this is most probably your problem.

Umm...I don't think its off topic. Since this was the problem suggested in the topic. And the recommended solution was getting the firmware upgrade or doing this telnet thing. I got the upgrade from the company which should work fine and did some fixes, since 3rd party firmwares are risky. But apparently it still makes the connection turn bad after leaving torrent on for sometime.

I did port forwarding and everything else is fine. Though I don't see how not doing port forwarding relates to not being able to surf. Well, thanks for your suggestions, I'll try playing with the global connections and limit it to a lower number.

Link to comment
Share on other sites

Hi there,

I recently got my Xavi router replaced with ZXDSL router and all hell broke loose.I experienced the same problems which the author of thsi post described. Now I got that router relaced with D-LINK DSL-1031 router. Now my utorrent says that the ports (32459) is closed and shows red. My dowload rate has come to knees. I am unable to comfigure this router and at the same time not compromise my surfing.Somebody help me.I tried portforward .com and this model router was not in the list.The interface is different from what they gave.

Somebody help me how to set things properly! Thanks in advance.Can I use the telnet srcipt tool mentioned in this post? if yes, how should I use it? pls explain in detail.Thanks in advance :)

Link to comment
Share on other sites

  • 2 weeks later...

You mentioned making a bat file and I attempted to make one also (after a good look on google for answers) but mine didnt appear to work. I have XP and the moment I ran the bat file cmd opened and closed in about a second. What are the contents of your bat file? Any help would be much appreciated.

Link to comment
Share on other sites

  • 4 weeks later...

Not exactly a batch file but make a shortcut to your tst10.exe. Change the target to something like this:

C:\WINDOWS\system32\cmd.exe /c start "TST10" "****" /r:nat_sessions.txt /m

**** is whatever you have in the target box originally - it should be the exact path to the executable and remember the quotes. Change nat_sessions.txt if you named the text file to something else of course but since everyone seems to be following the OP instructions, I'll leave it at that.

I think this works - I'm not relatively sure since my Netgear rp614v2 doesn't allow a telnet login to my knowledge. Oddly enough, the router has problems with only the utorrent BT client. 6.1 RC5NA for v2 and v3 doesn't work either with or without this. 6.1 RC3NA seemingly works with this but I have no real evidence of this yet and need to test further. I don't recall if I tried this with the 5x firmware line for v2 but I don't think it works there either and I didn't try the 6.0 line for v2/v3. Maybe some other rp614v2/v3 user can point us in the right direction. :P

Link to comment
Share on other sites

  • 4 weeks later...

Can somebody tell me how excactly can i do it. I don't have idea , what programs shall i use?

An something else do i have to replace the word password or to write after password: ?

Is the ip that i have to use the router ip 192.168.1.1 or my pc through netwrok ip 192.168.1.5?

As you can understand i am less than a starter. So if please can tell me step by step what excactly i have to do i will appreciate it.

Thanks

Link to comment
Share on other sites

  • 2 weeks later...

i am using D-link DCM-202....the green light is there however the speeds are totally incredibly slow! ( 0.0-5.0 kB/s )....wat shud i do? can the problem be wif the seeds ( onli a few are active or online )and not the router...? plz help

i also tried looking up on portforward.com and found out that my modem model isnt there.....help!

any help will be really appreciated! =)

Link to comment
Share on other sites

Hello.

I tried to do this but I just dont get it. I have a D-Link DSL-G604T.

I go to the run command and write telnet 192.168.1.1 then paste the script (modified with my password). is this right or am I doing wrong. Or can I put the text file direct to the TST10.exe?

And yes i used google but it didnt help me.

Anybody?

Thanks in advance!

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

I have a D-link DI 624 router and I'm experiencing the same problems as mentioned on the first page of this thread.

I tried the telnet script created for the DSL-G604T but apparently it does not work.

Well, I'd be perfectly happy if I could restrict the amount of total connections to 50 or 40 in order to fix this, which should

actually be sufficient - for torrents that have less than about 150-200 seeds+peers it is. Alas, many popular torrents have

e.g. 1200/3000 or so :/ - In fact it is nearly impossible for me to reach better up/down-rates as the damn thing crashes every

2 minutes ^^ (as soon as it succeeded to establish a nice bunch of connections it crashes again)

I'd be glad if one of you as your expertise exceeds mine by far could offer some kind of explanation.

e.g. utorrent does try to connect to all of these 5k people at once and therefore overstrains the router or so ;)

A solution was of course wonderful

greetz

nytr0x

Link to comment
Share on other sites

I have a DI-624 as well and my internet CRAWLS when µTorrent is running -- Even if the TX rate is only 10kb/s. I've tried adjusting max connections within µTorrent, but this hasn't proven helpful.

If anyone knows how to adjust settings within this particular D-Link router to correct this, it would be appreciated.

Also, I get the red "not connectable" icon in the status bar even w/ this system set as the DMZ.

--- EDIT ----------------------

Enabling UPnP within µTorrent allowing the program to set the exception on the router fixed both issues. Status is GREEN and WWW activity is smooth.

Guh.

Link to comment
Share on other sites

hmm, sadly things aren't as easy with my router as with the one of forkspoon.

enabling UPnP only has the effect that the port which is actually already forwarded

in the router settings is recognized to be open by µtorrent a bit faster (a difference of an minute or so) ...

Link to comment
Share on other sites

  • 2 months later...
This problem is extremely easy to identify. You utorrent downloads continue running, all connections continues. For example, a Internet explorer downloads continues with no problem. But "non-continuous" connections stops. You can't ping your router. Your MSN Disconnects. You can't use internet explorer to surf the web. Then this is most probably your problem.

99.9% sure this is my problem (I've got the DI-614+), but just wanted to definitely confirm it before I scuttle off to sort out the solution; when the this issue arises, and you can no longer browse the interwebs, but the torrents will continue, do they stop when uTorrent tries to update the tracker, yes? And turning the router off and on again fixes it (temporarily), right? Like I said, it seems to be the issue I have, but a quick confirmation from someone far more knowledgable about these things would be great.

Also...

D-LINK (& Several other major routers, netgear, linksys, etc.) has a maximum connection threshold. There are several firmware upgrades for improved p2p performance and also some 3rd party firmware.

... do you happen to know of any sites where router/torrent compaitibility is catalogued? I'm more than likely getting a new router because I also have issues with certain aspects of XBox Live, so if there are any sites to give a recommendation that'd be great.

Thanks.

Link to comment
Share on other sites

I don't know if there are any routers or torrent that are compatible. Routers manufacturers generally do not consider BT users and assumes nobody needs that many connections in their default/update firmware.

Your only solution would be get a good custom firmware which u have to google for as I have none in my hands. Or use my method which i prefer. As long as you don't reset or shut down ur router. U just have to do it once.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...