Help diagnose a connection problem?

Posted by Kefkakrazy on Wed 26 Oct 2011 05:38 AM — 23 posts, 88,835 views.

#0
Okay, so this isn't your "typical" connection issue; I've run through Gammon's very helpful network guide in the getting started subforum, and it doesn't address my specific problem.

Note that I DO have some idea what I'm about when it comes to configuring a network, so don't be afraid to get a bit technical. With that in mind, let me explain the trouble.


I have recently begun experiencing an issue with my connection to the MUD I currently actively play on. This issue began when I moved, and no other players report a similar issue; because I'm certain of both of these things (that the problem did not exist prior to the move), I'm convinced that the problem is local to me and does not have to do with the MUD.

My connection is broadband cable, ten megabits, pretty standard. I am running a home network, secured, through a Dlink Wireless N 300 router; the computer does, however, have a direct cable connection to the router itself (wireless signal is not a relevant issue).

Now to describe the symptoms:

I have not been experiencing any problems with any other application; only MUD connections.

The client connects to the MUD without issue, but during play, the connection will randomly drop; world output will cease. If I attempt to send a command to the world, MUSHclient will immediately realize that the connection is dead and offer to reconnect; it will not, however, pick up on the dead connection until I attempt to send a command.


I believe that it has to do with the configuration of this network, though I'm at a loss to describe what would cause this type of periodic disconnect (most network problems I'm familiar with would simply prevent me from connecting in the first place).

So can anyone help me diagnose this issue? I'd greatly appreciate it!

