In: Computer Science
Briefly describe the operation of TCP/IP in the process of sending a message from port 3 on host A to port 1 on host B.
TRANSMISSION CONTROL PROTOCOL / INTERNET PROTOCOL( TCP / IP) :- TCP / IP is a suite of communication protocol, used to interconnect the network devices on th einternet. It can be used as a communication protocol in a private network i.e, intranet or ectranet..The Transmission Control Protocol (TCP ) provides full support layer services to applications. TCP is a reliable stream transport port to port protocol. The term stream means connection oriented , a connection must be established between both ends of a transmission before either may transmit data.Connection is creating between sender and receiver through a virtual circuit.
INTERNET PROTOCOL which defines how to address the route each packets to make sure it reaches the right destination .Each gateway computer or the network checks the IP address to determine where to formated the message.
In TCP / IP functionality is divided into four layers .Each of them which include specific protocol.
1.APPLICATION LAYER. - It provides application with standarised data exchanges .It protocol includes HTTP,FTP, POP,SMTP and SNMP.
2.TRANSPORT LAYER. - It is responsible for maintaining end to end communication accross the network.TCP handles communication between hosts and provides flow control, multiplexing and reliability .The transport protocol includes TCP and UDP .
3.NETWORK LAYER - It is also called the internet layer and it deals with packets and come of independent network to transport the package access, the network layer protocols are the IP and the internet conntrol message protocol (ICMP) which is used for error reporting.
4.PHYSICAL LAYER - It consists of protocol that operates only one on a link. The network component that interconnects nodes ar host includes in the network. The protocol in these layer included ethernet for local LAN, and the address resolation protocols ( ARP).
Tcp is a connection oriented protocol establishes a virtual path for segment transfer between the source and the destination requires two procedures.
1. CONNECTION ESTABLISHMENT :- connections for the duration of an entire exchange are different and are handled by session functions in individual applications.
2. CONNECTION TERMINATION :- It ends each transmission.
CONNEC:TION ESTABLISHMENT - connection estabilshment is performed by aconcept of a three -way handshake .To establish a connection ,TCP uses a three-way handshake.Before a client attempts to connect with a server ,the server must first bind to a port to open it up for connections this is called a passive open .Once the passive open is established ,a client may initiate an active open .To establish a connection the Three-way handshake occurs -
There are 3 steps of three-way handshaking, which are as follows:
Step 1: The source host A wants to establish a connection with the destination host B, it transmits a segment with the SYN and sequence number, which denotes that the host A wants to initiate a session of communication with Host B and with what sequence number it is defined in that segment.
Step 2: The host B responds to the request of host A with SYN and ACK set in the signal bit. ACK denotes the response of the received segment and SYN denotes the sequence number.
Step 3: The host A acknowledges the response from the Host B and both establish a secure connection between them and then begin data transmission over it.
Just a simple diagram of three way handshake for better understanding.
TCP IP supports the client-server model of the communication system.
CONNECTION TREMINATION :-Connection tremination is performed by a concept called four -way handshake .
The server as well as client both should participate in the connection termination .When connection of one direction is terminated ,the other party can continue sending data in th eother direction.
Four steps need to perform the connection termination from both the server & client side.
STEP 1 - The client TCP sends the FIN segment first.
STEP 2 -The server TCP sends the ACK to confirm the receipt of the PIN from the client .IT increments the sequence number of PIN by 1 and no other user data will adds with the ACK segments.
STEP 3 - Server does not have any data for transmission then it sends the pIN segment to Client side.
STEP 4 - The client sends the ACK segment again to the server side .The connection terminations fulfilled.
Simple diagram for your understanding of a four -way handshake.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- thank you ----------------------------------------------------------------------------------------------