Alpha Centauri Studies
CoursesFor Institutions

Loading...

Alpha Centauri Studies

CSEC past papers, worked

Past papers worked question by question, and courses built on the CSEC syllabus, for students across the Caribbean.

Serving Caribbean students since 2025

Explore

CoursesAboutContact

Support

PrivacyTermsHelp

Subscribe to Our Newsletter

New papers and courses, when they land.

Connect With Us
© 2026 Alpha Centauri Studies. All rights reserved.
1.5 Compare TCP to UDP

Lab9.2.4.3ccna122 min

9.2.4.3 Lab - Using Wireshark to Examine TCP and UDP Captures

Topology – Part 1 (FTP)

Part 1 will highlight a TCP capture of an FTP session. This topology consists of a PC with Internet access.

The PC is the FTP client. It connects to a router labelled Default Gateway, which reaches the internet, where the FTP server is.

Topology – Part 2 (TFTP)

Part 2 will highlight a UDP capture of a TFTP session. The PC must have both an Ethernet connection and a console connection to Switch S1.

Switch S1 is the TFTP client and PC-A is the TFTP server, joined on S1 port F0/6. Nothing leaves the bench.

Addressing Table (Part 2)

DeviceInterfaceIP AddressSubnet MaskDefault Gateway
S1VLAN 1192.168.1.1255.255.255.0N/A
PC-ANIC192.168.1.3255.255.255.0192.168.1.1

Objectives

Part 1: Identify TCP Header Fields and Operation Using a Wireshark FTP Session Capture

Part 2: Identify UDP Header Fields and Operation Using a Wireshark TFTP Session Capture

Background / Scenario

Two protocols in the TCP/IP transport layer are TCP (defined in RFC 761) and UDP (defined in RFC 768). Both protocols support upper-layer protocol communication. For example, TCP is used to provide transport layer support for the HyperText Transfer Protocol (HTTP) and FTP protocols, among others. UDP provides transport layer support for the Domain Name System (DNS) and TFTP, among others.

Note: Understanding the parts of the TCP and UDP headers and operation are a critical skill for network engineers.

In Part 1 of this lab, you will use the Wireshark open source tool to capture and analyze TCP protocol header fields for FTP file transfers between the host computer and an anonymous FTP server. The Windows command line utility is used to connect to an anonymous FTP server and download a file. In Part 2 of this lab, you will use Wireshark to capture and analyze UDP header fields for TFTP file transfers between the host computer and S1.

Note: The switch used is a Cisco Catalyst 2960s with Cisco IOS Release 15.0(2) (lanbasek9 image). Other switches and Cisco IOS versions can be used. Depending on the model and Cisco IOS version, the available commands and the output produced might vary from what displays in the labs. Note: Make sure that the switch has been erased and has no startup configurations. If you are unsure, contact your instructor.

Note: Part 1 assumes the PC has Internet access and cannot be performed using Netlab. Part 2 is Netlab compatible.

Required Resources – Part 1 (FTP)

1 PC (Windows 7 or 8 with command prompt access, Internet access, and Wireshark installed)

Required Resources – Part 2 (TFTP)

1 Switch (Cisco 2960 with Cisco IOS Release 15.0(2) lanbasek9 image or comparable) 1 PC (Windows 7 or 8 with Wireshark and a TFTP server, such as tftpd32 installed) Console cable to configure the Cisco IOS devices via the console port Ethernet cable as shown in the topology

Part 1: Identify TCP Header Fields and Operation Using a Wireshark FTP Session Capture

In Part 1, you use Wireshark to capture an FTP session and inspect TCP header fields.

Step 1: Start a Wireshark capture.

a. Close all unnecessary network traffic, such as the web browser, to limit the amount traffic during the Wireshark capture.

b. Start the Wireshark capture.

Step 2: Download the Readme file.

a. From the command prompt, enter ftp ftp.cdc.gov.

b. Log into the FTP site for Centers for Disease Control and Prevention (CDC) with user anonymous and no password.

A Windows command prompt. The user runs ftp ftp.cdc.gov. The session answers Connected to ftp.cdc.gov., then 220 Microsoft FTP Service. At the prompt User (ftp.cdc.gov:(none)): the user types anonymous, the server answers 331 Anonymous access allowed, send identity (e-mail name) as password, the Password: prompt is answered blank, and the server replies 230 Anonymous user logged in.

