Transmission Control Protocol (TCP) and Internet Protocol (IP) are two distinct network protocols but they are so commonly used together, that TCP/IP has become standard terminology to refer to either or both of the protocols. IP corresponds to the Network layer (Layer 3) in the OSI model, whereas TCP corresponds to the Transport layer (Layer 4) in OSI. The following figure shows the TCP/IP reference model and the OSI reference model.
The TCP/IP model has no session or presentation layers. No need for them was observed, so they were excluded. Remember that TCP runs only on end machines and therefore is not present on routers or the internal network.
Some important Services Offered :
A TCP connection offers the following services
1- Full Duplex Data Transfer :
i.e application-level data can be transmitted in both ways between two hosts. For Example if a TCP connection exists between process A on one endsystem/machine and process B on another endsystem, then application-level data can flow from A to B at the same time.
2-Point To Point Connection:
TCP connection is always point-to-point, i.e., between one sender and a one receiver. Transmission of data from one sender to multiple receivers simultaneously is not possible if a TCP connection is adopted by the devices.
TCP offers data transfers to another machine free of errors. For efficient routing, the data is divided into packets and each one is passed on to the internet layer. At the destination, the receiving TCP process reassembles the received messages into the output stream.
4- Flow Control:
TCP also handles flow control to make sure a fast sender does not send data at a rate higher than the receiving rate of the receiver.
5-Three Way Handshake :
The client first sends a special TCP segment; the server responds with a second special TCP segment; and finally the client responds again with a third special segment. The first two segments contain no application-layer data; the third of these segments may carry some application data. Because three segments are sent between the two hosts, this connection establishment procedure is often referred to as a three-way handshake. Once a TCP connection is established, the two application processes can send data to each other.
Applications of Transmission Control Protocolá (TCP)
TCP is the protocol that finds its applications in World Wide Web, e-mail, and file transfer etc.
TCP Segment Structure:
The unit of transmission in TCP is called Segment.The diagram below shows the structure of the 32 bit segment structure.
- TCP Header Length: This field Specifies the length of the header.
- URG (urgent): This bit is set to 1 if there is urgent information in to send.
- The sequence Number Field: The 32-bit sequence number and the 32-bit acknowledgment number field are used by the TCP sender and receiver in implementing a reliable data transfer service.
- The Flag Field: This field contains 6 bits. The ACK bit is used to show that the value carried in the acknowledgment field is not invalid. The RST, SYN and FIN bits are used for connection setup and termination respectively.
- Source and Destination port numbers, are used for the purpose of multiplexing/demultiplexing data from/to upper layer applications.
- Receive Window field is used by the receiver to inform the sender that how much space is available in the receiver's buffers.
- Checksum gives an error checking value to show to ensure the security and integrity of the segment.
Maximum Segment Size:
Maximum Segment Size is the largest block of data that TCP sends to other end. Each end can announce its MSS during connection establishment. Default is 576 bytes including 20 bytes for IP header and 20 bytes for TCP header.Ethernet implies MSS of 1460 bytes whereas IEEE 802.3 implies 1452
TCP (Transmission Control Protocol) is a reliable connection-oriented protocol used along with the Internet Protocol (IP) to transfer data in the form of packets between computers over the Internet.IP (Internet Protocol) takes care of handling the actual delivery of the data whereas TCP takes care of keeping track of the packets.
Transmission Control Protocol (TCP) and Internet Protocol (IP) are two distinct network protocols but they are so commonly used together, that TCP/IP has become standard terminology to refer to either or both of the protocols. IP corresponds to the Network layer (Layer 3) in the OSI model, whereas TCP corresponds to the Transport layer (Layer 4) in OSI.The following figure shows the TCP?IP reference model and the OSI reference model.
|← Circuit Switching vs Packet Switching||User Data gram Protocol - UDP →|