[Live-devel] live555 can't transport UDP packet through NAT

kingaceck kingaceck at 163.com
Thu Oct 10 02:08:35 PDT 2013


HI

I put the live555MediaServer in a CENTOS computer that ip is 129.1.7.201. Then put testRTSPClient also in a CENTOS 
computer that it is behind a NAT(TP-LINK wireless router,a NAPT device) and its ip is 192.168.1.1.
I run ./testRTSPClient rtsp://129.1.7.201/test.mpg command and the testRTSPClient can't receive UDP packet.

                  live555 Server S (129.1.7.201)
                          |
                          |
                          |                                            
NAPT A (WAN IP:129.1.7.100   LAN IP:192.168.1.1)    
     | 
                          |    
                          |                                             
testRTSPClient A  (192.168.0.20:4000)          



I  have found out the reasons of  this problem:

                         live555 Server S (129.1.7.201)                         
                                               |
          ^  Session 1            ^      |  
          |  129.1.7.201:6000  |       |   
          v 129.1.7.100:10060 v       |    
                                               |
                                              NAPT  A (WAN IP:129.1.7.100   LAN IP:192.168.1.1)
          ^  Session 1             ^     |  
          |  129.1.7.201:6000   |      |  
          v  192.168.0.20:4000 v      |  
                                               |
                                             testRTSPClient A  (192.168.0.20:4000) 

Cient will send client RTP/RTCP port(such as 4000-4001) messge in the SETUP request to the server. But When testRTSPClient send a UDP packet to the server using RTP/RTCP port(4000-4001) after receiving SETUP response  the NAT will rewrite the ip and these RTP/RTCP ports to its WAN ip and ports(such as rewriting to 10060-10061).Then server will send UDP packet to these port(4000-4001) after receiving PLAY command.But the NAT don't know the port(4000-4001) ,because these
 port have already been rewrited to other port(10060-10061).So the testRTSPClient can't receive UDP packet.

Is it right that the server should send UDP packet to the port(10060-10061) what have been rewrited to after receiving PLAY command?




2013-10-10 



kingaceck 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20131010/d718dd8c/attachment.html>


More information about the live-devel mailing list