c. Locate and download the Readme file by entering the ls command to list the files.

The same FTP session. At the ftp> prompt the user types ls. The server answers 200 PORT command successful, then 150 Opening ASCII mode data connection for file list, and lists eight entries: aspnet_client, pub, Readme, Siteinfo, up.htm, w3c, web.config and welcome.msg. It finishes with 226 Transfer complete and the line ftp: 76 bytes received in 0.00Seconds 19.00Kbytes/sec.

d. Enter the command get Readme to download the file. When the download is complete, enter the command quit to exit.

The same FTP session. At the ftp> prompt the user types get Readme. The server answers 200 PORT command successful, then 150 Opening ASCII mode data connection for Readme(1428 bytes), then 226 Transfer complete, and the client prints ftp: 1428 bytes received in 0.01Seconds 204.00Kbytes/sec. The user then types quit and the server answers 221.

Step 4: View the Wireshark main window.

Wireshark captured many packets during the FTP session to ftp.cdc.gov. To limit the amount of data for analysis, type tcp and ip.addr == 198.246.117.106 in the Filter: entry area and click Apply. The IP address, 198.246.117.106, is the address for ftp.cdc.gov at this time.

A Wireshark capture of the FTP session, with the display filter tcp and ip.addr == 198.246.117.106. Nine packets are listed between the host 192.168.1.17 and the server 198.246.117.106. Packet 20 at 4.571111000 is a 66 byte TCP SYN from 49411 to 21 with Seq=0 and Win=8192; packet 21 at 4.655439000 is the 66 byte SYN, ACK back from port 21 with Seq=0 and Ack=1; packet 22 at 4.655773000 is the 54 byte ACK with Seq=1 and Ack=1. Packet 23 at 4.742303000 is an 81 byte FTP Response: 220 Microsoft FTP Service, packet 24 is a 54 byte ACK with Seq=1 and Ack=28, packet 40 is a 70 byte FTP Request: USER anonymous, packet 41 is a 126 byte FTP Response: 331 Anonymous access allowed, packet 43 is a 54 byte ACK with Seq=17 and Ack=100, and packet 44 is a 61 byte FTP Request: PASS. The Info column runs off the right edge of the source window, so the ends of several lines are shown here as three dots, and the Time column for packets 40 onward is clipped by one digit. The detail pane underneath belongs to packet 52, which is not one of the rows listed: Frame 52, 79 bytes on wire; Ethernet II from GemtekTe_ea:63:8c to Netgear_ea:b1:7a; IPv4 from 192.168.1.17 to 198.246.117.106; the highlighted Transmission Control Protocol line with Src Port 49411, Dst Port 21, Seq 24, Ack 121, Len 25; and a File Transfer Protocol (FTP) line. All five layers are collapsed.

Step 5: Analyze the TCP fields.

After the TCP filter has been applied, the first three frames in the packet list pane (top section) display the transport layer protocol TCP creating a reliable session. The sequence of [SYN], [SYN, ACK], and [ACK] illustrates the three-way handshake.

Three rows cut out of the same capture, the TCP three way handshake. Packet 20 at 4.571111000 goes from 192.168.1.17 to 198.246.117.106, protocol TCP, 66 bytes, and its Info reads 49411 to 21 [SYN] Seq=0 Win=8192 Len=0 MSS and then runs off the edge. Packet 21 at 4.655439000 goes the other way, TCP, 66 bytes, Info 21 to 49411 [SYN, ACK] Seq=0 Ack=1 Win=8192. Packet 22 at 4.655773000 goes from 192.168.1.17 again, TCP, 54 bytes, Info 49411 to 21 [ACK] Seq=1 Ack=1 Win=8192 Len, also cut off. The source crop showed only these three rows and no column headings.

TCP is routinely used during a session to control datagram delivery, verify datagram arrival, and manage window size. For each data exchange between the FTP client and FTP server, a new TCP session is started. At the conclusion of the data transfer, the TCP session is closed. When the FTP session is finished, TCP performs an orderly shutdown and termination.

In Wireshark, detailed TCP information is available in the packet details pane (middle section). Highlight the first TCP datagram from the host computer, and expand the TCP datagram. The expanded TCP datagram appears similar to the packet detail pane shown below.

