UDP, NAT and setting up “connections”

后端 未结 3 1372
情歌与酒
情歌与酒 2021-02-07 15:24

I know the word \"connection\" isn\'t really appropriate when talking about UDP, but...

How does a server (the one with the known IP) get its UDP packets through the Int

3条回答
  •  名媛妹妹
    2021-02-07 15:43

    If you're talking about streaming protocols like SIP or RTSP then the way it works is that the UDP port the client wants the server to send to is specified in the call set up request.

    The server will send to that port and the traffic may or may not get through to the client depending on whether the NAT has translated the clien't choice of port to a different number or not.

    When the server receives it's first UDP streamed packet from the client and if it is on a different port to the one it was sending on then it will switch to it. This lets the UDP from the server get through the NAT since the client has already created the NAT mapping by sending to the server.

提交回复
热议问题