(rev. 01/23/2010) 
 
Notes On Chapter Twenty-Five
-- UDP: Datagram Transport Service
-  25.1 Introduction  
    
    -  The User Datagram Protocol (UDP)
    
 -  UDP as major transport-layer protocol
    
 -  UDP as connectionless service
    
 -  UDP packet format
    
 -  Applications of UDP
    
 -  UDP as best-effort delivery service
    
 -  Concept of protocol port numbers
    
 
 -  25.2 Transport Protocols and End-to-End Communication  
    
    -  IP is at layer 3 in the TCP/IP model.  
    
 -  IP treats NIC's as endpoints of communication - not processes.
    
 -  The transport layer contains the end-to-end protocols.
    
 -  Port addressing is handled at the transport layer.
    
 
 -  25.3 The User Datagram Protocol  
    
    -  UDP Characteristics:
         
         -  End-to-End: able to distinguish among applications
	       executing on a given host.
         
 -  Connectionless
         
 -  Message-oriented: applications send and receive
	      individual messages. (Basically, UDP provides a means for
	      applications to send and receive individual IP datagrams.)
         
 -  Best-effort - same best-effort service as IP. 
         
 -  Arbitrary Interaction: applications can send to many,
	      receive from many, or communicate with exactly one other
	      application.
         
 -  Operating System Independent: Port number scheme is
	      independent of differences among operating system schemes for
	      identifying processes.
         
 
     
 -  25.4 The Connectionless Paradigm  
    
    -  Send anytime
    
 -  Low overhead
    
 
 -  25.5 Message-Oriented Interface  
    
    -  UDP messages are individually sent and received - not combined before
         delivery.
    
 -  The UDP message has to fit inside one IP datagram.
    
 -  If an application attempts to send a UDP message that is too large
	 for the network MTU, it will be fragmented by IP protocol software,
	 possibly on the sending host.  This is not efficient use of the
	 network.
    
 -  Most path MTU's are larger than about 1400 octets.
    
 
 -  25.6 UDP Communication Semantics  
    
    -  UDP simply relies on IP for delivery.
    
 -  Accordingly a UDP message can be lost, duplicated, delayed, delivered
	 out-of-order or corrupted.
    
 -  If applications need additional error detection and correction
	 measures the programmers who create the applications have to provide
	 them.
    
 -  It's often appropriate to use UDP with applications like streaming
	 audio that can well tolerate transmission errors such as occasional
	 packet loss.
    
 
 -  25.7 Modes of Interaction and Broadcast Delivery  
    
    -  UDP can use IP broadcast and multicast services.
    
 
 -  25.8 Endpoint Identification with Protocol Port Numbers  
    
    -  Hosts use protocol port numbers to identify executing
         applications 
    
 -  Hosts have to map between port numbers and whatever identifiers the
         host operating system uses to identify processes. (e.g. unix has its
	 PID system.)
    
 -  For example an echo server is supposed to accept connections on port
         7.  So when a packet arrives addressed to port 7 on a host, the host
	 has to somehow pass the packet to the echo server process.
    
 -  A process R can tell UDP that it only wants to receive UDP messages
	 from a specific process S on a specific host.  The feature is
	 implemented like this: into the socket R uses to communicate, it
	 places the IP and protocol numbers of S.  UDP software then only
	 passes UDP messages with source address and port matching S.
    
 -  Alternatively, R can tell UDP to pass through messages from any
         host.
    
 
 -  25.9 UDP Datagram Format  
    
    -  Refer to Figure 25.1 on page 424.
    
 -  The UDP message is called a user datagram
    
 -  The user datagram header is very simple: fields for source and
	 destination ports, UDP MESSAGE LENGTH, and an optional checksum.
    
 
 -  25.10 The UDP Checksum and the Pseudo Header  
    
    -  Refer to Figure 25.2 on page 425.
    
 -  The UDP header does not contain IP addresses.
    
 -  The UDP checksum is calculated including pseudo header
	 information - the UDP message length and, from the encapsulating IP
	 datagram, IP source and destination addresses, and type field.
    
 
 -  25.11 UDP Encapsulation  
    
    -  Refer to Figure 25.3 on page 426.
    
 -  When traveling over a network, a UDP user datagram is encapsulated
	 inside an IP datagram, which in turn is encapsulated inside a
	 physical network frame.
    
    
 -  The cumulative nature of the encapsulation that occurs as information
	 moves down a protocol stack is in contrast to the style of
	 encapsulation that happens as routers forward IP datagrams
	 along the Internet. Each router removes the IP datagram from its
	 encapsulating frame, discards the frame, and places the IP datagram
	 in another frame for forwarding to the next hop destination.