Popular Posts

Share |

Tuesday, August 17, 2010

TCP - Transmission Control Protocol

Windowing - Automatic Flow Control
Windowing - Automatic Flow Control, TCP - Transmission Control Protocol
Click on image if not clear
As we discussed about how a connection being established  between two devices in TCP ( please refer the topic  3 way handshake concept ), The next immediate step is to start transferring data packets. It just happen like this.

Step 1. Establishing Connection
A -->>-->>-->>-->>-- Synchronization -->>-->>-->>-->>-- B
A --<<--<<--Acknowledgement + Synchronization--<<--<<--
A-->>-->>-->>-->>--Acknowledgement-->>-->>-->>-->>--B
A ---<<--<<--<<---Connection  Established---<<--<<--<<---B

Step 2. Data Transferring
A -->>-->>-->>-->>-->>--Packet  1-->>-->>-->>-->>-->>--B
A--<<--<<--<<--<<--Acknowledgement 2--<<--<<--<<--<<--B
Remember that when B receives the packet number 1, B send Acknowledgement number 2 

A--->>-->>-->>-->>---Packet  2, 3, 4, 5--->>-->>-->>-->>---B
A--<<--<<--<<--<<--Acknowledgement   6--<<--<<--<<--<<--B
A->>-->>-->>---Packet 6, 7, 8, 9, 10, 11, 12, 13-->>-->>-->>-B
A--<<--<<--<<--<<--Acknowledgement 11--<<--<<--<<--<<--B
See the above incident, A sends packet number 6 to 13 but B sends the acknowledgement number 11. That means B has only received packets up to number 10. Then A have to send lost packets again.


A->>-->>-->>-->>---Packet 11, 12, 13, 14->>-->>-->>--->>--B
A--<<--<<--<<--<<--Acknowledgement  15--<<--<<--<<--<<--B

Likewise A always wants to finish sending packets as possible as early. So A gradually increase the number of packets sending in one time. But at a certain level B gets busy and fails to handle all the packets, Then B send a message to A to say that the number of packets sending in one time is too much, so please decrease the number of packets. Then A decrease the number of packets and in such case the data flowing rate is increasing and decreasing automatically. If you observe the data flowing rate via a graphical chart you can see the rate is going up and down like this.

Windowing - Automatic Flow Control, TCP - Transmission Control Protocol

This process calling windowing (automatic flow control) in TCP

Wednesday, August 11, 2010

Three way handshake Concept (3 Way handshake)

How a Connection establish in TCP/IP according to the Three way Handshake (3Way handshake) concept

Three way handshake Concept, TCP/IP, connection, Host PC, packets, synchronization
Three way handshake is regarding establishing a TCP socket connection between two pc's in three steps. It just happens like this. Assume that you have two pc's called host A and host B. They are connected physically with appropriate cables via Ethernet ports. TCP/IP protocol is running.

Step 1. Host A sends a synchronization packet to the Host B
just asking "Hello friend, I would like to establish a connection with you. Would you like ?

Step 2. Host B replies to Host A with a Acknowledgement packet + synchronization packet   
Acknowledgement packet says that "Yes I like to establish a connection with you" and Synchronization packet says "Please confirm it"

Step 3. Host A sends an Acknowledgement packet to Host B 
To say that " OK, then we'll establish a connection"

This is how a connection establish with 3way handshake (Threeway handshake) concept

Then three way handshake CONNECTION ESTABLISHED and starts to flow data between two hosts. In next post we'll see how the data flowing taking place between two hosts and controlling flow by them self. think all are very clean and clear here and you enjoyed it. 
Related Posts with Thumbnails