The detail pane for Frame 1 of a capture, 66 bytes on wire, Ethernet II from IntelCor_1c:50:44 (00:24:d7:1c:50:44) to BelkinIn_9f:6b:8c (14:91:82:9f:6b:8c), IPv4 from 192.168.1.146 to 198.246.117.106. The Transmission Control Protocol layer is open: Src Port 54712, Dst Port 21, Seq 0, Len 0; Stream index 0; TCP Segment Len 0; Sequence number 0 (relative sequence number); Acknowledgment number 0; header length 1000 .... = 32 bytes (8). The Flags subtree is open on 0x002 (SYN): Reserved, Nonce, Congestion Window Reduced, ECN-Echo, Urgent, Acknowledgment, Push, Reset and Fin are all Not set, and Syn is Set, with the summary [TCP Flags: ··········S·]. Below the flags the window size value is 8192, the calculated window size is 8192, the checksum is 0x13e8 [unverified] with Checksum Status Unverified, the urgent pointer is 0, and a collapsed Options line reads 12 bytes, Maximum segment size, No-Operation (NOP), Window scale, No-Operation (NOP), No-Operation (NOP), SACK permitted.

A drawing titled TCP SEGMENT over a bit ruler marked 0, 4, 10, 16, 24 and 31. The first row is TCP SOURCE PORT NUMBER and TCP DESTINATION PORT NUMBER, 16 bits each. Then a full width SEQUENCE NUMBER row and a full width ACKNOWLEDGEMENT NUMBER row. The fourth row is HLEN from bit 0 to 4, RESERVED from 4 to 10, CODE BITS from 10 to 16 and WINDOW from 16 to the end. The fifth row is TCP CHECKSUM and URGENT POINTER, 16 bits each. The sixth row is OPTIONS (IF ANY) as far as bit 24 and PADDING after it. Two full width rows labelled DATA and DATA ... follow. A callout under the drawing expands CODE BITS into six one bit flags, written vertically: URG, ACK, RST, PSH, SYN and FIN.

The image above is a TCP datagram diagram. An explanation of each field is provided for reference:

The TCP Source Port Number belongs to the TCP session host that opened a connection. The value is normally a random value above 1,023. The TCP Destination Port Number is used to identify the upper layer protocol or application on the remote site. The values in the range 0–1,023 represent the “well- known ports” and are associated with popular services and applications (as described in RFC 1700), such as Telnet, FTP, and HTTP. The combination of the source IP address, source port, destination IP address, and destination port uniquely identifies the session to the sender and receiver.

Note: In the Wireshark capture below, the destination port is 21, which is FTP. FTP servers listen on port 21 for FTP client connections.

The Sequence Number specifies the number of the last octet in a segment. The Acknowledgment Number specifies the next octet expected by the receiver. The Code bits have a special meaning in session management and in the treatment of segments. Among interesting values are: ACK - Acknowledgment of a segment receipt. SYN - Synchronize, only set when a new TCP session is negotiated during the TCP three-way handshake. FIN - Finish, the request to close the TCP session. The Window size is the value of the sliding window. It determines how many octets can be sent before waiting for an acknowledgment. The Urgent pointer is only used with an Urgent (URG) flag when the sender needs to send urgent data to the receiver. The Options has only one option currently, and it is defined as the maximum TCP segment size (optional value). Using the Wireshark capture of the first TCP session startup (SYN bit set to 1), fill in information about the TCP header.

From the PC to CDC server (only the SYN bit is set to 1):

Source IP address______
Destination IP address______
Source port number______
Destination port number______
Sequence number______
Acknowledgement number______
Header length______
Window size______

In the second Wireshark filtered capture, the CDC FTP server acknowledges the request from the PC. Note the values of the SYN and ACK bits.

The detail pane for Frame 2, 66 bytes on wire, Ethernet II from BelkinIn_9f:6b:8c (14:91:82:9f:6b:8c) to IntelCor_1c:50:44 (00:24:d7:1c:50:44), IPv4 from 198.246.117.106 to 192.168.1.146. The open TCP layer reads Src Port 21, Dst Port 54712, Seq 0, Ack 1, Len 0, with Stream index 0, TCP Segment Len 0, Sequence number 0 (relative sequence number), Acknowledgment number 1 (relative ack number) and header length 1000 .... = 32 bytes (8). The Flags subtree is open on 0x012 (SYN, ACK): Acknowledgment is Set and Syn is Set, everything else is Not set, and the summary reads [TCP Flags: ·······A··S·]. The window size value is 8192, the calculated window size is 8192, the checksum is 0xabcd [unverified] with Checksum Status Unverified, the urgent pointer is 0, and there are collapsed Options and [SEQ/ACK analysis] lines at the bottom.

