0% found this document useful (0 votes)
6 views15 pages

Lec-70 UDP (User Datagram Protocol) header in Computer Networks .en

The document discusses the User Datagram Protocol (UDP), highlighting its characteristics as a connectionless and unreliable protocol. It compares UDP to TCP, emphasizing that UDP does not establish a connection before data transfer and lacks features like ordering and reliability. The document also details the UDP header, which includes source and destination ports, and explains the significance of these components in data transmission.

Uploaded by

gekertxertb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views15 pages

Lec-70 UDP (User Datagram Protocol) header in Computer Networks .en

The document discusses the User Datagram Protocol (UDP), highlighting its characteristics as a connectionless and unreliable protocol. It compares UDP to TCP, emphasizing that UDP does not establish a connection before data transfer and lacks features like ordering and reliability. The document also details the UDP header, which includes source and destination ports, and explains the significance of these components in data transmission.

Uploaded by

gekertxertb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 15

WEBVTT

Kind: captions
Language: en

00:00:00.369 --> 00:00:01.400


Hello friends!

00:00:01.440 --> 00:00:02.456


Welcome to Gate Smashers

00:00:02.496 --> 00:00:03.876


The topic is UDP

00:00:03.916 --> 00:00:06.061


That is User Datagram Protocol

00:00:06.101 --> 00:00:10.101


In transport we have seen that two protocols are very important.

00:00:10.141 --> 00:00:12.961


That is TCP and UDP

00:00:13.001 --> 00:00:15.983


So we are talking about UDP in this video.

00:00:16.023 --> 00:00:19.486


That where we use User Datagram Protocol

00:00:19.526 --> 00:00:22.643


We'll discuss about UDP header.

00:00:22.683 --> 00:00:25.568


So first I want to tell you about UDP

00:00:25.608 --> 00:00:27.651


It is a connection less protocol

00:00:27.691 --> 00:00:28.191


Means

00:00:28.201 --> 00:00:30.057


What is meant by connection less?

00:00:30.097 --> 00:00:31.246


Let's say

00:00:32.104 --> 00:00:35.713


Client want to make a connection with the server.

00:00:35.753 --> 00:00:37.453


If client want to transfer data to server or

00:00:37.493 --> 00:00:41.493


if any one machine to other machine

00:00:41.923 --> 00:00:43.865


So what TCP does?

00:00:43.905 --> 00:00:46.068


First it establish a connection

00:00:46.108 --> 00:00:48.471


After establishing the connection

00:00:48.511 --> 00:00:50.511


Data transfer starts.

00:00:50.551 --> 00:00:52.718


But UDP, it is a connection less

00:00:52.758 --> 00:00:53.366


means

00:00:53.406 --> 00:00:55.207


We're not making any connection here

00:00:55.247 --> 00:00:56.911


Its not like a telephone network.

00:00:56.951 --> 00:00:59.308


First it will dial up, then dial tone

00:00:59.348 --> 00:01:00.915


Then there will be a connection, No

00:01:00.955 --> 00:01:02.943


Its like a postal service.

00:01:02.983 --> 00:01:05.141


Means if I want to send any mail

00:01:05.366 --> 00:01:07.670


If I want to send leter

00:01:07.710 --> 00:01:10.227


Then without any making a connection

00:01:10.267 --> 00:01:11.573


I'll simply write the letter

00:01:11.613 --> 00:01:12.938


put it in the envelope

00:01:12.978 --> 00:01:16.408


and simply I'll post that letter

00:01:16.448 --> 00:01:17.680


So we're doing the same thing here,

00:01:17.720 --> 00:01:20.094


UDP is just like a that service

00:01:20.134 --> 00:01:22.457


means it works like a postal service

00:01:23.392 --> 00:01:26.493


What can we assume letter as
00:01:26.533 --> 00:01:27.400
That is a data

00:01:28.440 --> 00:01:29.917


which is known as payload in technical term

00:01:29.957 --> 00:01:31.759


Payload means

00:01:31.799 --> 00:01:33.099


the pure data

00:01:34.494 --> 00:01:37.577


We will put that pure data into an envelope

00:01:37.617 --> 00:01:38.591


What is that envelope?

00:01:38.631 --> 00:01:39.999


TCP header

00:01:40.039 --> 00:01:42.498


Each and every protocol has its own envelope

00:01:42.538 --> 00:01:45.100


Envelope, I'm taking it just as an example.

00:01:45.140 --> 00:01:46.538


Header uses it

