Latest tutorial: Making a Movieclip face another Movieclip or point on the stage | Ask Tutorial5!
 

User Datagram Protocol UDP

(5 votes)
Written by Michael D   
The User Datagram Protocol (UDP) is one of the protocols that is essential for the Internet to work. When using UDP, programs on networked computers can send short messages sometimes known as datagrams to one another.

 


UDP does not provide the reliability and ordering guarantees that TCP does. Unlike TCP, it send out data without establishing a connection before. That's why it is called a connectionless protocol. Datagrams may arrive out of order or get corrupted without any notice or error correction possibility. Without the overhead of checking if every packet actually arrived, UDP is faster and more efficient for many lightweight or time-sensitive purposes. Also, its stateless nature is useful for servers that answer small queries from huge numbers of clients. Compared to TCP, UDP is required for broadcast (send to all on local network) and multicast (send to all subscribers).

Lacking reliability, UDP applications must generally be willing to accept some loss, errors or duplication. Some applications such as Trivial File Transfer Protocol (TFTP) may add rudimentary reliability mechanisms into the application layer as needed. Most often, UDP applications do not require reliability mechanisms and may even be hindered by them. Streaming media, real-time multiplayer games and voice over IP (VoIP) are examples of applications that often use UDP. Another example is the Simple Network Management Protocol (SNMP) or Routing Information Protocol (RIP). These two use UDP instead of TCP because of the low bandwidth cost. It wouldn't be very effective to overload a network with our management software packets or with our routing information update packets.

Because it's the fastest way to transfer data over internet, UDP is the main method used by hackers to do a Denial Of Service (DOS) attack. If a computer receives many UDP packets, it will check for the availability of that port and notify the sender with a Destination Unreachable message. The host floods itself, sending reply ICMP packets to the originating UDP sender. Usually this kind of attack comes with IP spoofing (hiding the origin IP of the sender) too, so the attacker remains in anonymity and doesn't get flooded by the replies. The best measure to prevent this is to get a firewall that blocks any echo replies (like Destination Unreachable) and prevents you from self-flooding your network connection.

Exactly like TCP, UDP uses port numbers to handle multiple connections too. (See TCP for more details).



Subscribe now via RSS feed and get all the new tutorials

written by Pankaj Chandre , November 22, 2008

IS it possible to send 10 MB through UDP?How
written by M rao , December 12, 2008

IS it possible to send 10 MB through UDP?How

Do you need more help? Ask now!
 

busy
Last Updated ( Saturday, 23 June 2007 )