0

I am facing an issue, having client server application where client application is sending UDP data frequently to server and server redirecting back to the client. But in a few cases I am not getting packets at all on the client side.

I checked on the client side router as it is not receiving any packets, but the server side router is showing it has transmitted the packets to the clients. Then where are the packets getting lost?

Sometimes I have also observed as after some varying time interval, client starts receiving the packet after some time. I have checked server side router and the application and found the difference in the NAT port as server router is receiving from different NAT port but client is still sending from the previous port.

I am not getting why this client NAT port is changing for the active session on server side router..Is this a case of double NAT?

bharat
  • 1

1 Answers1

1

Double NAT is where you have network address translation happening twice in the path from source to destination. e.g. One NAT behind another. It's very unlikely you will have that but sometimes possible. e.g. wifi router doing NAT connected to another network that has a gateway also doing NAT.

UDP is an unreliable protocol. So packets may not arrive at all. The application should be smart enough to handle that.

With UDP apps, usually when a client (behind the NAT) sends a UDP packet to a server through NAT, the NAT opens a port to allow for a response to be received from the server and forwarded back to the client. This is dynamic and will only be open for a set time. You haven't said what NAT you are using so who knows what those timeouts may be.

hookenz
  • 14,472
  • 23
  • 88
  • 143
  • As per ur explanation above, NAT type is dynamic and we are using Juniper router(SSG 5) on both sides of network, Client and server and the timeout which I use to get for any udp session using get session command is 1 minute. But on server side we have dedicated public IP and public port to connect and server side router use to do the port forwarding for the specific port(nothing but public port on which server is running on internal IP). So server side it's like Full cone NAT(i.e Static NAT) and on the client side Restricted cone NAT(i.e Dynamic NAT) – bharat Sep 21 '12 at 05:01