[OpenSIPS-Users] Why does NAT keepalive only work for UDP?

Iñaki Baz Castillo ibc at aliax.net
Mon Dec 15 12:43:12 CET 2008


El Lunes, 15 de Diciembre de 2008, Bogdan-Andrei Iancu escribió:
> I think the question is not from technical point of view, but more a
> logical one. Like known issues not to do TCP ping; does TCP ping may
> help after all? how TCP ping and TCP keepalive work?

For me there is no different with UDP:

UDP)
- Alice sends a UDP registration.
- Alice is pinged via UDP with OPTIONS/NOTIFY from OpenSips using the existing 
UDP """connection""".
- If the ping doesn't arrive in a predefined interval then alice is 
considered "unreachable" and the ping is not sent anymore (not sure if 
OpenSips implements it, maybe the nat_traversal module does it?).

TCP)
- Alice sends a TCP registration, so there si a TCP connection with alice.
- Alice is pinged via TCP with OPTIONS/NOTIFY from OpenSips using that 
connection.
- If the ping fails due to TCP error (or TCP timeout) then alice is 
considered "unreachable" and the ping is not sent anymore.


At the end, I see no difference between two cases (perhaps TCP is more complex 
due to connections pool and so, but the concept is similar). Also, if 
OpenSIPS receives a notification from the transport layer telling that a TCP 
connection has been ended, then it could in that moment destroy any existing 
pinging process over that connection. Is not feasible?

Regards.


-- 
Iñaki Baz Castillo



More information about the Users mailing list