00:01:46.578 --> 00:01:50.191


by which that letter reaches it proper destination

00:01:50.231 --> 00:01:53.259


and if I want any funcionality other than that

00:01:53.299 --> 00:01:56.112


Let's say if I'm sending 4 or 5 letters

00:01:56.152 --> 00:01:58.529


So, the 4 or 5 letters that I'm sending

00:01:58.569 --> 00:02:00.734


they should be in order

00:02:00.774 --> 00:02:06.390


None of those letters should not get lost.

00:02:06.430 --> 00:02:08.706


Means I have different funcionalities.

00:02:08.746 --> 00:02:11.426


So, TCP follows all those funcionalities

00:02:11.466 --> 00:02:12.494


But UDP

00:02:12.534 --> 00:02:14.929


The first important point is
00:02:14.969 --> 00:02:16.398
Without making a connection

00:02:16.438 --> 00:02:21.858


We will write the data and their data will be send to the server.

00:02:21.898 --> 00:02:25.566


and I'll simply send that data to other machine.

00:02:25.606 --> 00:02:27.455


without making a connection

00:02:27.495 --> 00:02:30.237


Due to that, the problem I am facing is

00:02:30.277 --> 00:02:32.523


We're not talking about the problem here

00:02:32.563 --> 00:02:35.016


We're simply talking about characterstics

00:02:35.056 --> 00:02:36.672


So that is unreliable

00:02:36.712 --> 00:02:37.791


Unreliable means

00:02:37.831 --> 00:02:39.969


If I am sending some packets

00:02:40.009 --> 00:02:44.009


and from that 1 or 2 packets got lost.

00:02:44.102 --> 00:02:47.240


So UDP doesn't care about that loss

00:02:47.280 --> 00:02:49.478


So it is unreliable.

00:02:49.518 --> 00:02:50.736


Other than that

00:02:50.776 --> 00:02:52.563


there is no ordering

00:02:52.927 --> 00:02:53.989


Ordering means

00:02:54.029 --> 00:02:56.147


If I am sending 3 - 4 packets

00:02:56.187 --> 00:02:57.806


Packet 1, 2, 3, 4

00:02:57.846 --> 00:02:59.428


So there it may happen that

00:02:59.468 --> 00:03:00.908


First I have recieved Packet 3

00:03:00.948 --> 00:03:02.530


Recieved pakcet 4

00:03:02.570 --> 00:03:03.965


Packet 2 reached later.

00:03:04.005 --> 00:03:04.870


Why?

00:03:04.910 --> 00:03:07.867


Because there is no sequence number

00:03:07.907 --> 00:03:11.497


We're not using any sequence number here.

00:03:11.537 --> 00:03:14.753


There were many options in TCP header

00:03:14.793 --> 00:03:17.119


But in UDP header there are only 4 options

00:03:17.159 --> 00:03:19.042


First is Source Port.

00:03:20.033 --> 00:03:21.276


Source port means

00:03:21.316 --> 00:03:23.971


We've already discussed about ports

00:03:24.011 --> 00:03:27.589


That for end to end deliveries we use port numbers.

00:03:27.629 --> 00:03:29.547


What can be the maximum port numbers?

00:03:29.587 --> 00:03:32.579


0 to 2 raise to power 16

00:03:32.619 --> 00:03:34.286


minus 1

00:03:34.326 --> 00:03:38.215


Which is 0 to 65535

00:03:38.255 --> 00:03:41.763


This is the range of ports.

00:03:41.803 --> 00:03:42.807


Out of which

00:03:42.847 --> 00:03:45.590


From 0 to 1023

00:03:45.630 --> 00:03:47.259


are well known port numbers
00:03:47.299 --> 00:03:50.055
After that some of are registered port numbers.

00:03:50.095 --> 00:03:51.680


And then there are some normal port numbers.

00:03:51.720 --> 00:03:54.811


which we use in our system.

00:03:54.851 --> 00:03:56.916


If I am sending a data.

00:03:56.956 --> 00:03:58.546


in my sistem

00:03:58.586 --> 00:04:00.962


Which application is sending data?

00:04:01.002 --> 00:04:03.781


That application will have a port number

00:04:03.821 --> 00:04:05.310


How we get that port number?

00:04:05.350 --> 00:04:06.790


When we open browser

00:04:06.830 --> 00:04:09.825


As we connect to the internet, opens the browser

00:04:09.865 --> 00:04:13.865


There operating system assign me a port number.

00:04:13.938 --> 00:04:17.445


