What Are TCP and UDP protocols and how they work

ptasheq 28 views 12 slides Sep 05, 2024
Slide 1
Slide 1 of 12
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12

About This Presentation

What Are TCP and UDP


Slide Content

TCP and UDP Protocols ?

What Is the Difference Between TCP and UDP? TCP is a connection-oriented protocol, UDP is a connectionless protocol . A key difference between TCP and UDP is speed, as TCP is slower than UDP. Overall, UDP is a much faster, simpler, and efficient protocol, however, retransmission of lost data packets is only possible with TCP.

What Is a Three-Way Handshake?

What is TCP Three-Way HandShake ? Three-Way HandShake  or a TCP 3-way handshake is a process which is used in a TCP/IP network to make a connection between the server and client. It is a three-step process that requires both the client and server to exchange synchronization and acknowledgment packets before the real data communication process starts. Three-way handshake process is designed in such a way that both ends help you to initiate, negotiate, and separate TCP socket connections at the same time. It allows you to transfer multiple TCP socket connections in both directions at the same time.

TCP Three- Way Handshake Process TCP traffic begins with a three-way handshake. In this TCP handshake process, a client needs to initiate the conversation by requesting a communication session with the Server: Step 1: A connection between server and client is established First, a connection between server and client is established, so the target server must have open ports that can accept and initiate new connections. The client node sends a SYN (Synchronize Sequence Number) data packet over an IP network to a server on the same or an external network. This SYN packet is a random sequence number that the client wants to use for the communication. The objective of this packet is to ask if the server is open for new connections.

Step 2: The server receives the SYN packet from the client node When the server receives the SYN packet from the client node, it responds and returns a confirmation receipt – the ACK (Acknowledgement Sequence Number) packet or SYN/ACK packet. This packet includes two sequence numbers. The first one is ACK one, which is set by the server to one more than the sequence number it received from the client. The second one is the SYN sent by the server, which is another random sequence number. This sequence indicates that the server correctly acknowledged the client’s packet, and that is sending its own to be acknowledged as well.

Step 3: Client node receives the SYN/ACK from the server and responds with an ACK packet The client node receives the SYN/ACK from the server and responds with an ACK packet. Once again, each side must acknowledge the sequence number received by incrementing it by one. So now it’s the turn of the client to acknowledge the server’s packet by adding one to the sequence number, and resend it to the server. Upon completion of this process, the connection is created and the host and server can communicate. All these steps are necessary to verify the serial numbers originated by both sides, guaranteeing the stability of the connection. Since both hosts must acknowledge the connection parameters of the other side, a missing or out-of-order segment can be quickly detected before the actual data transfer process is initiated.

The benefits and downsides of UDP UDP has a number of benefits for different types of applications, including: No retransmission delays;   Speed;   Suitable for broadcasts .

At which layer of the OSI model do the TCP & UDP protocols work? Layer 4 of the OSI Model: Transport Layer  provides transparent transfer of data between end users, providing reliable data transfer services to the upper layers. The transport layer controls the reliability of a given link through flow control, segmentation and desegmentation , and error control. Some protocols are state- and connection-oriented. This means that the transport layer can keep track of the segments and retransmit those that fail. The transport layer also provides the acknowledgement of the successful data transmission and sends the next data if no errors occurred. Typical examples of layer 4 are the Transmission Control Protocol (TCP) and User Datagram Protocol (UDP).

Overview of HTTP header fields

TCP/UDP Common Ports SMTP - 25 is known as the Simple Mail Transfer Protocol. It is associated with the TCP port number 25. The primary purpose of this protocol is to make sure that email messages are communicated over the network securely. This port usually comes into being during the Application layer. HTTP - 80 Port 80 is associated with HTTP, Hypertext Transfer Protocol. It comes under the category of a TCP protocol. It is one of the most famous used ports in the world. The main purpose of port 80 is to allow the browser to connect to the web pages on the internet. FTP - 20,21 The purpose of FTP is to transfer files over the internet. It basically lays down all the rules which are to be followed during the transfer of data.To the concern of security, it also asks for authentication by the user before the transfer of data. TELNET - 23 comes under the category of TCP Protocols. Its main function is to establish a connection between a server and a remote computer. It establishes a connection once the authentication method has been approved.

THE END THANK YOU 
Tags