|
saet Apprentice
Joined: 12 Jun 2006 Posts: 106
|
Posted: Mon Aug 07, 2006 10:15 pm
NO-OP Protocol |
CRT has an option where you can send the protocol no-op every N seconds. It keeps a connection alive by asking the server for a response without having to send anything else. Without it I will get disconnected in short time(10-15 minutes I think) on one mud if I haven't received any text from the server. And it doesn't count as input from the user so I'll keep my idle time and people will still know I'm not there.
Any chance this could be added to CMUD? Or perhaps #NOOP for this?
Also, would it be possible to make the Tab key macroable in CMUD or is it still undoable like in zMUD? |
|
|
|
Rainchild Wizard
Joined: 10 Oct 2000 Posts: 1551 Location: Australia
|
Posted: Mon Aug 07, 2006 10:39 pm |
I've asked for these nat keep alive packets to be sent as well, so I think its on the to-do list but not yet implemented. In the mean time I am using a tick timer of 90 seconds which sends a backspace keypress. Usually the MUD doesn't consider this as 'new input' so it keeps your idle time etc - the command is:
#sendprompt %char(8) |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Aug 07, 2006 10:51 pm |
Yes, sending the NAT keep alive packets is still on the to-do list.
And sorry, but the Tab key still won't be macroable in CMUD. The tab-expansion features are being expanded in CMUD (you don't need to hold down the shift key to expand a word from the screen anymore). I suppose I could consider making the tab-expansion feature an option, but it seems like there are plenty of other keys on the keyboard that you can assign macros to. |
|
|
|
saet Apprentice
Joined: 12 Jun 2006 Posts: 106
|
Posted: Mon Aug 07, 2006 11:41 pm |
Definitely understand. I'm probably the only zMUD user who would need such a feature. I can't use more than a key mapped to a single command and CR anyways, so zMUD is a bit overkill. My whole reason for wanting it was just color highlights ;)
|
|
|
|
edb6377 Magician
Joined: 29 Nov 2005 Posts: 482
|
Posted: Tue Aug 08, 2006 1:02 am |
well many muds actually started banning people using idle killing abilities. I suppose each mud is different but some even go as far as banning the account for having anti idle features.
It would be nice to see for those that could use it but i would hope this isnt in the priority column. ^^ |
|
_________________ Confucious say "Bugs in Programs need Hammer" |
|
|
|
saet Apprentice
Joined: 12 Jun 2006 Posts: 106
|
Posted: Tue Aug 08, 2006 1:13 am |
keep alive doesn't kill idling. That's the whole point of it. It just makes sure that the mud won't disconnect you if there has been nothing sent or received. If the mud logs you out if you've been idle for a certain amount of time this will not affect it.
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Aug 08, 2006 2:07 am |
Right...what Saet said is what Rainchild conviced me via email. There is a big difference between sending NAT KeepAlive packets and sending actual data to the MUD. NAT packets are handled at a low level and are *intended* for telnet sessions in order to keep a persistent socket connection open that spans routers. Without the NAT Keepalive packets, a router can decide to get rid of a socket connection. Since web browsing and email (the largest uses of the Internet) do not require persistent socket connections, this allows routers to better load balance and handle lots of connections.
The NAT Keepalive stuff is really only for routers. It does not cause any additonal load on the MUD server itself and does not defeat any MUD's idle timeout system. MUD idle timeouts rely on actual data input from the client, and the NAT packets do not satisfy this requirement. So even with NAT you can still get disconnected from a MUD that has an idle system.
So this achieves the best of both. It prevents routers from messing up the socket connection and causing wierd disconnects, but still allows the MUD server to implement their own idle timeouts.
At least that's the way I currently understand it. Definitely let me know if I'm wrong. |
|
|
|
Rainchild Wizard
Joined: 10 Oct 2000 Posts: 1551 Location: Australia
|
Posted: Tue Aug 08, 2006 2:30 am |
You understand it right, and with more and more people using home broadband it is getting necessary. A lot of the home routers drop connection after 15 mins of inactivity - eg when new data comes in from the MUD after that 15 min of idle, the firewall says "I don't know you" and blocks it, but it never actually sent a "this connection is terminated" packet so both z/cmud and the mud server think you're still connected. So even though technically you have lost link, you won't find out until you try to type something and the router goes 'huh I know of no such connection'.
|
|
|
|
edb6377 Magician
Joined: 29 Nov 2005 Posts: 482
|
Posted: Tue Aug 08, 2006 2:45 am |
hmm weird. I havent run into any routers that will by default drop a telnet connection unless there is no activity from the mud. And since all muds send things intermittantly from auction channels and shouts to tells people walking through rooms etc I havent experienced that problem. I leave my muds connection both at home and at work for 2 hours at a time and they only drop when the mud kills it. Could be how i have it configured. As an IT professional its possible i have mine setup to avoid this problem. I would have to check.
It just makes sure that the mud won't disconnect you if there has been nothing sent or received.<-- wouldnt that be why a mud would disconnect you and thus you would be circumventing it.
I really didnt realize that was even an issue. Most muds default to 15 or 30 minute inactivity timers.
Code: |
The sole purpose of sending NAT-keepalive packets is to keep
NAT mappings alive for the duration of a connection between
the peers. Reception of NAT-keepalive packets MUST NOT be
used to detect liveness of a connection.
A peer MAY send a NAT-keepalive packet if there exists one
or more phase I or phase II SAs between the peers, or such
an SA has existed at most N minutes earlier. N is a locally
configurable parameter with a default value of 5 minutes.
A peer SHOULD send a NAT-keepalive packet if a need to send such
packets is detected according to [Kiv00] and if no other packet to
the peer has been sent in M seconds. M is a locally configurable
parameter with a default value of 20 seconds.
|
MUDs usually don't implement the full telnet protocol. Even if telnet does have a special keep-alive directive (using an escape character, for instance) then the MUD still has to support and hence process it. After all, what you're sending the MUD is a stream of bytes; the MUD then decides what to do with this stream of bytes. E.g. interpret it as telnet directives, or interpret it as characters, etc.
I think that unless you find a way to do this on a TCP/IP level, what you're asking is impossible. And apparently (see http://home.student.uu.se/j/jolo4453/projekt/tcpip1/tcp_keep.htm) the keep-alive feature of TCP/IP is not a part of the specification. It would only work if both the client and server implementations support it.
Why is it such a bad thing to let the MUD know you're active? Is it to maintain AFK status or something like that?
Unless the server implements some special handling in layer 2 of 'keepalives', such that it basically throws them away and does not consider them for the idle timer, what you ask is impossible in layer 2 of communication. Even when it is possible, it is specific to one server code base in particular that handles this particular keep-alive.
Layer 1 (TCP/IP), then, is your only hope. As I mentioned, TCP/IP does appear to have a non-standard keep-alive extension. This has nothing to do with combat MUDs, social MUSHes, MUSHclient, the server, etc.; in other words, it has nothing to do with what MUSHclient itself supports or not, and it has nothing to do with what the server supports.
It depends on the TCP/IP implementations on both the client and server machines. If both support the keepalive extension, then that's great and there are no problems. If however neither support the extension, then nothing will happen either. But if only one supports the extension and starts sending keepalives, what is going to happen? The best case is that the other side will ignore the keepalives; the worst case is that it'll interfere with the connection data and the non-supporting side will treat the keepalives as actual data, which is very wrong
Your best bet is to talk to your game administrators and ask them if their code supports any kind of keepalives that don't interfere with their idle counter. |
|
_________________ Confucious say "Bugs in Programs need Hammer" |
|
|
|
saet Apprentice
Joined: 12 Jun 2006 Posts: 106
|
Posted: Tue Aug 08, 2006 2:53 am |
Ahh yes. I was definitely wrong with saying the mud disconnects you.
Is it possible for the cable/dsl modem to do this also? I have always had a router set up to them and when I switched from cable to dsl I'm pretty sure I used the same router. That is when I started getting the 15 minute connection drop. I never had that happen with my cable. |
|
|
|
saet Apprentice
Joined: 12 Jun 2006 Posts: 106
|
Posted: Tue Aug 08, 2006 3:02 am |
edb,
Yeah, I want to maintain my idle time so people don't think I've recently been active and try to talk to me. It's real annoying, one guy always used to always send a look every 10 minutes and it was impossible to tell whether he was active or not. Plus he would always show up on "who active". It's basically a chat mud now so it's a nice thing to have.
I can't get that link to work by removing the ) at the end or changing projekt to project. |
|
|
|
Rainchild Wizard
Joined: 10 Oct 2000 Posts: 1551 Location: Australia
|
Posted: Tue Aug 08, 2006 3:04 am |
It definately needs to be a toggle-able option, but it should be there none the less. PuTTY has keep alive packets, so why shouldn't CMUD? It's an IAC xxx xxx sequence so any mud engine worth a grain of salt will have some kind of 'ignore unknown IAC sequence' and not translate it as user text.
These packets are to keep alive the connection but not intefere with MUD idle-out policy, for example gods on my MUD do not ever get idle-disconnected, however if they're sitting in a quiet room with the main player channels turned off, NAT will drop them due to inactivity.
For a player we have a 30 minute policy, but to keep their connection alive a player might put in some kind of 'issue a look command every 5 minutes' which will also keep their idle time at less than 5 minutes thereby circumventing the 30 minute inactivity timer. If there was keep alive packets then they wouldn't need a 'look' timer and they would be dropped at the 30 minute interval as they should.
And for a business / zTelnet implementation they will need keep alives for things like command shells that do not have idle timeout policies. |
|
|
|
edb6377 Magician
Joined: 29 Nov 2005 Posts: 482
|
Posted: Tue Aug 08, 2006 7:23 am |
I am not arguing the fact that it should or shouldnt be there at all. I dont think its priority thats the only statement i have made to that regard. However i do think its un-necessary. Heres more info for you that may help understand why.
However it sounds more like they need to fix a setting somewhere. Out of the 38 machines i have in my office none of them drop. Neither do the 4 i have at home.
That is what i am confused about. This should be a setting in the router or operating system and both have to be set properly. It would be ashame to add some unnecessary coding simply because someone doesnt want to adjust their settings. That is what i am trying to understand.
Most routers have a keep alive setting (Idle Time out Setting) etc. In addition the default on almost all linksys and dlink routers is 2 hours idle timeout on telnet ftp and ssh. Also realize firewalls can institute and modify that setting as well. What this means is even if instituted it would default to the operating systems defaults and without making changes to the specific settings for Windows or Linux the problem would still exist. Routers and firewalls can also block the return packets and sent packets of this nature without configuration as the defaults arent normal. Routers default typically to 2 hours etc. But the problem doesnt change cause zugg adds a send packet command. In the end the operating systems control such things. Adjusting defaults to below the connection break limit you are trying to surpass to defeat nat tends to help.
Code: |
Unfortunately, this is not entirely bullet-proof, because the keep-alive feature is optional for TCP connections, and not all operating systems implement it, nor does every application make use of it.
This setting controls how Windows manages connection keep alive transmissions. Specifies how often TCP attempts to verify that an idle connection is still intact by sending a keep-alive packet.
|
EXAMPLES:
WINXP/Win2k - Adjusted using most TCPIP connection programs
http://www.winguides.com/registry/display.php/891/ for more info
Code: |
KeepAliveInterval
Key: Tcpip\Parameters
Value Type: REG_DWORD - Time in milliseconds
Valid Range: 1 - 0xFFFFFFFF
Default: 1000 (one second)
Description: This parameter determines the interval that separates keepalive retransmissions until a response is received. After a response is received, KeepAliveTime again controls the delay until the next keepalive transmission. The connection is aborted after the number of retransmissions that are specified by TcpMaxDataRetransmissions are unanswered.
KeepAliveTime
Key: Tcpip\Parameters
Value Type: REG_DWORD - Time in milliseconds
Valid Range: 1 - 0xFFFFFFFF
Default: 7,200,000 (two hours)
Description: The parameter controls how frequently TCP tries to verify that an idle connection is still intact by sending a keepalive packet. If the remote computer is still reachable and functioning, the remote computer acknowledges the keepalive transmission. By default, keepalive
|
Linux
Code: |
The TCP KeepAlive value is stored in the "proc" filesystem (actually a virtual filesystem maintained by the kernel) under this path:
/proc/sys/net/ipv4/tcp_keepalive_time
The default just happens to be 7200 seconds (same as the BEFSR41 timeout). To defeat NAT it must be something smaller than that, like 1800. Setting it to a really small value like 60 is frowned upon as a bad network administration practice, especially if you are running a server.
So to change it all you need to do is this:
echo "1800" > /proc/sys/net/ipv4/tcp_keepalive_time
You have to put this in a startup file like "rc.local" to make it permanent.
|
Win 95/98/ME - http://www.winguides.com/registry/display.php/731/
This is the information im trying to get you to understand and take into consideration and what can be done to resolve this issue until such time as Zugg decides (if its even necessary) to institute the settings and in addition link it to the operating systems specific settings and then also adds the capability to properly configure the router. Its not just a 1 setting fix. Personally for me i think educating people that have this problem by informing them of the o/s settings makes more sense. Defaults don't work and people need to learn to change them. You wouldnt leave your default password on your router would you?
Saef - Depends on how much your setup changed. I.E. is it the same router, does the dsl modem have a configuration setting or software. Did the setup for the dsl modify the windows KEEP ALIVE settings. |
|
_________________ Confucious say "Bugs in Programs need Hammer" |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Aug 08, 2006 4:37 pm |
From what I've seen from some support email where this was causing a problem, it wasn't the end-users computer or router that was dropping the connection, but was a router/firewall being used by an ISP. Seems that some ISPs set the timeouts lower and assume that home users are doing web surfing and email and don't need persistent connections.
As you mentioned, in Windows the default value is 2 hours and I've dealt with users who's ISP was dropping them after 15 minutes. And as Rainchild said, the problem was that the connection still thought it was open until the user came back and tried to send a command to the MUD, at which point the connection timed out.
And what we are talking about here is not messing with the TCP settings, but simply sending the IAC sequence that Rainchild mentioned. Any MUD that handles telnet will support this. And any MUD server that doesn't ignore IAC is a really old, bad MUD code base. Even if MUDs don't understand telnet option negotiation, the vast majority know that they need to at least ignore IAC sequences.
But yes, it would still be an option, and would be off by default. It's not a big deal. It's going to get implemented when I strip out the 10-year old home-grown Winsock code that I've been using and update it to use Indy and the SecureBlackBox SSH stuff. Once the network code has been swapped, supporting KeepAlive is just a matter of turning on that property in the Indy code. So it's not very much work at all. |
|
|
|
Zhiroc Adept
Joined: 04 Feb 2005 Posts: 246
|
Posted: Wed Aug 09, 2006 3:45 am |
edb6377 wrote: |
However it sounds more like they need to fix a setting somewhere. Out of the 38 machines i have in my office none of them drop. Neither do the 4 i have at home.
That is what i am confused about. This should be a setting in the router or operating system and both have to be set properly. It would be ashame to add some unnecessary coding simply because someone doesnt want to adjust their settings. That is what i am trying to understand. |
At home, I use a Netopia router for my NAT. I have no problems, and can stay connected for up to 2 hours on one MUSH completely idle. However, I went to a B&B inn that happened to provide Internet connectivity using a Linksys wireless hub, and wham, I got booted every 10 minutes or so.
It's been a while since I used my Linksys wireless router, but I don't recall lots of parameters to tune. |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Wed Aug 09, 2006 6:55 pm |
Some of my SSH connections have 5 minute threshholds.
It would be nice to be able to specify when these keep-alive packets should be sent :) |
|
|
|
|
|