Tel: +86 731-88315979
Fax: +86 731-88440976
Add：188#, Middle Huanbao Rd Yuhua District, Changsha,China
Why Aren't People Using SRT's Rendezvous Mode?
Why Aren't People Using SRT's Rendezvous Mode?
The two devices in Rendezvous mode can negotiate together to establish an SRT session with the same UDP port number.
✦ Usage Scene
The network where the two devices are located has a firewall (or router with the same function). The outside interface of the firewall is set with a public IP address, but it does not have the operation authority of the firewall (namely, port forward cannot be configured). If an appropriate work mode is set up, an SRT session can be made via Rendezvous mode.
Once the establishment of the SRT connection is completed, the SRT source device and the SRT target device start to exchange control information, and then directly use the established SRT channel to transmit data.
With rendezvous mode an SRT connection can be made when there are no forward rules at both firewalls ends, thereby achieving video transmission between the two points. At this time, you need to set the other party's egress public IP and the same port number on both ends. In this way, the two devices will send control information packets to the other party's egress public IP at the same time to establish an SRT connection.
A company once decided to transmit the video signal from Paris branch to London’s headquarter office in real time. It was too late to apply for port forward rules to the firewall, so the devices at both ends could not directly find each other through a specific port of the other party's public IP. About then you can use the Rendezvous mode to finish SRT connection. You need to set the SRT device (encoder) in Paris to Rendezvous mode and set it to export public IP address in London’s SRT device and an unused UDP port number. Moreover, the SRT device (decoder) in London is also set to Rendezvous mode, and set Paris’ SRT device's export public IP address and the same UDP port number, by then the SRT connection can be established.
Network relations between SRT source device (encoder) and SRT target device (decoder)
As is stated above, the SRT connection in Rendezvous mode has already been completed, which seems simple but there is actually network related knowledge based on it. Let ’s briefly discuss how SRT establish a connection across a firewall in Rendezvous mode.
Network security and firewalls, as well know, are esoteric and professional network knowledge. I won’t discuss the in-depth content with you today but I will share something about SRT.
First, we need to be aware that when using Rendezvous mode, the source and target ports of the control information packets sent by the device are the same. In the previous example, the source port of the control information packet sent by the encoder is 12345, and the target port is also 12345. Similarly, the source port and target port of the control information packet sent by the decoder are also 12345. In other words, the same "four" port numbers are necessary to establish an SRT connection across the firewall in Rendezvous mode.
Therefore, the firewall between the encoders and decoders must be ensured that the port number in the packet header is not converted.
In Rendezvous mode, both ends with the same port number establish SRT connection across the firewall
The firewalls we usually see are basically stateful firewalls that can perform state detection. It supports state packet inspection or status view, namely, the function of Connection Tracking. Rendezvous mode, by the way, relies on this function to create a network channel that runs through two firewalls and transmits data in it.
When the firewall is working, it creates a Connection Tracking Table based on the traffic being transmitted and keep it dynamically updated.
For example, in the above figure, the connection tracking table in firewall A records the internal network IP and port number of the source device, the public network IP and port number after NAT conversion, and the target device’s public IP and port of the firewall as follows:
At this time, when a data packet is sent from the opposite end, the connection tracking table of firewall A also records another piece of reverse inbound information, as shown in the following table:
When the reverse data packet arrives at firewall A, the port number sending and receiving the same data will have a "spoof" effect on firewall A, making it think that the received inbound data is a reply message to the outbound data, thus allowing the data packet passes to go through the firewall until the transmission session is disconnected, by which the SRT connection is thus established.
In most scenarios, the network devices we use (firewalls and routers) transfer from LAN IP to public IP with PAT (NAT reload) for address, in which the network devices change the source port number when converting the address. So most of the time the Rendezvous mode cannot be used. It is better to use a router as a static port forward rule - at one end it can be connected with the Listener mode to monitor the forwarded port; at the other end, the Caller mode is used to establish the connection. In contrast, the Rendezvous mode is rarely used.