110 likes | 122 Views
Process-to-Process Delivery UDP - TCP. USER DATAGRAM PROTOCOL (UDP).
E N D
Process-to-Process Delivery UDP - TCP
USER DATAGRAM PROTOCOL (UDP) The User Datagram Protocol (UDP) is called a connectionless, unreliable transport protocol. It does not add anything to the services of IP except to provide process-to-process communication instead of host-to-host communication.
TCP (Transmission control protocol) TCP is a connection-oriented protocol; it creates a virtual connection between two TCPs to send data. In addition, TCP uses flow and error control mechanisms at the transport level. 23.25
Each host tells its ISN to the other host. Establishing a TCP Connection • Three-way handshake to establish connection • Host A sends a SYN (open) to the host B • Host B returns a SYN acknowledgment (SYN ACK) • Host A sends anACK to acknowledge the SYN ACK B A SYN SYN ACK ACK Data Data 16
Data TCP Header Source port Destination port Sequence number Flags: SYN FIN RST PSH URG ACK Acknowledgment Advertised window HdrLen Flags 0 Checksum Urgent pointer Options (variable) 17
Step 1: A’s Initial SYN Packet A’s port B’s port A’s Initial Sequence Number Flags: SYN FIN RST PSH URG ACK Acknowledgment Advertised window 20 Flags 0 Checksum Urgent pointer Options (variable) A tells B it wants to open a connection… 18
Step 2: B’s SYN-ACK Packet B’s port A’s port B’s Initial Sequence Number Flags: SYN FIN RST PSH URG ACK A’s ISN plus 1 Advertised window 20 Flags 0 Checksum Urgent pointer Options (variable) B tells A it accepts, and is ready to hear the next byte… 19
Step 3: A’s ACK of the SYN-ACK A’s port B’s port Sequence number Flags: SYN FIN RST PSH URG ACK B’s ISN plus 1 Advertised window 20 Flags 0 Checksum Urgent pointer Options (variable) A tells B it wants is okay to start sending 20
Figure 23.18 Connection establishment using three-way handshaking 23.39