Username:
Password:
TCP/IP Packet Analysis Tutorials

Basics of TCP & UDP Protocols / TCP 3-Way Handshake

Subtitles of the Movie

One final thing that we want to talk about with TCP during this session is the Three-Way Handshake. Now, many of you have probably heard about this if you've done any kind of networking work. Basically it means that TCP, as we know, is a connection-based protocol and so it must establish some kind of formal connection process with the receiving host so that communication can start. It has to go through this formal connection process. This process is called the Three-Way Handshake and essentially it uses some of the flags that we've talked about in the previous session. Certain of these TCP flags are set and sent in a given sequence by both the sending and receiving computers in a certain order. How it starts is like this: the sending computer sends a segment with the SYN Flag set, turned on, that bin's actually set at one or on. This indicates that the communication is starting and it also sends its sequence number in this segment. And it does this to synchronize sequence numbers. Now, the receiving computer, when it gets it, adds its own sequence number into a segment and sets both the SYN and the ACK Flags to synchronize the sequence numbers and to acknowledge the session with its own sequence number. So it sends this back to the sender. Once this happens, the sender then sends the segment back to the receiver with the ACK Flag set on to acknowledge the receiver's sequence number. All this happens very quickly and there is a little bit of overhead, but that's what TCP is about; a little bit of overhead to ensure communications reliability. Now, this is a simplified diagram that basically shows how this takes place. Again, we see the computer on the left-hand side, Computer A, sending a SYN packet to the other computer on the right side. The computer on the right side, the receiving computer sends a SYN ACK back to the first computer, which then sends back an acknowledgement flag set in its segment. So it's a very quick process. This happens during every TCP communication session that goes on. Now, there's a similar process when the communications is torn down and we'll talk about that a little bit later. And that makes use of the FIN Flag. In the next session we're actually going to do a demonstration of all these concepts we've talked about with TCP and kind of put them together and show you how they work in an actual communications session.

Tutorial Information

Course: TCP/IP Packet Analysis
Author: Bobby Rogers
SKU: 33909
ISBN: 1-934743-95-X
Release Date: 2008-09-11
Duration: 5 hrs / 60 lessons
Work Files: Yes
Captions: Available on CD and Online University
Compatibility: Vista/XP/2000, OS X, Linux
QuickTime 7, Flash 8

VTC Sign up & Benefits

  • Unlimited Access
  • 81,350 Video Tutorials (20,800 free)
  • Video Available as Flash or QuickTime
  • Over 782 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available