[OpenSIPS-Users] Best practice for nat_keepalive
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Mon Jun 1 12:22:52 CEST 2009
Hi Thomas,
Thomas Gelf wrote:
> I would like to share some thoughts/questions regarding nat_keepalive()
> from the nat_traversal module. First thing I'm wondering whether I
> should send keepalives only to clients with NAT issues (as reported by
> client_nat_test) or to all of them (even clients without obvious NAT
> issues).
>
I think pinging everybody is a waste of bandwidth, CPU (especially if
you do SIP ping) and I/O.
> The former would save ressources, the latter would make sure that
> clients using STUN behind a non-symmetric NAT router would remain
> reacheable even if their own keepalive mechanism is not configured
> or implemented correctly.
>
if you do complex NAT tests (received port, etc) you should be able to
receive the STUN clients from behind such routers.
> What I'm evaluationg to do is running nat_keepalive for each REGISTER
> and for each initial INVITE request, regardless of how they present
> themselves - but respecting a setting in usr_preferences, allowing me
> to switch keep_alives off per user. I would also put such a switch in
> their web-backend.
>
and how will this work ? what's the criteria for enabling/disabling the
keep_alive for a user? IMO, this is a network matter and the network
props should decide on this.
> Next thing I was reflecting about is the keepalive_interval. I would
> like to set something like 57 seconds, as I've seen routers/firewalls
> closing ports after 60 seconds. Sure, in case one single keepalive is
> lost the port is lost - but hey, who cares ;-p I'm fine with 57 seconds
> as a pragmatic approach, but I'm really interested in your opinions!
>
It should be fine - whatever interval you set, you'll never be able to
rule out the case of loosing the pings on the net :)..
Best regards,
Bogdan
> Best regards,
> Thomas Gelf
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
More information about the Users
mailing list