means that browsing application got a port number

00:04:17.485 --> 00:04:21.362


Now, if I am accessing the web server through that port number

00:04:21.402 --> 00:04:23.251


or accessing the FTP

00:04:23.291 --> 00:04:25.825


or simply sending a mail there.

00:04:25.939 --> 00:04:27.484


So there are different port numbers.

00:04:27.524 --> 00:04:29.683


Like if I am sending a mail.

00:04:29.723 --> 00:04:34.080


may be I will use port number 25 for mailing.

00:04:34.120 --> 00:04:36.373


means I will use a destination port number

00:04:36.413 --> 00:04:37.352


source port
00:04:37.392 --> 00:04:39.387
These two options are mandatory

00:04:39.427 --> 00:04:41.258


Otherwise end to end deliveries

00:04:41.298 --> 00:04:43.561


which is the responsibilty of transport layer

00:04:43.601 --> 00:04:45.042


That will not be achieved

00:04:45.082 --> 00:04:48.547


If I do not fill the source and destination port.

00:04:48.587 --> 00:04:51.024


After that comes length

00:04:51.064 --> 00:04:52.007


Length is what

00:04:52.047 --> 00:04:53.281


16 bit

00:04:53.321 --> 00:04:55.216


what I have written here is bit.

00:04:55.256 --> 00:04:57.460


means length of 16 bits.

00:04:57.500 --> 00:05:00.482


But it does not mean that length is of 16 bit.

00:05:00.522 --> 00:05:03.700


the actual lentgh is 2 raise to power 16

00:05:03.740 --> 00:05:05.901


here is 16 bits.

00:05:05.941 --> 00:05:08.145


which use to represent the size.

00:05:08.185 --> 00:05:09.769


but what is actual size?

00:05:09.809 --> 00:05:12.750


Actual size is 2 raise to power 16

00:05:12.790 --> 00:05:15.483


So if I talk about 2 raise to power 16

00:05:15.523 --> 00:05:18.744


If I have a number of 16 bit

00:05:18.784 --> 00:05:22.528


in that 16 bit number maximum number can be

00:05:22.568 --> 00:05:27.260


Maximum number is 65535

00:05:28.897 --> 00:05:30.570


Like if I tell you

00:05:30.610 --> 00:05:32.191


that I have 4 numbers

00:05:32.231 --> 00:05:33.859


Let's say 4 bit

00:05:33.899 --> 00:05:35.349


So how much number did I made?

00:05:35.389 --> 00:05:36.867


2 raise to power 4

00:05:36.907 --> 00:05:39.068


means 16 numbers are made in total

00:05:39.989 --> 00:05:42.416


But in 4 bit

00:05:42.456 --> 00:05:45.989


What will be the maximum number?

00:05:46.030 --> 00:05:48.841


That will be 1111

00:05:48.881 --> 00:05:50.125


that is 15

00:05:50.165 --> 00:05:52.556


means if 16 are my total numbers

00:05:52.596 --> 00:05:54.090


So what is the range?

00:05:54.130 --> 00:05:55.467


0 to 15

00:05:55.507 --> 00:05:57.899


In this 15 will be the maximum number

00:05:57.939 --> 00:05:59.725


0 will be the minimum number

00:05:59.765 --> 00:06:01.367


here also I am writing the same

00:06:01.407 --> 00:06:03.504


2 raise to power 16 means

00:06:03.544 --> 00:06:05.512


where it is in actual?

00:06:05.552 --> 00:06:08.788


0 to 65535
00:06:08.828 --> 00:06:10.779
what is 2 raise to power 16?

00:06:10.819 --> 00:06:13.571


65536

00:06:13.611 --> 00:06:16.183


But what range of numbers have been made?

00:06:16.223 --> 00:06:17.630


0 to 65535

00:06:17.670 --> 00:06:19.759


from this what is the maximum number?

00:06:19.799 --> 00:06:20.474


this

00:06:20.514 --> 00:06:23.115


So the maximum size of the segment can be

00:06:23.155 --> 00:06:25.237


65535

00:06:25.277 --> 00:06:27.299


Which we can call as total length?

00:06:27.339 --> 00:06:30.079


means the total length of whole segment

00:06:30.119 --> 00:06:33.685


that can be maximum up to 65535

00:06:33.725 --> 00:06:36.314


Which is known as total length also.

00:06:36.354 --> 00:06:39.143


but in total length, there are two things

00:06:39.183 --> 00:06:41.921


one is header, and other is payload

