The User Datagram Protocol (UDP) provides a connectionless, unreliable transport service. Connectionless means that a communication session between hosts is not established before exchanging data. UDP is often used for communications that use broadcast or multicast Internet Protocol (IP) packets. The UDP connectionless packet delivery service is unreliable because it does not guarantee data packet delivery or send a notification if a packet is not delivered. However, if a packet is delivered, a checksum is computed over the received data and matched against the checksum transmitted in the packet. If these checksums do not match, the received UDP packet is not handed up the stack to the next protocol layer on the receiving side.
Because delivery of UDP packets is not guaranteed, applications that use this protocol must supply their own mechanisms for reliability if necessary. Although UDP appears to have some limitations, it is useful in certain situations. Microsoft networking components use UDP for logon, browsing, and name resolution. Unlike Transmission Control Protocol (TCP), UDP also can be used to carry IP multicast and broadcast streams. UDP is efficient because of its low overhead.
UDP and Name Resolution
UDP is used for NetBIOS name resolution by unicast to a NetBIOS name server or broadcast to subnets. UDP is also used for resolving Domain Name System (DNS) host names to IP addresses.
NetBIOS name resolution is accomplished over UDP port 137. DNS queries use UDP port 53.
Because UDP itself does not guarantee delivery of packets, both NetBIOS and DNS use their own retransmission schemes if they receive no answer to queries. Broadcast UDP packets are usually not forwarded over IP routers, so NetBIOS name resolution in a routed environment requires a name server of some type or the use of static database files.
Mail Slot Messaging over UDP
Many NetBIOS applications use mail slot messaging. A second-class mail slot is a simple mechanism for sending a message from one NetBIOS name to another over UDP. Mail slot messages can be broadcast on a subnet or directed to the remote host. To direct a mail slot message to another host, some method of NetBIOS name resolution must be available. Microsoft provides the Windows Internet Name Service (WINS) for this purpose.