Transmission control protocol/Internet Protocol (TCP/IP) is suite of communication protocols used to connect hosts on the internet. It uses several protocols, two main ones
being TCP and IP. Lets quickly understand the differences between OSI model and TCP/IP model:
Take a look at the diagram below to understand effectively.
The higher layer i.e TCP assembles the message into smaller packets. A header is added to the data which includes source and destination addresses, a sequence number, acknowledgement number and a checksum for error detection. At receiving end, TCP reassembles the packets in the correct order and routes them up to application. It retransmits a packet if error occurs. TCP's main job is to pack and unpack (encapsulation and decapsulation) the data and provide a reliable transmission of error free data.
IP layer transmits the packets over a physical layer connection. IP adds its own header (IPv4) to the packet, well known as IP address (32 bit addresses). This is the address assigned to device by Internet Assigned Numbers Authority (IANA).
Encapsulation
Packing of data at each layer of TCP/IP protocol stack is known as encapsulation. When data moves from upper to lower layers (outgoing), each layer includes some information (header) at the start of the block which is repackaged at lower and further lower layers with their own headers thus making data packet an encapsulated one.
Decapsulation
When data is received on destination's side, reverse process happens. Data moves up the layers (incoming) and each layer unpacks the corresponding header and delivers the packet to exact network application data waiting for it.
TCP connection establishment
The 'three way handshake' procedure is used to establish a connection as it reduces the possibility of false connections. SYNchronize and ACKnowledgement segments are used as per figure below:
As you can see Host A initiates the connection request with SYN which is received and acknowledged by Host B. A then sends acknowledgement for B's acknowledgement along with data. Data transfer between the two begins then.
TCP connection is duplex. There is no difference between two sides once the connection is established.
536 videos|683 docs|263 tests
|
536 videos|683 docs|263 tests
|
|
Explore Courses for Bank Exams exam
|