00:06:41.961 --> 00:06:43.912


Payoload means pure data

00:06:43.952 --> 00:06:46.657


Which comes from the application layer

00:06:46.697 --> 00:06:48.706


So if I talk about header

00:06:48.746 --> 00:06:51.099


the UDP's header is always fixed

00:06:51.139 --> 00:06:52.553


of 8 bytes

00:06:52.593 --> 00:06:54.619


So if it has header of 8 bytes
00:06:54.659 --> 00:06:56.473
then pure data can be

00:06:56.513 --> 00:06:59.420


You subtract 8 bytes from this total bytes

00:06:59.460 --> 00:07:07.390


so, 65527

00:07:07.473 --> 00:07:10.038


65527

00:07:10.078 --> 00:07:12.999


This is the size of payload

00:07:13.039 --> 00:07:14.284


means you can calculate normally

00:07:14.324 --> 00:07:15.542


This is the maximum value

00:07:15.582 --> 00:07:17.386


data can be less than this

00:07:17.426 --> 00:07:20.161


Data cannot be more than this

00:07:20.201 --> 00:07:22.498


because header of 8 byte is compulsory

00:07:22.538 --> 00:07:26.218


Without header you cannot send the data.

00:07:26.258 --> 00:07:28.349


after than comes Checksum

00:07:28.389 --> 00:07:31.052


Checksum is used for error control

00:07:31.092 --> 00:07:33.560


means we use checksum for detecting errors

00:07:33.600 --> 00:07:35.491


I have already mentioned here

00:07:35.531 --> 00:07:38.162


How we calculate checksome?

00:07:38.202 --> 00:07:41.080


We calculate in the same way in TCP and UDP

00:07:41.120 --> 00:07:43.008


We take UDP header

00:07:43.048 --> 00:07:45.651


took all the values of UDP header

00:07:45.691 --> 00:07:47.780


the source port, destination port

00:07:47.820 --> 00:07:49.525


all the values I have taken

00:07:49.565 --> 00:07:50.648


Other than that

00:07:50.688 --> 00:07:52.699


We took that data

00:07:52.739 --> 00:07:55.218


plus pseudo header of IP

00:07:55.258 --> 00:07:57.802


Combining all these three

00:07:57.842 --> 00:07:58.851


We are calculating the checksum

00:07:58.891 --> 00:07:59.715


checksum is what?

00:07:59.755 --> 00:08:02.083


checksum is like a hash value

00:08:02.123 --> 00:08:05.210


means we wll find a unique value of data

00:08:05.250 --> 00:08:07.678


as something changes in that data

00:08:07.718 --> 00:08:11.192


that unique value will also changes

00:08:11.232 --> 00:08:13.534


Due to which reciever will get to know

00:08:13.574 --> 00:08:15.893


that the hash value I am recieving

00:08:15.933 --> 00:08:17.652


and the one I am calculating

00:08:17.692 --> 00:08:19.718


there is difference between them

00:08:19.758 --> 00:08:23.215


through this we'll know that there is some error in data

00:08:23.255 --> 00:08:25.716


here, if I talk about psuedo header

00:08:25.756 --> 00:08:28.245


what does psuedo header of IP means?

00:08:28.285 --> 00:08:29.360


IP datagram
00:08:29.400 --> 00:08:32.636
the header we use of IP in network layer

00:08:32.676 --> 00:08:34.231


that IP header

00:08:34.271 --> 00:08:37.651


We don't use the whole IP header here.

00:08:37.691 --> 00:08:40.015


We only pick up only those value

00:08:40.055 --> 00:08:41.385


Which are fixed

00:08:41.425 --> 00:08:42.411


means which remains same

00:08:42.451 --> 00:08:44.802


Like IP address of source

00:08:44.842 --> 00:08:46.932


IP address of destination

00:08:46.972 --> 00:08:50.396


TCP, we use

00:08:50.436 --> 00:08:51.945


Upper layer protocol

00:08:51.985 --> 00:08:53.640


means there 3 - 4 fields

00:08:53.680 --> 00:08:58.309


Which remains same in IP header throughout the transmission

00:08:58.349 --> 00:09:00.058


We'll only take those values.

00:09:00.098 --> 00:09:03.254


That's why we are not taking entire IP packet

00:09:03.294 --> 00:09:06.975


We are just taking the psuedo header of the IP

00:09:07.015 --> 00:09:08.420


means those values whose

00:09:08.460 --> 00:09:14.560


Those values, those entries in IP address that doesn't ever change

