UrbanPro
true

Learn Computer Networking from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

A note on working of Transmission Control Protocol in Computer Networks.

Yashika Goel
12/01/2017 0 0

TCP Connection establishment and termination

TCP is one of theTCP is connection oriented protocol and reliable protocol.  It originated in the initial network implementation in which it complemented the Internet Protocol (IP). Therefore, the entire suite is commonly referred to as TCP/IP. TCP provides reliable, ordered, and error-checked delivery of a stream of octets between applications running on hosts communicating over an IP network. Major Internet applications such as the World Wide Web, email, remote administration, and file transfer rely on TCP. 

 TCP Services:

1. The process to Process communication: TCP follows the process to process delivery of segments just like Data Link layer provides Node to Node delivery; Network layer is responsible for delivery of datagrams between two hosts. This is called host-to-host delivery. 

TCP, unlike UDP, allows the sending process to deliver data as a stream of bytes and allows the receiving process to obtain data as a stream of bytes due to connection-oriented transfer. It seems like an imaginary tube has been created to transfer the data.

2. TCP, unlike UDP, allows the sending process to deliver data as a stream of bytes and allows the receiving process to obtain data as a stream of bytes due to connection-oriented transfer. It seems like an imaginary tube has been created to transfer the data.

3. Sending and receiving buffers: As the data received may not be able to get absorbed at the receiving side at a given speed, therefore, we make use of buffers to store the data temporarily.  

4. Connection-Oriented Service: TCP first establishes a connection with the receiver and then transfer the data unlike UDP which does not require a connection, simply delivers the data whether it has reached in its original for or not (data loss).

5. Reliable connection: As TCP establishes a connection first, it makes sure that the packets reach safely and in the sequence to the receiver, therefore, it is considered to be reliable.

 

TCP Features

1. Byte Number: TCP numbers all data bytes. A random number is allocated between 0 to 2^32-1 for the number of the first byte. 

2. Sequence number: After all bytes are numbered, TCP assigns the sequence number to each segment being sent. The sequence number is the first-byte number being carried in the segment.

3. Acknowledgement Number:

a) Flow Control: TCP makes sure that the rate at which data is being transferred matches the amount of data receiver can absorb. also, if traffic is detected in the network, TCP plays the role of data flow controller.

b) Error Control: This mechanism is performed through the technique called Checksum. through this technique, TCP makes sure that the data received does not contain any erroneous data or missing segment.

c) Congestion Control: Congestion control. Congestion control controls traffic entry into a telecommunications network, to avoid congestive collapse by avoiding oversubscription by reducing the rate of packets. It should not be confused with flow control, which prevents the sender from overwhelming the receiver.

Now, let us talk about TCP fragment format.

1. The segment consists of 20-60 byte header depending upon the presence of Options. Header fields.

2. Source port address.

3. Destination port address.

4. Sequence number: This 32-bit field defines the number assigned to the first byte of data contained in this segment

5.Acknowledgment number: This 32-bit field defines the byte number that receiver of the segment is expecting next

6. Header length: it’s a 4-bit field.

7. Reserved: for future use.

8. Control: defined 6 different control bits or flags.

Flag Description

1. URG: The value of the urgent field is valid.

2. ACK (Acknowledgment); The value of ACK bit is valid.

3. PSH: Push the data.

4. RST: The connection must be reset.

5. SYN: Synchronize sequencing numbers during connection.

6. FIN: Terminate the connection

9. Window size: this field defines the size of the window in bytes that other party should maintain. Length is 16     bit. The receiver dictates the size decision.

10. Checksum: size 16 bit. Same as UDP.

11. Urgent pointer: 16-bit pointer is used when the segment has urgent data.

12. Options: we have 40 bytes of optional data which could be present or not.

TCP Connection: Three-way handshake

 

 1. When server is ready to accept request, it sends the request to TCP and is called passive open.

2. The client machine request active open.

3. TCP now starts the three-way handshaking process.

4. There are three steps to be followed:

a) A client sends SYN segment in which only SYN flag is set, this for synchronization of the sequence number. When the data transfer starts, it consumes one sequence number. It takes imaginary 1-byte.

b) The server sends SYN+ACK segments, SYN for communication from other direction and serves as the acknowledgment for SYN segment, consumes 1 sequence number.

c) The client sends just ACK segment to acknowledge the receipt of second segment with ACK flag and number. It does not consume any sequence number.

5. Push operation: There is some data which needs to be sent immediately for that PUSH bit is set. This means that there should not be any delay while sending the data.

6. Urgent data: On occasion application program needs to send the urgent bytes. This means that sending application program wants a piece of data to be read out of order by the receiver.

Connection Termination

 

1.The client after receiving a close command from client process, sends the first segment, a FIN segment in which the FIN flag is set.

2.The server TCP after receiving the FIN segment informs it process of the situation and sends the second segment, FIN+ACK segment.

3.The client TCP sends the last segment, an ACK segment to confirm the receipt of the FIN segment from the TCP server.

Here, we presented an extended knowledge over TCP three-way handshake which generally creates confusion for the readers. The above-given description clears away confusion web and provides relevant information on the given topic.

0 Dislike
Follow 0

Please Enter a comment

Submit

Other Lessons for You

An Interesting discussion about malloc( ) and calloc( )
What are malloc( ) and calloc( )? Simply putting they are the predefined functions in C language. Malloc( ) and calloc( ) are two such functions which are used for more or less identical purpose and...


NETWORKING BASIC
Block-1 Following are the essential elements of communication system. Information source: Source that produces a message Transmitter: An element that functions on the message to generate a signal...

Professional Development Workshops
It is strongly recommended that you attend an AP Summer Institute prior to teaching the course for the first time and participate in one-day workshops and conferences available in your region throughout...

Introduction to Programming Languages
What is a Programming Language? A programming language is a formal computer language or constructed language designed to communicate instructions to a machine, particularly a computer. Programming languages...
X

Looking for Computer Networking Classes?

The best tutors for Computer Networking Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Computer Networking with the Best Tutors

The best Tutors for Computer Networking Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more