Wireshark
Wireshark
In this lab, you use the Wireshark network packet analyzer (also called a packet sniffer) to view the
TCP/IP packets generated by the TCP three-way handshake. When an application that uses TCP first
starts on a host, the protocol uses the three-way handshake to establish a reliable TCP connection
between two hosts. You will observe the initial packets of the TCP flow: the SYN packet, then the
SYN ACK packet, and finally the ACK packet.
Caution: Installing or using a packet sniffer application may be considered a breach of the security
policy of an organization, leading to serious legal and financial consequences. It is recommended
that permission is obtained before downloading, installing, or running a packet sniffer application.
Note: The term “packet” is used in this lab. Wireshark actually captures Ethernet frames, which
contain IP packets. The Wireshark application uses the term “frame” when analyzing captures. The
two terms are often used interchangeably, but recall that a frame is a Data Link Layer 2
encapsulation package, and a packet is a Network Layer 3 encapsulation.
d. In the Info column, look for three packets similar to the first three shown in the window
above. The first TCP packet is the [SYN] packet from the initiating computer. The second is
the [SYN, ACK] response from the web server. The third packet is the [ACK] from the
source computer, which completes the handshake.
Step 5: Inspect the TCP initialization Sequence
a. In the top Wireshark window, click on the line containing the first packet identified in Step 4.
This highlights the line and displays the decoded information from that packet in the two
lower windows fill.
Note: The Wireshark windows below were adjusted to allow the information to be viewed in
a compact size. The middle window contains the detailed decoding of the packet.
b. Click the + icon to expand the view of the TCP information. To contract the view, click the –
icon.
c. Notice in the first TCP packet that the relative sequence number is set to 0, and the SYN bit is
set to 1 in the Flags field.
d. Notice in the second TCP packet of the handshake that the relative sequence number is set to
0, and the SYN bit and the ACK bit are set to 1 in the Flags field.
e. In the third and final frame of the handshake, only the ACK bit is set, and the sequence
number is set to the starting point of 1. The acknowledgement number is also set to 1 as a
starting point. The TCP connection is now established, and communication between the
source computer and the web server can begin.
f. Close Wireshark.