I know that NetOS 7 defaults to having the Keep-Alives OFF, does anyone know what the default for NetOS 6 is? I have been monitoring a NetOS6 device and a NetOS7 device to determine this, but there is so much data that I am overwhelmed.
Keep Alives in 7.4 (I don’t know about 7.5) are off unless SO_KEEPALIVE is called to turn them on. I am reading this from the documention myself. 6.x doesn’t say.
Did anyone saw any TCP Keep Alive packets under wireshark?
I suspect that this functionality doesn’t work at all (7.4):
int optval = 1;
setsockopt(listen_socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&optval, sizeof(optval)) ;
NAIpSetKaInterval(5);
TCP Keep Alive works, but you have to call NAIpSetKaInterval before creating a socket and set SO_KEEPALIVE option after creating it. This information should be in the manual.
The docs (the CHM) don’t appear to mention the need to set SO_KEEPALIVE - just says “Overrides the default value for the TCP keepalive interval, which by default is 2 hours (7200 seconds). If ka_interval == 0, keepalive is turned off.” for NAIpSetKaInterval()
I have just spent 24 hours testing with Wireshark. Mabro is correct. Set the time with NAIpSetKaInterval(), then after connecting on the socket, use SO_KEEPALIVE to activate the Keep-Alive.