If anyone needs it, I can post whatever supplementary information needed. The network (currently #1 on my list of probably causes) is WPA2-secured and my desktop has a static IP on the network.
USA #1
Does it happen after idling for a while (say, ten minutes or longer)? If so, you might try enabling the tcp_keepalives option to keep your connection alive.

Template:post=9912
Please see the forum thread: http://gammon.com.au/forum/?id=9912.
Amended on Wed 26 Oct 2011 06:39 AM by Twisol
#2
I don't usually detect it unless I've BEEN idling for a short time, but ten minutes is not the length of time (I've had it happen while I switched over to another window to do searches on, amusingly enough, the possible causes of this problem).

I will try the tcp_keepalives option tomorrow, though. That's one for the list, thank you.
#3
Doesn't seem to have solved the problem. Any other suggestions?
Australia Forum Administrator #4
I think this is almost certainly the router. We have had a number of reports about this before.

First, MUSHclient doesn't ever attempt to disconnect you (unless you are running some specific plugin designed to do just that).

Second, if the operating system decided to drop the connection I believe it would generate a "connection lost" message which would be detected by the client, and then reported to you.

What operating system are you using?

Quote:

This issue began when I moved ...


Did you move the router, or is this a new one?

What I think happens is, that if the router disconnects you for inactivity, it quietly drops the connection to the MUD. However the operating system, nor client, realize this because they are not trying to send any packets.

Next time that you type something (ie. a command into the MUD) the command is sent to the router which then responds "connection reset". That's why you always notice when you send a command, and not while you are sitting there.

Quote:

... during play, the connection will randomly drop ...


Is there some pattern to this? Like, it is at least 5 minutes into a session?

I would have thought the keep-alive packets would help, make sure you restart the client or it won't take effect.

Failing that try to find a router configuration page which lets you disable timeout on inactivity.

If that doesn't work try to work out the minimal interval for sending things to stay connected, and then make a timer that sends something (eg. "look") every interval (eg. every 5 minutes). A slightly smarter system could detect if you have typed in something anyway, and not send the "keep alive" message if you are actively playing.

I seem to recall some plugin being made along those lines.

The other thing is, a while back I had a Linksys router here. It all worked fine, we had no problems with it. Then I upgraded to a "better, faster, super-duper" router which was a different well-known brand.

Now despite my more-or-less knowing what I am doing when it comes to routers, almost from day one we had major problems. My kids would say "Dad, we lost the connection" to the online game they were playing, over and over. And that was changing nothing at all in our setup, except the router.

I finally took it back and got my money back, and went back to the Linksys router. Since I did that all the problems stopped.
#5
I am also fairly certain it's the router; the router is new, and I knew enough at the start to figure that the problem was almost guaranteed to be local, with the router being the most likely problem source there.

I'll try restarting the client and seeing if that gets the keepalive packets going. I'm not having any problem with any other online games, but I also don't have the idle periods with those games that I do with the MUD.

Testing now for the restart-client fix for keepalive.
#6
I seem to be having issues actually activating the keepalives option; that may explain why it doesn't seem to be working for me.


The instructions I've seen are to paste the following,

check (SetOption ("send_keep_alives", 1))

into the ctrl-I "Immediate" window.

However, when trying to do so, the Immediate window gives an error message:
Quote:

Error number: -2146828275
Event: Execution of line 1 column 1
Description: Type mismatch: 'check'


Called by: Immediate execution




I've also tried the /SetOption method in the topic linked above, which resulted in,
Quote:

Error number: -2146827244
Event: Execution of line 1 column 34
Description: Cannot use parentheses when calling a Sub

Line in error:

SetOption ("send_keep_alives", 1)
Called by: Immediate execution



Is there a line I can simply edit into the worldfile with a text editor to produce the desired effect? I'd like to rule out the keepalives as a solution before moving on to fiddling with my router's settings, and to do that I'd like to ensure that I've actually managed to set them up correctly.

Thanks for the time, guys.
Australia Forum Administrator #7
Sounds like you are using VBscript. Those instructions are if you have Lua as your script language.

However regardless of language you can use the config_option_changer plugin:

http://www.gammon.com.au/forum/?id=10483

That should be supplied with MUSHclient, so just install the plugin.

Then activate the option "Send keep-alives".
#8
Looks like keepalives is doing the trick, now that I actually have it going.

Thanks for the time... This is why I really like MUSHclient; the support is spectacular! Even over minor issues like this.
Amended on Thu 27 Oct 2011 02:46 AM by Kefkakrazy
USA #9
Glad to hear it's working. :D
#10
Hrm, it seems to be acting up again... except now, it does disconnect by itself.

What I think may be happening now is that the keepalive is causing it to recognize the disconnect...


Hmm...


Also: Achaea, Twisol? It's been so long since I played that... Good times!
USA #11
Kefkakrazy said:
What I think may be happening now is that the keepalive is causing it to recognize the disconnect...

That sounds likely. If you're getting disconnected even with keepalives, it sounds like a bigger issue than simply dropping idle connections... If I were you, I'd explore the router firmware to see if there's anything relevant.

Kefkakrazy said:
Also: Achaea, Twisol? It's been so long since I played that... Good times!

Yep! :)
Australia Forum Administrator #12
Now that you get the "disconnect by itself" behaviour, can you work out a pattern? Surely it isn't random? There must be some sort of time limit.
#13
Hmm...


What is the interval on the tcp_keepalives?

And does that interval begin from the last command sent from that world, or does it follow its own internal timer irrespective of user input?
Amended on Fri 28 Oct 2011 10:27 PM by Kefkakrazy
Australia Forum Administrator #14
Two minutes I believe. I looked it up when I amended the "connection problems" page.

I think it would be independent of what you are doing at the time.

So I suppose if you sit there doing nothing, you would get a timeout (detection) with a granularity of two minutes (not necessarily from when you last typed something).
Australia Forum Administrator #15
If you go to Amazon web site, search for your router, expand to "see all reviews" and look for "timeout" you see some interesting comments. Pretty much what I experienced with my earlier router. Also read some of the other reviews.
#16
The D-link DIR-615 router? I'm not finding any reviews with the keyword "timeout."

(I realize that's different from what I put in the OP, but the Amazon search pointed out that it's listed under a different title than "N 300".)
Amended on Fri 28 Oct 2011 11:17 PM by Kefkakrazy
Australia Forum Administrator #17
http://www.amazon.com/D-Link-DIR-815-Wireless-Dual-Router/dp/B0042X3F76

Click on "See all xx customer reviews" (currently 22 reviews).
#18
I'll point out that the one you linked is not precisely the same model as mine; you're looking at what appears to be mine, with an added dual-band feature, while mine is the plain single-band version...


Still testing some stuff. But at this point, I AM pretty sure it's the router, so... Hmm.

The odd thing is... The MUD stays connected much longer if I'm actually looking at it. If I switch windows, it drops faster... Odd...

Maybe that's the router prioritizing active traffic over the "idle" traffic?
Australia Forum Administrator #19
I don't see how the router could possibly know which window is active.

Can you give a figure for the time it takes to drop out?
#20
I've been trying to quantify it (which is why I haven't been answering that question), but it's... kinda unpredictable, honestly.

Sometimes it goes out within a couple minutes of switching, other times it's made it ten or so...
#21
Doing a few tests to see. Will edit this post with the results as they happen.

In each, I'm going to connect, tab through the MUD's intro screens, then wait until it registers a disconnect.

First trial: 11'50".
Second trial: 3'32".
Third trial: 8'10"
Fourth trial: 2'19".
#5: 8'41"

So you see why I'm boggled.
Amended on Sun 30 Oct 2011 03:10 AM by Kefkakrazy
#22
Think I finally nailed the problem; finally found an option for the thing's firewall regulation that seems to have done the trick.

It seems to have been doing some filtering of TCP and UDP connections... disabling those options seems to have solved my disconnect issue. Will update if this turns out to not be the case, otherwise... Thanks for helping, guys!