Android IOS WebRTC Audio Video Development Summary (41)--QQ and WebRTC hole ability PK

Source: Internet
Author: User

Many people know that WEBRTC hole ability is very strong, in the end how strong but do not know, the better way is to compare with QQ, but most companies are difficult to simulate a variety of network environment for testing, such as Unicom, CRC, telecommunications, mobile, so this time, please little sister in the laboratory under a more comprehensive test, and sorting out the test results for your reference, support the original, the article from the blog Garden Rtc.blacker (author: trimeresurus), reprint must explain the source, more details see www.rtc.help.

Before we introduce the test results, let's take a look at WEBRTC's peer architecture:

Principle Introduction :

The 1,peer interacts with the stun server using the stun protocol, and the stun server returns the peer's public address in the form of [Ip:port].

2,l and R both acquire their own LAN address and public address and send it to each other via the signaling service, and each has an address to each other.

3,rfc5245 define these addresses as candidate, and perform a hole test after sorting candidates in order of priority for LAN > Extranet > Turn addresses.

4, the hole is the process of the two sides continue to each other's port package, can receive the other side of the packet, but also to receive their own sent out of the package, indicating the success of the hole. Otherwise failed, forwarded via turn.

Test Description:

At the beginning of the test, I thought Nat was in the router, trying to configure the various types of NAT by setting up the router, so that it could be tested in a comprehensive way.

However, the result is that the NAT setting on the router refers to the implementation of static conversion, dynamic conversion, port multiplexing, and all kinds of information and consulting related personnel did not find exactly where to set the network full Cone NAT, Restricted Cone NAT, Port Restricted Cone NAT, symmetric NAT four types?

Finally, the conclusion is that NAT functions are usually integrated into routers, firewalls, ISDN routers, or separate NAT devices, or by the operator, presumably because we can't touch the changes!

If you want to test all NAT scenarios, taking into account the multi-carrier situation in China (for the time being only CRC, Mobile, Telecom, Unicom), and each network has four types such as full con, then the theoretical test quantity is: Combined number C (4*4,2) = 120, multiplied by 8 midfield scene (Figure 2), Finally, there are 960 cases. However, it is quite difficult to complete all situations, and the network environment that the actual lab can provide is:

1,pc4-5:full Cone CRC

2,pc4-6:symmetric Unicom

3,pc4-7:port Restricted Cone Telecom

4,l-014-wifi:full Cone Telecom

These nets are only one router access, in different intranet.

The type Detection tool uses the Stun_client_app.exe downloaded from the Internet, as follows:

Test method:

1, the local network IP through http://www.ip138.com/detection, the use of packet capture and related log analysis method to determine the QQ video and WEBRTC of the hole success or failure (that is, whether to establish peer-to direct connection) situation.

2,WEBRTC: The Peerconnection_server and peerconnection_client tests were used, but the stun server address was modified to stun.voipbuster.com.

3,QQ: Directly open two QQ for video communication (when peer fails, it is forwarded using a relay server).

Test results:

Results Analysis:

1, in addition to pc4-5, the rest of the results are consistent with expectations.

Among them, Pc4-5 's CRC network, clearly measured out is the full cone type, but happened to be inconsistent with the results, the reason is that the CRC network with multi-export IP, with the following simplified simulation diagram to illustrate.

Description: Existing two clients A and B, the network addresses after Nat are Publicipa and PUBLICIPB, respectively.

After the real communication, in the A-side grab packet see the other address is PUBLICIPB, it is considered to be direct, but in the B-side capture packet display of the other address is a strange ip--publicipa2,

looks like a through a transit server, so there is one end of a direct connection at one end of the illusion, the reason is called the illusion, It is because there is no packet in the A-end packet that communicates with the unfamiliar IP PublicIPA2.

Since B is a telecommunications network, so when the connection is established in B, a from the multi-IP selection of the telecommunications export IP (not to say that the CRC will choose the same as the other side of the carrier exports, just say at this time exactly). This multi-IP export can easily lead to the two ends of the direct connection but failed.

2, it is unclear whether the www.ip138.com gets the real carrier type. WEBRTC's stun server obtains the client's NAT extranet address, which I personally feel is the real carrier type it is located in. Because stun is not at home, so there is no multi-operator problem.

The address stun process for ping server stun.voipbuster.com under pc4-5 full cone CRC and pc4-6 symmetric Unicom is as follows:

CRC----(provincial capital)--------------------------Holland

China Unicom----Beijing Unicom-------------------------------

More to add!

Android IOS WebRTC Audio Video Development Summary (41)--QQ and WebRTC hole ability PK

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.