00:09:14.600 --> 00:09:16.343


like the source IP address

00:09:16.383 --> 00:09:17.421


Destination IP address

00:09:17.461 --> 00:09:19.678


That do not ever change on the router
00:09:19.718 --> 00:09:24.230
But many other values changes.

00:09:24.270 --> 00:09:28.270


When we will discus about IP address, there you'll understand it better

00:09:28.310 --> 00:09:29.903


here you only

00:09:29.943 --> 00:09:31.813


if we see a general overview

00:09:31.853 --> 00:09:37.020


we calculate a unique hash value by taking these three things

00:09:37.060 --> 00:09:40.400


and we send that value along with data

00:09:41.646 --> 00:09:43.309


As receiver will get that data

00:09:43.349 --> 00:09:45.939


reciever will also take these three things

00:09:45.979 --> 00:09:50.500


after taking these values, he will again calculate hash value

00:09:50.540 --> 00:09:53.781


That hash value and the one sender had sent

00:09:53.821 --> 00:09:55.484


if those both matches

00:09:55.524 --> 00:09:57.237


it means there is not any error in the data

00:09:57.277 --> 00:10:01.690


if hash value of reciever and one the sender had sent are different

00:10:01.715 --> 00:10:05.118


it means that there is some error in the data

00:10:05.158 --> 00:10:08.406


but here is an important point

00:10:08.446 --> 00:10:09.750


We've just talked about the

00:10:09.790 --> 00:10:12.531


the UDP is unreliable

00:10:12.571 --> 00:10:14.000


means if there's an error

00:10:14.040 --> 00:10:15.471


or any packet got lost

00:10:15.511 --> 00:10:17.240


then, the UDP doesn't care about it

00:10:17.280 --> 00:10:18.804


neither it care about the ordering

00:10:18.844 --> 00:10:22.779


how ever packet reaches, they can reach throught different paths

00:10:22.819 --> 00:10:23.989


from same way also

00:10:24.029 --> 00:10:24.737


basically

00:10:24.777 --> 00:10:27.390


different packets follows different paths

00:10:27.430 --> 00:10:30.568


So what happens due to that is packets get lost

00:10:30.608 --> 00:10:33.606


But TCP always works on dial-up connection

00:10:33.646 --> 00:10:36.307


It make a connection first

00:10:36.347 --> 00:10:39.286


all packets will follow that connection path only

00:10:39.326 --> 00:10:42.908


due to which packet does not follow different paths

00:10:42.948 --> 00:10:46.948


But in UDP if I am sending data from A to B

00:10:46.988 --> 00:10:49.333


One packet may reach through another path

00:10:49.373 --> 00:10:51.144


one packet from other path

00:10:51.184 --> 00:10:54.787


Packets transfers throught different networks

00:10:54.827 --> 00:10:57.099


Due to which there are chances of packet getting lost

00:10:57.139 --> 00:10:58.655


If it is unreliable

00:10:58.695 --> 00:11:01.376


then is checksum field mandatory ?

00:11:01.416 --> 00:11:02.032


No

00:11:02.072 --> 00:11:04.803


This checksum field is optional
00:11:04.843 --> 00:11:06.680
In IPV4

00:11:06.720 --> 00:11:08.105


this field is optional

00:11:08.145 --> 00:11:09.285


but in IPV6

00:11:09.325 --> 00:11:10.533


which has been recently launched

00:11:10.573 --> 00:11:13.888


In that the checksum field is mandatory

00:11:13.928 --> 00:11:16.893


but we're more discussing about the IPV4

00:11:16.933 --> 00:11:19.742


there this field is optional

00:11:19.782 --> 00:11:21.109


means whether you use it or not

00:11:21.149 --> 00:11:22.641


then also it will run.

00:11:22.681 --> 00:11:26.226


So, if we see the main are these three values

00:11:26.266 --> 00:11:29.460


Which are used mostly in UDP header

00:11:30.253 --> 00:11:32.061


If UDP is unreliable

00:11:32.101 --> 00:11:33.914


means packets are getting lost or

00:11:33.954 --> 00:11:35.866


there some problem coming in packets

00:11:35.906 --> 00:11:38.481


if packets are reaching unordered also

00:11:38.521 --> 00:11:42.307


so which are the applications which uses UDP

00:11:42.347 --> 00:11:43.743


in real time environment

00:11:43.783 --> 00:11:46.119


that we are going to see in the next video

00:11:46.159 --> 00:11:50.159


Thank You!

You might also like