60 likes | 146 Vues
Internet Transport Services. Reliable, in-order unicast delivery (TCP) Congestion Flow control Connection setup Unreliable (“best-effort”), unordered unicast or multicast delivery: UDP Services not available: Real-time Bandwidth guarantees Reliable multicast. RFC 768
E N D
Internet Transport Services • Reliable, in-order unicast delivery (TCP) • Congestion • Flow control • Connection setup • Unreliable (“best-effort”), unordered unicast or multicast delivery: UDP • Services not available: • Real-time • Bandwidth guarantees • Reliable multicast UDP
RFC 768 “no frills,” “bare bones” Internet transport protocol “best effort” service, UDP segments may be: Lost Delivered out of order Connectionless: No handshaking between UDP sender, receiver Each UDP segment handled independently of others Why is there a UDP? No connection establishment (which can add delay) Simple: no connection state at sender, receiver Small segment header No congestion control: UDP can blast away as fast as desired UDP: User Datagram Protocol UDP
Often used for streaming multimedia apps Loss tolerant Rate sensitive Other UDP uses: DNS SNMP Reliable transfer over UDP Add reliability at application layer Application-specific error recover! UDP 32 bits source port # dest port # Length, in bytes of UDP segment, including header checksum length Application data (message) UDP segment format UDP
Header Fields • Port numbers identify the sending and receiving processes (source port is optional) • The length field identifies the length of the header and the data in bytes. The minimum value for this field is 8 bytes. • Note the length is redundant, since the IP header contains the total length. • 0 length data portions are okay! UDP
UDP Checksum • The UDP checksum covers the UDP header and UDP data. • The checksum is optional, it is set to 0 if not used. • There are some differences in the way UDP computes its checksum • if the UDP datagram consists of an odd umber of bytes a 0 byte is added to the end (but it is not sent) • UDP appends a pseudo-header so that UDP can double check that data has arrived at the correct destination • Note that the pseudo-header is never sent UDP
UDP Pseudo-Header 0 15 16 31 32-bit source IP address 32-bit destination IP address zero 8-bit protocol 16-bit length 16-bit source port 16-bit destination port 16-bit length 16-bit checksum data (if any) pad byte UDP