which client ports are used by rtspsrc if it not specified on the port-range property

霸气de小男生 提交于 2019-12-08 03:20:16

问题


I have a request from the network guy wich RTSP client ports are used by the rtspsrc, we didn't set the port-range property on the rtspsrc element.

Can anybody tell me which ports are used the rtspsrc if this property not set? (TCP/UDP). Is there any min max by default or is it the whole range from 1 - 65535.

Thank you guys, Br Christoph


回答1:


I believe this is just the OS specific, dynamic port range. For example on Linux this would be:

cat /proc/sys/net/ipv4/ip_local_port_range
32768   60999

I have no idea how up to date this is, but seems to be generally correct:

https://www.ncftp.com/ncftpd/doc/misc/ephemeral_ports.html

Now, your network admin is probably not going to want to map every single high level port (32768->60999) to your one service. What you'll probably want to do is go ahead and use the port-range property (say 33050->33060) and pass that range over to your network admin. Ask them to create a firewall rule to map that public range of ports to your machine. You should probably only need a few ports for each stream you use.

To perhaps kinda visualize this, say you ask for the above port range:

PUBLIC RTSP SERVER "sometestsrv.com"
554 //initial call to handshake for RTSP made here
50000 //RTP port for client 1 (somecompany.com:33050)
50001 //RTCP port for client 1 (somecompany.com:33051)
50100 //RTP port for client 2
50101 //RTCP port for client 2
...

PUBLIC IP FOR YOUR COMPANY "somecompany.com"
33050 //RTP port matching sometestsrv.com:50000
33051 //RTCP port matching sometestsrv.com:50001

YOUR SERVER "192.168.1.33" w/rtspsrc INSIDE "somecompany.com"
33050 //RTP port matching sometestsrv.com:50000
33051 //RTCP port matching sometestsrv.com:50001


来源:https://stackoverflow.com/questions/49112676/which-client-ports-are-used-by-rtspsrc-if-it-not-specified-on-the-port-range-pro

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!