Fill in the following information regarding the SYN-ACK message.

Source IP address______
Destination IP address______
Source port number______
Destination port number______
Sequence number______
Acknowledgment number______
Header length______
Window size______

In the final stage of the negotiation to establish communications, the PC sends an acknowledgment message to the server. Notice only the ACK bit is set to 1, and the sequence number has been incremented to 1.

The detail pane for Frame 3, 54 bytes on wire, Ethernet II from IntelCor_1c:50:44 (00:24:d7:1c:50:44) to BelkinIn_9f:6b:8c (14:91:82:9f:6b:8c), IPv4 from 192.168.1.146 to 198.246.117.106. The open TCP layer reads Src Port 54712, Dst Port 21, Seq 1, Ack 1, Len 0, with Stream index 0, TCP Segment Len 0, Sequence number 1 (relative sequence number), Acknowledgment number 1 (relative ack number), and header length 0101 .... = 20 bytes (5), which is shorter than the 32 bytes of the first two frames because this segment carries no options. The Flags subtree is open on 0x010 (ACK): only Acknowledgment is Set, and the summary reads [TCP Flags: ·······A····]. The window size value is 8192, the calculated window size is 8192, the window size scaling factor is 1, the checksum is 0xec50 [unverified] with Checksum Status Unverified, the urgent pointer is 0, and a collapsed [SEQ/ACK analysis] line closes the layer.

Fill in the following information regarding the ACK message.

Source IP address______
Destination IP address______
Source port number______
Destination port number______
Sequence number______
Acknowledgement number______
Header length______
Window size______

How many other TCP datagrams contained a SYN bit? ______

After a TCP session is established, FTP traffic can occur between the PC and FTP server. The FTP client and server communicate with each other, unaware that TCP has control and management over the session.

When the FTP server sends a Response: 220 to the FTP client, the TCP session on the FTP client sends an acknowledgment to the TCP session on the server. This sequence is visible in the Wireshark capture below.

Three packet rows and a detail pane. Packet 4 at 0.116212, selected, runs from 198.246.117.106 to 192.168.1.146, protocol FTP, 81 bytes, Info Response: 220 Microsoft FTP Service. Packet 5 at 0.121669 runs the other way, FTP, 68 bytes, Request: OPTS UTF8 ON. Packet 6 at 0.180369 runs back, FTP, 112 bytes, Response: 200 OPTS UTF8 command successful, and the Info is cut off by the column after the words UTF8 enc. A fourth row above packet 4 is sliced off by the top of the source image and cannot be read. The detail pane is for Frame 4, 81 bytes on wire, Ethernet II from BelkinIn_9f:6b:8c to IntelCor_1c:50:44, IPv4 from 198.246.117.106 to 192.168.1.146, TCP Src Port 21, Dst Port 54712, Seq 1, Ack 1, Len 27. The File Transfer Protocol (FTP) layer is open and inside it the line 220 Microsoft FTP Service, with a carriage return and line feed, is open onto Response code: Service ready for new user (220) and Response arg: Microsoft FTP Service.

When the FTP session has finished, the FTP client sends a command to “quit”. The FTP server acknowledges the FTP termination with a Response: 221 Goodbye. At this time, the FTP server TCP session sends a TCP datagram to the FTP client, announcing the termination of the TCP session. The FTP client TCP session acknowledges receipt of the termination datagram, then sends its own TCP session termination. When the originator of the TCP termination (the FTP server) receives a duplicate termination, an ACK datagram is sent to acknowledge the termination and the TCP session is closed. This sequence is visible in the diagram and capture below.

A sequence diagram with a vertical line for the FTP Client on the left and one for the FTP Server on the right, and seven labelled arrows between them, read top to bottom. First, FTP client - "quit" goes left to right. Then FTP server - "goodbye" comes back right to left, followed by TCP acknowledgement right to left and TCP session ACK FIN sent right to left. Then TCP acknowledgement goes left to right and TCP session ACK FIN sent goes left to right. Last, TCP acknowledgement comes right to left. A plain horizontal line across the bottom is labelled TCP session ends.

