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 Transmission Control Protocol connection offers service of 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 end system, then application-level data can flow from A to B at the same time.
- 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.
- 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.
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.
TCP is the protocol that finds its applications in World Wide Web, e-mail, and file transfer etc.
Transmission Control Protocol Segment Structure:
- TCP Header Length Specifies the length of the header.
- URG (urgent) This bit is set to 1 if there is urgent information in to send.
- The 32-bit sequence number field, 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 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 repectively.
- 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
|← CSMA with Collision Detection (CSMA/CD)||Virtual Circuits - Definition & Types of Virtual Circuits, Permanent, Switched Virtual Circuits →|