91 UDP User Datagram Protocol Surasak Sanguanpong nguanku

  • Slides: 9
Download presentation
/91 UDP: User Datagram Protocol Surasak Sanguanpong nguan@ku. ac. th http: //www. cpe. ku.

/91 UDP: User Datagram Protocol Surasak Sanguanpong nguan@ku. ac. th http: //www. cpe. ku. ac. th/~nguan Last updated: May 24, 1999 Applied Network Research Group Department of Computer Engineering, Kasetsart University

/92 Agenda l l Services provided by UDP frame format Applied Network Research Group

/92 Agenda l l Services provided by UDP frame format Applied Network Research Group Department of Computer Engineering, Kasetsart University

/93 UDP: User Datagram Protocol l l RFC 768 connectionless protocol (no connection establishment(

/93 UDP: User Datagram Protocol l l RFC 768 connectionless protocol (no connection establishment( provide unreliable service use socket as TCP Applied Network Research Group Department of Computer Engineering, Kasetsart University

/94 UDP encapsulation l with Ethernet frame datagrams Ethernet hdr IP header UDP header

/94 UDP encapsulation l with Ethernet frame datagrams Ethernet hdr IP header UDP header data UDP Protocol=17 IP Applied Network Research Group Department of Computer Engineering, Kasetsart University

/95 Sockets l socket : a pair of the IP address and the port

/95 Sockets l socket : a pair of the IP address and the port number IP address port number <3000 , 158. 108. 33. 3> 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 Applied Network Research Group Department of Computer Engineering, Kasetsart University

/96 Socket address l A connections identified by the socket address at its to

/96 Socket address l A connections identified by the socket address at its to ends l l 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 client port : 3000 Applied Network Research Group connection port : 21 server Department of Computer Engineering, Kasetsart University

/97 UDP format 31 16 15 0 source port: 16 destination port: 16 UDP

/97 UDP format 31 16 15 0 source port: 16 destination port: 16 UDP length: 16 checksum: 16 data. . . … l l l 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 Applied Network Research Group Department of Computer Engineering, Kasetsart University

/98 UDP pseudo header 31 16 15 87 Source IP address: 32 Destination IP

/98 UDP pseudo header 31 16 15 87 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. . . … l l 0 pseudo-header UDP header 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( Applied Network Research Group Department of Computer Engineering, Kasetsart University

/99 UDP for Applications l l TFTP DNS RPC, NFS SNMP Applied Network Research

/99 UDP for Applications l l TFTP DNS RPC, NFS SNMP Applied Network Research Group Department of Computer Engineering, Kasetsart University