90 likes | 102 Views
UDP: User Datagram Protocol Surasak Sanguanpong nguan@ku.ac.th http://www.cpe.ku.ac.th/~nguan Last updated: May 24, 1999. Agenda. Services provided by UDP UDP frame format. UDP: User Datagram Protocol. RFC 768 connectionless protocol (no connection establishment)
E N D
UDP: User Datagram Protocol Surasak Sanguanpong nguan@ku.ac.th http://www.cpe.ku.ac.th/~nguan Last updated: May 24, 1999
Agenda • Services provided by UDP • UDP frame format
UDP: User Datagram Protocol • RFC 768 • connectionless protocol (no connection establishment) • provide unreliable service • use socket as TCP
Protocol=17 UDP encapsulation • with Ethernet frame datagrams Ethernet hdr IP header UDP header data UDP IP
Sockets • socket : a pair of the IP address and the port number IP address port number <158.108.33.3, 3000> IP address is unique to a node, the port is unique on a node the socket gives a unique identification of an application layer services
Socket address • A connections identified by the socket address at its to ends • client socket: 158.108.33.3,3000; 158.108.2.71,21 • server socket: 158.108.2.71,21; 158.108.33.3,3000; IP : 158.108.2.71 IP : 158.108.33.3 connection port : 21 port : 3000 server client
0 15 16 31 source port:16 destination port:16 UDP length:16 checksum:16 data…... UDP format • source and destination port:16,16 - identify applications at ends of the connection • length: 16 - length of datagram including header and data • checksum: 16 - one’s complement of header and data including pseudo header
UDP pseudo header 0 7 8 15 16 31 Source IP address:32 Destination IP address:32 zero:8 protocol:8 UDP length:16 source port:16 destination port:16 UDP length:16 checksum :16 data…... • include destination for double checking that destination is correct • if datagrams be an odd number of bytes, UDP appends a pad byte of 0, just for computation • 0 indicates no checksum (checksum disable) • if computed checksum is 0, it stores as all one bits (65535) pseudo-header UDP header
UDP for Applications • TFTP • DNS • RPC, NFS • SNMP