UDP (User Datagram Protocol)
UDP -- like its cousin the Transmission Control Protocol (TCP) -- sits directly on top of the base Internet Protocol (IP). In common, UDP implements a fairly "lightweight" layer above the Internet Protocol. It seems at 1st site that similar service is provided by both UDP and IP, namely transfer of data. However we need UDP for multiplexing/demultiplexing of addresses.
UDP's main purpose is to abstract network traffic in the form of datagrams. A datagram comprises one single "unit" of binary data; the first eight (8) bytes of a datagram contain the header information and the remaining bytes contain the data itself.
UDP Headers
The UDP header consists of four fields of 2 bytes each:
- source port number
- destination port number
- datagram size
- checksum
UDP port numbers allow diverse applications to maintain their own "channels" for data; equally UDP and TCP use this mechanism to support several applications sending and receiving data concurrently. The sending application (that might be a client or a server) sends UDP datagrams through the source or sender's port, and the recipient of the packet accepts this datagram through the destination port . Some applications use static port numbers that are reserved for or registered to the application. Other applications use dynamic (or unregistered) port numbers. As, the UDP port headers are 2 bytes long, valid port numbers range from 0 to 65535 by convention, values above 49151 stand for dynamic ports.
The datagram size is a easy count of the number of bytes limited in the header and data sections . since the header length is a fixed size, this field basically refers to the length of the variable-sized data portion (occasionally called the payload). The utmost size of a datagram varies depending on the operating environment. With a 2-byte size field, the theoretical maximum size is 65535 bytes. On the other hand, some implementations of UDP limits the datagram to a smaller number -- sometimes as short as 8192 bytes.
UDP checksums work as a security feature. The checksum value represents an encoding of the datagram data that is calculated 1st by the sender and afterward by the receiver. Should an individual datagram be tampered with (due to a hacker) or get corrupted during transmission (due to line noise) the calculations of the sender and receiver will not match, and the UDP protocol will identify this error. The algorithm is not fool-proof, however it is effective in many cases. In UDP, check summing is optional -- turning it off squeezes a little extra performance from the scheme -- as opposed to TCP where checksums are mandatory. It must be remembered that check summing is optional only for the sender not for the receiver. If the sender has used checksum then it is mandatory for the receiver to do so.
Usage of the Checksum in UDP is not obligatory. In case the sender does not use it, it sets the checksum field to all zeros. Now if the sender calclulates the checksum then the recipient have to also compute the checksum an set the field accordingly. Now,If the checksum is calculated and turns out to be all one's then the sender sends all one's instead of all zero's. This is because in the algorithm for checksum computation used by UDP, a checksum of all one's if equivalent to a checksum of all zero's. Now the checksum field is clear-cut for the recipient, if it is all zero's then checksum has not been used, in a few other case the checksum has to be computed.
Email based Computer Science assignment help - homework help at Expertsmind
Are you searching Computer Science expert for help with UDP (User Datagram Protocol) questions? UDP (User Datagram Protocol) topic is not easier to learn without external help? We at www.expertsmind.com offer finest service of Computer Science assignment help and computer science homework help. Live tutors are available for 24x7 hours helping students in their UDP (User Datagram Protocol) related problems. We provide step by step UDP (User Datagram Protocol) question's answers with 100% plagiarism free content. We prepare quality content and notes for UDP (User Datagram Protocol) topic under computer science theory and study material. These are avail for subscribed users and they can get advantages anytime.
Why Expertsmind for assignment help
- Higher degree holder and experienced experts network
- Punctuality and responsibility of work
- Quality solution with 100% plagiarism free answers
- Time on Delivery
- Privacy of information and details
- Excellence in solving computer science questions in excels and word format.
- Best tutoring assistance 24x7 hours