Reputation: 1602
[Questions in bold below]
I have setup Kurento Media Server 5.1.3 in a datacenter behind a firewall running OS Ubuntu 14.04. It has two network cards:
Attached below is the SDP (setRemoteDescription) when my browser connected to Kurento Media Server
type: answer, sdp: v=0
o=- 5487318114793304426 0 IN IP4 0.0.0.0
s=Kurento Media Server
c=IN IP4 0.0.0.0
t=0 0
a=group:BUNDLE audio video
m=audio 59068 RTP/SAVPF 111 0
c=IN IP4 111.111.111.111
a=rtpmap:111 opus/48000/2
a=rtpmap:0 PCMU/8000
a=sendrecv
a=rtcp:59068 IN IP4 111.111.111.111
a=rtcp-mux
a=ssrc:669011897 cname:user39019747@host-6e83e4c2
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=mid:audio
b=AS:20
a=ice-ufrag:YMdK
a=ice-pwd:LyLifK5UeqzPwM91DDj37e
a=fingerprint:sha-256 FF:0F:81:8C:41:4E:B4:B6:C6:D8:36:F3:D6:5F:09:FD:5F:AF:13:B3:9D:FC:12:66:AC:F3:56:D6:5B:0A:73:5D
a=candidate:1 1 UDP 2013266431 111.111.111.111 55239 typ host
a=candidate:2 1 UDP 2013266431 222.222.222.222 59068 typ host
a=candidate:4 1 UDP 1677721855 111.111.111.111 59068 typ srflx raddr 222.222.222.222 rport 59068
m=video 59068 RTP/SAVPF 100
c=IN IP4 111.111.111.111
b=AS:100
a=rtpmap:100 VP8/90000
a=sendrecv
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=rtcp-fb:100 goog-remb
a=rtcp:59068 IN IP4 111.111.111.111
a=rtcp-mux
a=ssrc:138242433 cname:user39019747@host-6e83e4c2
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=mid:video
a=ice-ufrag:YMdK
a=ice-pwd:LyLifK5UeqzPwM91DDj37e
a=fingerprint:sha-256 FF:0F:81:8C:41:4E:B4:B6:C6:D8:36:F3:D6:5F:09:FD:5F:AF:13:B3:9D:FC:12:66:AC:F3:56:D6:5B:0A:73:5D
a=candidate:1 1 UDP 2013266431 111.111.111.111 55239 typ host
a=candidate:2 1 UDP 2013266431 222.222.222.222 59068 typ host
a=candidate:4 1 UDP 1677721855 111.111.111.111 59068 typ srflx raddr 222.222.222.222 rport 59068
I am not sure, but it seems like I am using the following candidate:
a=candidate:4 1 UDP 1677721855 111.111.111.111 59068 typ srflx raddr 222.222.222.222 rport 59068
Am I right?
But given the fact that the IP 222.222.222.222 is an internal IP why does it appears in as ICE candidate?
Why doesn't it pick "a=candidate:1 1 UDP 2013266431 111.111.111.111 55239 typ host"? since this IP is publicly accessible.
When using tools like "nload" to check for traffic, eth0 doesn't have any traffic, and can noticed eth1 got a lot of traffic (video and audio stream)
What does this "a=candidate:4 1 UDP 1677721855 111.111.111.111 59068 typ srflx raddr 222.222.222.222 rport 59068" means?
Upvotes: 3
Views: 2652
Reputation: 1492
We have added an event in current development version (6.4.1-dev). That indicates the candidates that are in use on a webrtc connection. Maybe this can help you debugging your problems.
Upvotes: 2
Reputation: 680
If you are experiencing delays, and you control the client software, you can dictate the order in which the candidates are picked. Some even start directly [A world class Social network] to the TURN addresses before negotiating back to other if possible. If the run in the order of top to bottom there is always a risk.
And if you have a few private interfaces due to VPN or Virtual Networks, it becomes even slower.
Upvotes: 2
Reputation: 5949
The WebRTC client tries all ICE candidates until it finds one that works. There is a priority queue for the ICE candidates which all of the potential addresses are added to. WebRTC tries these one at a time, and once it finds one that works, it uses that candidate for media. WebRTC does not know which address is your public and which is your private, it simply tries candidates until one succeeds or all of them fail.
ICE is designed to create connections in the presence of NAT issues.
Upvotes: 4