1
00:00:00,320 --> 00:00:01,340
A full duplex.

2
00:00:01,340 --> 00:00:03,140
Communication is established.

3
00:00:03,860 --> 00:00:11,450
UDP is another protocol of transport layer Layer four used primarily for establishing low latency and

4
00:00:11,450 --> 00:00:15,020
loss, tolerating connections between applications on the Internet.

5
00:00:15,050 --> 00:00:21,380
TCP has emerged as a dominant protocol used for the bulk of internet connectivity owing to its services

6
00:00:21,380 --> 00:00:28,640
for breaking large data sets into individual packets, checking for and resending lost packets and reassembling

7
00:00:28,640 --> 00:00:31,100
packets into the correct sequence.

8
00:00:31,220 --> 00:00:38,180
But these additional services come at a cost in terms of additional data overhead and delays called

9
00:00:38,180 --> 00:00:39,080
latency.

10
00:00:39,940 --> 00:00:47,860
In contrast, UDP just sends the packets, which means that it has a much lower bandwidth overhead and

11
00:00:47,860 --> 00:00:54,010
latency, but packets can be lost or received out of order as a result, owing to the different paths

12
00:00:54,010 --> 00:00:57,330
individual packets traverse between sender and receiver.

13
00:00:57,340 --> 00:01:04,450
So UDP uses a simple connectionless communication model with a minimum of protocol mechanism.

14
00:01:05,239 --> 00:01:12,140
It has no handshaking dialogues and thus exposes the user's program to any unreliability of the underlying

15
00:01:12,170 --> 00:01:13,010
network.

16
00:01:13,280 --> 00:01:17,910
There is no guarantee of delivery, ordering or duplicate protection.

17
00:01:17,930 --> 00:01:25,400
UDP is suitable for purposes where error checking and correction are either not necessary or are performed

18
00:01:25,400 --> 00:01:27,020
in the application.

19
00:01:28,300 --> 00:01:35,500
UDP is an ideal protocol for network applications in which perceived latency is critical, such as gaming

20
00:01:35,500 --> 00:01:41,680
voice and video communications, which can suffer some data loss without adversely affecting perceived

21
00:01:41,680 --> 00:01:42,610
quality.

22
00:01:42,850 --> 00:01:49,990
In addition, since its transaction oriented suitable for simple query response protocols such as the

23
00:01:50,020 --> 00:01:56,140
domain name system or the network time protocol, the UDP header is pretty simple.

24
00:01:56,230 --> 00:02:01,300
It consists of four fields, each of which is two bytes 16 bits.

25
00:02:02,070 --> 00:02:08,340
The use of the fields checksum and source port is optional in IPV four.

26
00:02:09,120 --> 00:02:12,420
Are you surprised to hear that the source port is optional?

27
00:02:12,960 --> 00:02:18,440
But don't be because as you know, UDP packet does not expect to get a reply in general.

28
00:02:18,510 --> 00:02:25,380
And again, since UDP doesn't care about the errors, the checksum field is again optional.

29
00:02:26,160 --> 00:02:33,540
Source port identifies the sender's port and the destination port identifies the receiver's port as

30
00:02:33,540 --> 00:02:34,170
well.

31
00:02:34,970 --> 00:02:40,370
And the length field specifies the length of the UDP header and data in bytes.

32
00:02:40,790 --> 00:02:44,900
So now's a good time to compare the two protocols UDP and TCP.

33
00:02:44,930 --> 00:02:46,340
As a brief summary.

34
00:02:46,700 --> 00:02:54,770
Most services on the internet use either TCP or UDP, which are carried end to end across the network

35
00:02:54,770 --> 00:02:59,540
using IP, either IPV four or IPV six.

36
00:03:00,050 --> 00:03:07,490
The transmission control protocol, TCP and user datagram protocol UDP are very different.

37
00:03:08,360 --> 00:03:16,100
TCP is a connection oriented protocol which tries to ensure reliable in-order delivery of packets.

38
00:03:16,650 --> 00:03:23,040
If packets are lost, TCP automatically retransmits them if they arrive out of order.

39
00:03:23,070 --> 00:03:28,260
TCP will resequence them before handing them up to an application.

40
00:03:29,570 --> 00:03:31,910
UDP is connectionless.

41
00:03:32,210 --> 00:03:37,940
The UDP software makes no attempt to associate streams of packets together.

42
00:03:37,940 --> 00:03:43,820
So as far as UDP is concerned, each packet is completely independent, unrelated to other packets.

43
00:03:43,910 --> 00:03:48,530
No attempt is made by UDP for retransmission or resequencing.

44
00:03:48,620 --> 00:03:54,980
If a packet is lost via UDP, it's up to the higher layer application to resend it.

