2018/08/03
User Datagram Protocol
User Datagram Protocol (UDP) is a protocol in transport layer of Internet Protocol Suite. Responsible for transferring data. Only transfer data and error checking are available. It is an irresponsible non-connected service.
User Datagram Protocol (UDP) is a protocol in transport layer of Internet Protocol Suite. Responsible for transferring data. Only transfer data and error checking are available. It is an irresponsible non-connected service.
UDP Segment Structure
- Source Port: Tells the receiver the port number of the source application that sent this segment.
- Destination Port: Tells the receiver the port number of the destination application.
- Length: The length of the segment.
- Checksum: Verification data for error checking.
- Data: Data from the application layer.
How it works?
Why do we say that UDP is an irresponsible non-connected service?
- There is no need to establish a connect before sending data.
- The sender does not care if the receiver has obtained the correct data.
- The receiver will not request correct data from sender though it receive incorrect data. It discard the incorrect data and just like nothing happened.
UDP is so irresponsible. Why are we still using it?
It is not a good protocol for the data completely. However, if we don't care whether the data is correct or not, speed is the most important things we care about. At this moment, UDP is the best choice. Take the real-time streaming basketball game as an example. Audiences are often eager to have a smooth stream rather than a high quality stream.
It is not a good protocol for the data completely. However, if we don't care whether the data is correct or not, speed is the most important things we care about. At this moment, UDP is the best choice. Take the real-time streaming basketball game as an example. Audiences are often eager to have a smooth stream rather than a high quality stream.
Copyright © 2018 William Hsu All rights reserved.