À À À À À À À À 13 4UDP

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 11

UDP : User Datagram Protocol

อ.กายรัฐ 1
UDP : User Datagram Protocol

• RFC 768
• connectionless protocol (no connection establishment)
• provide unreliable service
• use socket as TCP

อ.กายรัฐ 2
UDP Encapsulation

• With Ethernet frame


UDP datagram
Ethernet header IP header UDP header data

protocol type in IP header = 17

อ.กายรัฐ 3
Ports

• Port : A 16 bits address allocated for the most common


application level service
• UDP and TCP use port addressing to deliver information to
applications
• Service are known by port number
– FTP 20, TELNET 23, SMTP 25, HTTP 80

อ.กายรัฐ 4
Ports
• Port numbers are generally allocated by
• 0 not used
• 1- 255 Reserves port to well known service
• 256 - 1023 Other reserve port
• 1024 - 65535 user defined server ports
• UNIX store general used ports in /etc/service

อ.กายรัฐ 5
Sockets
• Socket : a pair of the IP address and the port number
IP address Port number
172.28.80.96, 5160
• IP address is a unique to a node, the port is unique on a node
the socket gives a unique identification of an application layer
service

อ.กายรัฐ 6
Socket Address
• A connections identified by the socket address at its to ends
– client socket : 172.28.80.96,3000; 192.168.100.3 ,21
– server socket : 192.168.100.3,21 ; 172.28.80.96,3000

IP 172.28.80.96 IP 192.168.100.3

connection
Client port: 3000 Server port: 21

อ.กายรัฐ 7
UDP Format
0 15 16 31
Source port :16 Destination port: 16
UDP length :16 Checksum : 16
data

• 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 pse
udo data
อ.กายรัฐ 8
UDP Pseudo Header

0 78 15 16 31
Source IP address : 32
Destination IP address : 32 Pseudo header
Zero:8 Protocol : 8 UDP length :16
Source port : 16 Destination port : 16 UDP header
UDP length : 16 Checksum : 16
Data….

อ.กายรัฐ 9
UDP Pseudo Header

• Include destination for double checking that destination is


correct
• if datagrams be an odd number of bytes, UDP append a pad
byte of 0, just for computation
• 0 indicates no checksum (checksum disable)
• if compute checksum is 0, it stores as all one bits (65,535)

อ.กายรัฐ 10
UDP for Application

• TFTP
• DNS
• RPC, NFS
• SNMP

อ.กายรัฐ 11

You might also like