By applying an ftp filter, the entire sequence of the FTP traffic can be examined in Wireshark. Notice the sequence of the events during this FTP session. The username anonymous was used to retrieve the Readme file. After the file transfer completed, the user ended the FTP session.

A Wireshark capture filtered to ftp, showing the whole control conversation between the client 192.168.1.146 and the server 198.246.117.106. Packet 4 at 0.116212 is Response: 220 Microsoft FTP Service, 81 bytes. Packet 5 at 0.121669 is Request: OPTS UTF8 ON, 68 bytes, and packet 6 at 0.180369 is Response: 200 OPTS UTF8 command successful, 112 bytes, the selected row. Packet 18 at 34.993981 is Request: USER anonymous, 70 bytes; 19 at 35.052234 is Response: 331 Anonymous access allowed, send identity, 126 bytes; 21 at 39.133664 is Request: PASS, 61 bytes; 22 at 39.188301 is Response: 230 User logged in., 75 bytes. Packet 26 at 43.325986 is Request: PORT 192,168,1,146,213,185, 82 bytes; 29 at 43.381803 is Response: 200 PORT command successful., 84 bytes; 30 at 43.390255 is Request: NLST, 60 bytes; 35 at 43.447231 is Response: 125 Data connection already open, Transfer starting, 108 bytes; 36 at 43.448271 is Response: 226 Transfer complete., 78 bytes. Packet 40 at 55.104521 is Request: PORT 192,168,1,146,213,186, 82 bytes; 43 at 55.171392 is Response: 200 PORT command successful., 84 bytes; 44 at 55.182471 is Request: RETR Readme, 67 bytes; 49 at 55.247925 is Response: 125 Data connection already open, 108 bytes; 53 at 55.294530 is Response: 226 Transfer complete., 78 bytes. Packet 56 at 61.170643 is Request: QUIT, 60 bytes, and packet 58 at 61.723390 is Response: 221 Goodbye., 68 bytes. The longer Info strings are cut off by the column edge in the source.

Apply the TCP filter again in Wireshark to examine the termination of the TCP session. Four packets are transmitted for the termination of the TCP session. Because TCP connection is full-duplex, each direction must terminate independently. Examine the source and destination addresses.

In this example, the FTP server has no more data to send in the stream. It sends a segment with the FIN flag set in frame 59 The PC sends an ACK to acknowledge the receipt of the FIN to terminate the session from the server to the client in frame 60.

In frame 61, the PC sends a FIN to the FTP server to terminate the TCP session. The FTP server responds with an ACK to acknowledge the FIN from the PC in frame 65. Now the TCP session terminated between the FTP server and PC.

