<s>
A	O
keepalive	B-Protocol
(	O
KA	O
)	O
is	O
a	O
message	O
sent	O
by	O
one	O
device	O
to	O
another	O
to	O
check	O
that	O
the	O
link	O
between	O
the	O
two	O
is	O
operating	O
,	O
or	O
to	O
prevent	O
the	O
link	O
from	O
being	O
broken	O
.	O
</s>
<s>
In	O
this	O
case	O
a	O
KeepAlive	B-Protocol
packet	O
can	O
be	O
used	O
to	O
interrogate	O
a	O
connection	O
to	O
check	O
if	O
it	O
is	O
still	O
intact	O
.	O
</s>
<s>
A	O
keepalive	B-Protocol
signal	O
is	O
often	O
sent	O
at	O
predefined	O
intervals	O
,	O
and	O
plays	O
an	O
important	O
role	O
on	O
the	O
Internet	O
.	O
</s>
<s>
A	O
keepalive	B-Protocol
signal	O
can	O
also	O
be	O
used	O
to	O
indicate	O
to	O
Internet	O
infrastructure	O
that	O
the	O
connection	O
should	O
be	O
preserved	O
.	O
</s>
<s>
Without	O
a	O
keepalive	B-Protocol
signal	O
,	O
intermediate	O
NAT-enabled	B-Protocol
routers	I-Protocol
can	O
drop	O
the	O
connection	O
after	O
timeout	O
.	O
</s>
<s>
Since	O
the	O
only	O
purpose	O
is	O
to	O
find	O
links	O
that	O
do	O
n't	O
work	O
or	O
to	O
indicate	O
connections	O
that	O
should	O
be	O
preserved	O
,	O
keepalive	B-Protocol
messages	O
tend	O
to	O
be	O
short	O
and	O
not	O
take	O
much	O
bandwidth	O
.	O
</s>
<s>
Transmission	B-Protocol
Control	I-Protocol
Protocol	I-Protocol
(	O
TCP	O
)	O
keepalives	B-Protocol
are	O
an	O
optional	O
feature	O
,	O
and	O
if	O
included	O
must	O
default	O
to	O
off	O
.	O
</s>
<s>
The	O
keepalive	B-Protocol
packet	O
contains	O
no	O
data	O
.	O
</s>
<s>
There	O
are	O
three	O
parameters	O
related	O
to	O
keepalive	B-Protocol
:	O
</s>
<s>
Keepalive	B-Protocol
time	O
is	O
the	O
duration	O
between	O
two	O
keepalive	B-Protocol
transmissions	O
in	O
idle	O
condition	O
.	O
</s>
<s>
TCP	O
keepalive	B-Protocol
period	O
is	O
required	O
to	O
be	O
configurable	O
and	O
by	O
default	O
is	O
set	O
to	O
no	O
less	O
than	O
2	O
hours	O
.	O
</s>
<s>
Keepalive	B-Protocol
interval	O
is	O
the	O
duration	O
between	O
two	O
successive	O
keepalive	B-Protocol
retransmissions	O
,	O
if	O
acknowledgement	O
to	O
the	O
previous	O
keepalive	B-Protocol
transmission	O
is	O
not	O
received	O
.	O
</s>
<s>
When	O
two	O
hosts	O
are	O
connected	O
over	O
a	O
network	O
via	O
TCP/IP	O
,	O
TCP	O
Keepalive	B-Protocol
Packets	O
can	O
be	O
used	O
to	O
determine	O
if	O
the	O
connection	O
is	O
still	O
valid	O
,	O
and	O
terminate	O
it	O
if	O
needed	O
.	O
</s>
<s>
Most	O
hosts	O
that	O
support	O
TCP	O
also	O
support	O
TCP	O
Keepalive	B-Protocol
.	O
</s>
<s>
If	O
a	O
certain	O
number	O
of	O
keepalives	B-Protocol
are	O
sent	O
and	O
no	O
response	O
(	O
ACK	O
)	O
is	O
received	O
then	O
the	O
sending	O
host	O
will	O
terminate	O
the	O
connection	O
from	O
its	O
end	O
.	O
</s>
<s>
If	O
a	O
connection	O
has	O
been	O
terminated	O
due	O
to	O
a	O
TCP	O
Keepalive	B-Protocol
time-out	O
and	O
the	O
other	O
host	O
eventually	O
sends	O
a	O
packet	O
for	O
the	O
old	O
connection	O
,	O
the	O
host	O
that	O
terminated	O
the	O
connection	O
will	O
send	O
a	O
packet	O
with	O
the	O
RST	O
flag	O
set	O
to	O
signal	O
the	O
other	O
host	O
that	O
the	O
old	O
connection	O
is	O
no	O
longer	O
active	O
.	O
</s>
<s>
Typically	O
TCP	O
Keepalives	B-Protocol
are	O
sent	O
every	O
45	O
or	O
60	O
seconds	O
on	O
an	O
idle	O
TCP	O
connection	O
,	O
and	O
the	O
connection	O
is	O
dropped	O
after	O
3	O
sequential	O
ACKs	O
are	O
missed	O
.	O
</s>
<s>
by	O
default	O
Windows	O
PCs	O
send	O
the	O
first	O
TCP	O
Keepalive	B-Protocol
packet	O
after	O
7200000ms	O
(	O
2	O
hours	O
)	O
,	O
then	O
sends	O
5	O
Keepalives	B-Protocol
at	O
1000ms	O
intervals	O
,	O
dropping	O
the	O
connection	O
if	O
there	O
is	O
no	O
response	O
to	O
any	O
of	O
the	O
Keepalive	B-Protocol
packets	O
.	O
</s>
<s>
Since	O
TCP	O
keepalive	B-Protocol
is	O
optional	O
,	O
various	O
protocols	O
(	O
e.g.	O
</s>
<s>
implement	O
their	O
own	O
keep-alive	B-Protocol
feature	O
on	O
top	O
of	O
TCP	O
.	O
</s>
<s>
OpenVPN	O
over	O
UDP	O
,	O
to	O
implement	O
their	O
own	O
keep-alive	B-Protocol
.	O
</s>
<s>
"	O
Keep-alive	B-Protocol
"	O
devices	O
are	O
used	O
in	O
automotive	O
repair	O
to	O
maintain	O
battery	O
voltage	O
for	O
devices	O
in	O
the	O
vehicle	O
when	O
the	O
battery	O
is	O
disconnected	O
or	O
changed	O
,	O
usually	O
by	O
plugging	O
in	O
a	O
small	O
battery	O
to	O
the	O
vehicle	O
's	O
12volt	O
power	O
outlet	O
.	O
</s>
<s>
Electric	O
clocks	O
often	O
have	O
battery-powered	O
keep-alive	B-Protocol
circuits	O
to	O
maintain	O
time	O
and	O
other	O
settings	O
during	O
a	O
power	O
outage	O
.	O
</s>
