webrtc - sdp, ice

hankyulee·2023년 3월 12일
0

sdp: session description protocol. IP addresses and ports it will use. the parameters of a 멀티media session(미디어스트림), such as the supported codecs and formats. SDP is primarily used to negotiate the media formats and parameters that will be used during the communication session, such as the types of audio and video codecs that will be used, the quality and 비트레이트,resolution of the media, and other relevant details. In the process of negotiating these parameters, SDP also includes information about the IP addresses and ports that will be used for communication. This information is important because it allows the two devices to establish a direct peer-to-peer connection with each other, rather than relying on a centralized server.

ice: ICE stands for Interactive Connectivity Establishment,ICE is used to establish and maintain a connection between the devices, even in the presence of network limitations like firewalls and NATs. ICE uses a technique called "trickling", in which each device sends a series of "candidate" messages that describe the different IP addresses and ports that can be used for communication.

-> sdp, ice 모두 ip, port 정보 교환이 있지만 , nat에 있는 네트워크의 경우(private ip를 가진 device는 internet환경에서 사용할 수 없으므로, 라우터가 하나의 public ip를 갖게하면서 private ip, port로 이를 구별하여 사용)

nat: private ip, port넘버를 가진 device가 router를 통해 public ip를 가지게 되고 새로운 port number를 할당받고 이를 통해 internet에서 사용되어 destination 에 도달하여 response를 주면 router가 이를 받아서 nat table을 mapping 하여 도달해야하는 기기를 찾기위해 translate한다.

  • 제한된 Nat 환경에 있는 경우 turn server를 이용한다.

  • 다른 network환경에 있는 device들이 ice정보와 stun 서버를 통해 direct로 통신할 수 있도록 한다.

  • Yes, the device uses a STUN (Session Traversal Utilities for NAT) server during the ICE (Interactive Connectivity Establishment) process to determine its public IP address and port number, which is necessary to establish a direct connection with the other device.

udp -> reliable x, order x, 도착에 대한 응답

tcp -> such as packet loss or long delays를 알고잇음. Fast retransmit: If a packet is lost, TCP can use a technique called fast retransmit to retransmit the lost packet

기타 : In the Transport Layer of the OSI (Open Systems Interconnection) model, the basic unit of data is called a segment or a datagram.
A UDP datagram is similar to a TCP segment, but it does not include the same level of control information.

Specifically, UDP does not include a sequence or acknowledgement number, and it does not provide any error detection or correction mechanisms. As a result, UDP is generally faster and more lightweight than TCP, but it is also less reliable.

WebRTC (Web Real-Time Communication) is not a protocol, but rather a set of technologies and APIs that allow real-time communication over the internet, such as video conferencing, voice calling, and file sharing, among others.

WebRTC uses several protocols to enable real-time communication, including the Real-time Transport Protocol (RTP) for media streaming, the Session Description Protocol (SDP) for negotiating communication sessions, the Interactive Connectivity Establishment (ICE) protocol for NAT traversal, and the Datagram Transport Layer Security (DTLS) protocol for secure communication.

Therefore, WebRTC can be seen as a collection of technologies and protocols that work together to enable real-time communication on the web.

시그널링을통해, Once the connection is established, the sender uses the RTP protocol to divide the media into small RTP packets and transmit them over the network to the receiver.

tcp - 연결 지향 전송 프로토콜

Because TCP establishes a reliable virtual connection between the sender and receiver before transmitting any data, it is considered a connection-oriented protocol. This is in contrast to connectionless protocols like UDP (User Datagram Protocol), which do not establish a virtual connection before transmitting data and do not guarantee the reliable delivery of data.

sdp negotiation전에 stun 서버를 통해 자신의 public ip, port넘버를 알아온뒤, negotiation

0개의 댓글