The end of the same capture, where the FTP session is torn down. Packet 57 at 61.457683 from 192.168.1.146 to 198.246.117.106 is a 60 byte [TCP Retransmission] 54712 to 21 [PSH, ACK] Seq=113. Packet 58 at 61.723390 is the 68 byte FTP Response: 221 Goodbye. Packet 59 at 61.723391 from the server is 54 bytes, 21 to 54712 [FIN, ACK] Seq=409 Ack=119 Win=130816 Len=0, and it is the selected row. Packet 60 at 61.723507 from the client is 54 bytes, 54712 to 21 [ACK] Seq=119 Ack=410 Win=7784 Len=0. Packet 61 at 61.729268 is 54 bytes, 54712 to 21 [FIN, ACK] Seq=119 Ack=410 Win=7784 Len=0. Packet 62 at 61.752612 is a 68 byte [TCP Out-Of-Order] 21 to 54712 [FIN, PSH, ACK] Seq=395. Packet 63 at 61.752678 is a 66 byte [TCP Dup ACK 60#1] 54712 to 21 [ACK] Seq=120 Ack=410. Packet 64 at 62.028356 is a 66 byte [TCP Dup ACK 58#1] 21 to 54712 [ACK] Seq=410 Ack=119. Packet 65 at 62.028357 is 54 bytes, 21 to 54712 [ACK] Seq=410 Ack=120 Win=130816 Len=0. The detail pane for packet 59 shows Frame 59: 54 bytes on wire (432 bits), 54 bytes captured (432 bits) on interface 0; Ethernet II, Src BelkinIn_9f:6b:8c (14:91:82:9f:6b:8c), Dst IntelCor_1c:50:44 (00:24:d7:1c:50:44); Internet Protocol Version 4, Src 198.246.117.106, Dst 192.168.1.146; and the selected Transmission Control Protocol, Src Port 21, Dst Port 54712, Seq 409, Ack 119, Len 0.

Part 2: Identify UDP Header Fields and Operation Using a Wireshark TFTP Session Capture

In Part 2, you use Wireshark to capture a TFTP session and inspect the UDP header fields.

Step 1: Set up this physical topology and prepare for TFTP capture.

Switch S1, labelled TFTP Client, is joined by a single cable to PC-A, labelled TFTP Server. The port label F0/6 sits on the link at the switch end. No IP addresses appear in the figure.

a. Establish a console and Ethernet connection between PC-A and S1.

b. Manually configure the IP address on the PC to 192.168.1.3. It is not required to set the default gateway.

c. Configure the switch. Assign an IP address of 192.168.1.1 to VLAN 1. Verify connectivity with the PC by pinging 192.168.1.3. Troubleshoot as necessary.

Switch> enable
Switch# conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# host S1
S1(config)# interface vlan 1
S1(config-if)# ip address 192.168.1.1 255.255.255.0
S1(config-if)# no shut
*Mar 1 00:37:50.166: %LINK-3-UPDOWN: Interface Vlan1, changed state to up
*Mar 1 00:37:50.175: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1,
changed state to up
S1(config-if)# end
S1# ping 192.168.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/203/1007 ms

d. Save the running configuration to NVRAM.

S1# copy run start

Step 2: Prepare the TFTP server on the PC.

a. If it does not already exist, create a folder on the PC C: drive called TFTP. The files from the switch will be copied to this location.

b. Start tftpd32 or Tftpd64on the PC.

c. Click Browse and change the current directory to C:\TFTP.

The TFTP server should look like this

The Tftpd64 by Ph. Jounin window, set up as the lab asks. Current Directory is C:\TFTP and Server interfaces is 192.168.1.3 on the Intel(R) 82577LM Giga... adapter, whose name is cut off by the edge of the box. Five tabs run across the middle: Tftp Server, which is the one showing, then Tftp Client, DHCP server, Syslog server and Log viewer. The transfer table below is empty and its column headings read peer, file, start time, progress and bytes. Browse and Show Dir buttons sit on the right, and About, Settings and Help along the bottom.

Notice that in Current Directory, it lists the TFTP Server (PC-A) interface with the IP address of 192.168.1.3.

d. Test the ability to copy a file using TFTP from the switch to the PC. Troubleshoot as necessary.

S1# copy start tftp
Address or name of remote host []? 192.168.1.3
Destination filename [s1-confg]?
!!
1083 bytes copied in 0.84 secs

If you see that the file has been copied, then you are ready to go on to the next step. If the file has not been copied, troubleshoot as needed. If you get the %Error opening tftp (Permission denied) error, determine whether your firewall is blocking TFTP and whether you are copying the file to a location where your username has adequate permission, such as the desktop.

Step 3: Capture a TFTP session in Wireshark

a. Open Wireshark. From the Edit menu, choose Preferences and click the (+) sign to expand Protocols. Scroll down and select UDP. Click the Validate the UDP Checksum if Possible check box and click OK.

The UDP page of Wireshark's Preferences dialog, headed User Datagram Protocol. There are four checkboxes: Show UDP summary in protocol tree is ticked, Try heuristic sub-dissectors first is clear, Validate the UDP checksum if possible is ticked, and Collect process flow information is clear. The protocol list down the left side shows UCP, UDP, which is the selected entry, UDP-Lite, UDPENCAP, UDT, UFTP, UHD and ULP.

b. Start a Wireshark capture.

c. Run the copy start tftp command on the switch.

d. Stop the Wireshark capture.

A capture on the Ethernet interface filtered to tftp, showing a whole file transfer between 192.168.1.1 and 192.168.1.3. Packet 10 at 17.006137 from 192.168.1.1 to 192.168.1.3 is 64 bytes, Write Request, File: s1-confg, Transfer typ..., and it is the selected row. Packet 11 at 17.008212 back from 192.168.1.3 is 46 bytes, Acknowledgement, Block: 0. Packet 12 at 17.012084 is 558 bytes, Data Packet, Block: 1, answered by packet 13 at 17.012376, 46 bytes, Acknowledgement, Block: 1. Packet 14 at 17.014029 is 558 bytes, Data Packet, Block: 2, answered by packet 15 at 17.014133, 46 bytes, Acknowledgement, Block: 2. Packet 16 at 17.017114 is 105 bytes, Data Packet, Block: 3 (last), answered by packet 17 at 17.017219, 46 bytes, Acknowledgement, Block: 3.

e. Set the filter to tftp. Your output should look similar to the output shown above. This TFTP transfer is used to analyze transport layer UDP operations.

Detailed UDP information is available in the Wireshark packet details pane. Highlight the first UDP datagram from the host computer and move the mouse pointer to the packet details pane. It may be necessary to adjust the packet details pane and expand the UDP record by clicking the protocol expand box. The expanded UDP datagram should look similar to the diagram below.

The detail pane for the TFTP write request, with a bracket down the left side marking which lines are the UDP Header and which are the UDP Data. The header part reads User Datagram Protocol, Src Port: 54009, Dst Port: 69, expanded to show Source Port: 54009, Destination Port: 69, Length: 25, Checksum: 0x6964 [correct], which is the highlighted line, [Checksum Status: Good] and [Stream index: 0]. The data part reads Trivial File Transfer Protocol, expanded to show Opcode: Write Request (2), DESTINATION File: s1-confg and Type: octet.

The figure below is a UDP datagram diagram. Header information is sparse, compared to the TCP datagram. Similar to TCP, each UDP datagram is identified by the UDP source port and UDP destination port.

A drawing titled UDP SEGMENT, laid out over a bit ruler marked 0, 16 and 31. The first row is two 16 bit fields, UDP SOURCE PORT and UDP DESTINATION PORT. The second row is another two 16 bit fields, UDP MESSAGE LENGTH and UDP CHECKSUM. Two full width rows below them are labelled DATA and DATA ..., so the whole UDP header is four fields and eight bytes.

Using the Wireshark capture of the first UDP datagram, fill in information about the UDP header. The checksum value is a hexadecimal (base 16) value, denoted by the preceding 0x code:

Source IP address______
Destination IP address______
Source port number______
Destination port number______
UDP message length______
UDP checksum______

How does UDP verify datagram integrity? ______

Source IP address______
Destination IP address______
Source port number______
Destination port number______
UDP message length______
UDP checksum______

A Wireshark detail pane with two layers open. The User Datagram Protocol layer reads Src Port 65001, Dst Port 54009, and inside it Source Port 65001, Destination Port 54009, Length 12, then a line flagged in red reading Checksum 0x8372 incorrect, should be 0xab99, maybe caused by UDP checksum offload, followed by Checksum Status Bad and Stream index 1. Under it the Trivial File Transfer Protocol layer is open and reads Opcode Acknowledgement (4), DESTINATION File s1-confg, and Block 0.

Notice that the return UDP datagram has a different UDP source port, but this source port is used for the remainder of the TFTP transfer. Because there is no reliable connection, only the original source port used to begin the TFTP session is used to maintain the TFTP transfer.

Also, notice that the UDP Checksum is incorrect. This is most likely caused by UDP checksum offload. You can learn more about why this happens by searching for “UDP checksum offload”.

Reflection

This lab provided the opportunity to analyze TCP and UDP protocol operations from captured FTP and TFTP sessions. How does TCP manage communication differently from UDP? ______

Challenge

Because neither FTP nor TFTP are secure protocols, all transferred data is sent in clear text. This includes any user IDs, passwords, or clear-text file contents. Analyzing the upper-layer FTP session will quickly identify the user ID, password, and configuration file passwords. Upper-layer TFTP data examination is more complicated, but the data field can be examined, and the configuration’s user ID and password information extracted.

Cleanup

Unless directed otherwise by your instructor:

  1. Remove the files that were copied to your PC. 2) Erase the configurations on S1. 3) Remove the manual IP address from the PC and restore internet connectivity.

Device Configs

Switch S1

S1#show run
Building configuration...
!
hostname S1
!
interface Vlan1
ip address 192.168.1.1 255.255.255.0
!
end

Your answers

Nothing here is marked. Most of these answers are read off your own machine, so there is no right value to compare them against; they are kept so your work survives.

Check your answersEvery question in this lab, answered. Take your own capture first.→

Source: itexamanswers.net