Lec-70: UDP (User Datagram Protocol) header in Computer Networks in Hindi

Lec-70: UDP (User Datagram Protocol) header in Computer Networks in Hindi

Introduction to UDP

In this section, we will discuss the User Datagram Protocol (UDP), which is a connectionless protocol used in transport layer communication.

Connectionless Protocol

  • UDP is a connectionless protocol, unlike TCP.
  • It does not establish a connection before data transfer, similar to sending mail without making a phone call.
  • Data is sent as individual datagrams without any guarantee of delivery or order.

Unreliable and No Ordering

  • UDP is considered unreliable because it does not care about lost packets.
  • There is no guarantee of packet ordering in UDP.

UDP Header

  • The UDP header contains four main options:
  • Source Port: Identifies the port number of the sender application.
  • Destination Port: Identifies the port number of the receiver application. Both source and destination ports are mandatory for end-to-end delivery.
  • Length: Represents the size of the segment in bits. The maximum length is 2^16 - 1 (65535).
  • Checksum: Used for error detection during transmission.

Characteristics of UDP

This section explores the characteristics of UDP, including its unreliability and lack of ordering.

Unreliable Delivery

  • UDP does not guarantee reliable delivery of packets.
  • Lost packets are not retransmitted by default.

No Packet Ordering

  • Packets can arrive out-of-order in UDP since there are no sequence numbers used for ordering.

Source Port and Length Fields

This section focuses on two fields in the UDP header, namely Source Port and Length.

Source Port

  • The Source Port field identifies the port number used by the sender application.
  • Ports range from 0 to 65535, with well-known ports (0-1023) and registered ports (1024-49151).

Length

  • The Length field represents the size of the UDP segment in bits.
  • The maximum length is 2^16 - 1 (65535), but the actual size can vary.

Understanding Length Field

This section provides a deeper understanding of the Length field in the UDP header.

Actual Size vs. Represented Size

  • The Length field is represented by 16 bits, but it does not mean that the length itself is limited to 16 bits.
  • The actual size can be up to 2^16 (65536).

Maximum Segment Size

This section discusses the maximum segment size in UDP.

Maximum Segment Size

  • The maximum segment size in UDP is determined by the total length field.
  • It can be up to 65535, which includes both header and payload.

Conclusion

In this video, we covered the basics of UDP, including its connectionless nature, unreliability, lack of ordering, and key fields in the UDP header.

Understanding Data Calculation and Checksum

In this section, the speaker explains how data calculation and checksum work in the context of UDP and TCP protocols.

Calculating Checksum

  • The maximum value of data can be less than the header size of 8 bytes.
  • The header is compulsory for sending data.
  • Checksum is used for error control to detect errors in the data.

Pseudo Header of IP

  • Pseudo header refers to a subset of values from the IP header used in network layer communication.
  • Only fixed values, such as source and destination IP addresses, are included in the pseudo header.

Unique Hash Value

  • Checksum acts like a hash value that represents a unique value for the data.
  • Any changes in the data will result in a different hash value.
  • By comparing the received hash value with the calculated one, errors in the data can be detected.

Reliability of UDP and TCP Protocols

This section discusses the reliability aspects of UDP and TCP protocols.

Unreliability of UDP

  • UDP is an unreliable protocol that does not care about errors or lost packets.
  • Packets can reach their destination through different paths, leading to potential packet loss.

Reliability of TCP

  • TCP works on dial-up connections and establishes a connection path for all packets to follow.
  • It ensures that packets do not take different paths, reducing packet loss compared to UDP.

Optional Checksum Field

  • In IPv4, the checksum field is optional for UDP headers.
  • However, it becomes mandatory in IPv6 protocol versions.

Key Values Used in UDP Header

This section highlights three key values commonly used in UDP headers.

Key Values in UDP Header

  • Source port and destination port are essential fields in the UDP header.
  • Other fixed values from the IP header, such as source and destination IP addresses, are also included.
  • These values play a crucial role in UDP communication.
Video description

👉Subscribe to our new channel:https://www.youtube.com/@varunainashots Varun sir explains UDP (User Datagram Protocol) header here. UDP uses headers when packaging message data to transfer over network connections. UDP headers contain a set of parameters called fields. The User Datagram Protocol header has four fields, each of which is 2 bytes. They are the following: Source port number, which is the number of the sender; Destination port number, the port to which the datagram is addressed; Length, the length in bytes of the UDP header and any encapsulated data; and Checksum, which is used in error checking -- its use is required in IPv6 and optional in IPv4. 0:00 - Introduction 0:23 - Connection Less 2:27 - Unreliable 2:49 - No ordering 3:17 - Source Port and Destination Port 4:49 - Length 7:27 - Checksum ►Computer Networks (Complete Playlist): https://www.youtube.com/playlist?list=PLxCzCOWd7aiGFBD2-2joCpWOLUrDLvVV_ Other subject-wise playlist Links: -------------------------------------------------------------------------------------------------------------------------------------- ►Design and Analysis of algorithms (DAA): https://www.youtube.com/playlist?list=PLxCzCOWd7aiHcmS4i14bI0VrMbZTUvlTa ►Database Management System: https://www.youtube.com/playlist?list=PLxCzCOWd7aiFAN6I8CuViBuCdJgiOkT2Y ► Theory of Computation https://www.youtube.com/playlist?list=PLxCzCOWd7aiFM9Lj5G9G_76adtyb4ef7i ►Artificial Intelligence: https://www.youtube.com/playlist?list=PLxCzCOWd7aiHGhOHV-nwb0HR5US5GFKFI ►Computer Architecture: https://www.youtube.com/playlist?list=PLxCzCOWd7aiHMonh3G6QNKq53C6oNXGrX ►Operating System: https://www.youtube.com/playlist?list=PLxCzCOWd7aiGz9donHRrE9I3Mwn6XdP8p ►Structured Query Language (SQL): https://www.youtube.com/playlist?list=PLxCzCOWd7aiHqU4HKL7-SITyuSIcD93id ►Discrete Mathematics: https://www.youtube.com/playlist?list=PLxCzCOWd7aiH2wwES9vPWsEL6ipTaUSl3 ►Compiler Design: https://www.youtube.com/playlist?list=PLxCzCOWd7aiEKtKSIHYusizkESC42diyc ►Number System: https://www.youtube.com/playlist?list=PLxCzCOWd7aiFOet6KEEqDff1aXEGLdUzn ►Cloud Computing & BIG Data: https://www.youtube.com/playlist?list=PLxCzCOWd7aiHRHVUtR-O52MsrdUSrzuy4 ►Software Engineering: https://www.youtube.com/playlist?list=PLxCzCOWd7aiEed7SKZBnC6ypFDWYLRvB2 ►Data Structure: https://www.youtube.com/playlist?list=PLxCzCOWd7aiEwaANNt3OqJPVIxwp2ebiT ►Graph Theory: https://www.youtube.com/playlist?list=PLxCzCOWd7aiG0M5FqjyoqB20Edk0tyzVt ►Programming in C: https://www.youtube.com/playlist?list=PLxCzCOWd7aiGmiGl_DOuRMJYG8tOVuapB ►Digital Logic: https://www.youtube.com/playlist?list=PLxCzCOWd7aiGmXg4NoX6R31AsC5LeCPHe --------------------------------------------------------------------------------------------------------------------------------------- Our social media Links: ► Subscribe to us on YouTube: https://www.youtube.com/gatesmashers ►Subscribe to our new channel: https://www.youtube.com/@varunainashots ► Like our page on Facebook: https://www.facebook.com/gatesmashers ► Follow us on Instagram: https://www.instagram.com/gate.smashers ► Follow us on Instagram: https://www.instagram.com/varunainashots ► Follow us on Telegram: https://t.me/gatesmashersofficial -► Follow us on Threads: https://www.threads.net/@gate.smashers -------------------------------------------------------------------------------------------------------------------------------------- ►For Any Query, Suggestion or notes contribution: Email us at: gatesmashers2018@gmail.com #UDPHeader #UDP #GATE #UGCNET #PSU