π Lecture 140 β Packet Loss Recovery Methods
π Overview: This lecture examines the two primary methods TCP uses to recover from packet loss: Fast Recovery and Retransmission Timeout (RTO). Understanding these mechanisms is critical because they determine how reliably data travels across networks and explain why some applications choose TCP over UDP.
ποΈ Topics Covered
The lecture begins by explaining how Wireshark calculates the Next Sequence Number (nextseq) field to detect packet loss. It then introduces two transport layer protocolsβTCP and UDPβand categorizes applications based on their tolerance for data loss. The two main packet loss recovery methods are explained in detail: Fast Recovery (using duplicate acknowledgments) and Retransmission Timeout (RTO) (using a sender-side timer).
π Lecture Summary
Wireshark's nextseq Value
Wireshark creates a value called nextseq (displayed in the Next Sequence Number field). Its value is determined by adding together the Sequence Number field value of each packet to the number of data bytes in it. Therefore, the next expected sequence number from the sender is available in nextseq. Wireshark assumes that one or more packets have been lost when it sees a sequence number jump beyond the nextseq value.
π Definition β nextseq: The value Wireshark computes by adding the Sequence Number of a packet to the number of data bytes it contains, representing the next expected sequence number from the sender.
Transport Layer Protocol Choices
An Internet application developer has two choices for the transport layer protocol: Transmission Control Protocol (TCP), or User Datagram Protocol (UDP). TCP provides a packet loss recovery mechanism while UDP does not. Based on this feature, there are applications which can and which cannot tolerate data loss. File transfer, e-mail, and Web documents, instant messaging are examples of those applications which cannot tolerate loss. Loss-tolerant apps include real-time audio/video, stored audio/video, and interactive games.
π‘ Why this matters: The choice between TCP and UDP directly affects application reliabilityβloss-intolerant apps must use TCP's recovery methods.
Packet Loss Recovery Method #1 β Fast Recovery
This method can be used only if the receiver supports Fast Recovery. In this method, when the receiver observes a jump in the sequence number value, it will immediately begin sending Duplicate Acknowledgments. Upon receipt of four identical ACKs (the original and three Duplicate ACKs), the sender will retransmit the packet that has been lost.
π Definition β Duplicate Acknowledgment: An ACK sent by the receiver when it detects a gap in sequence numbers, signaling that a packet may be lost. π Example: If packet 100 arrives, then packet 102 arrives (skipping 101), the receiver sends three duplicate ACKs for packet 100. Upon receiving the fourth ACK (original + three duplicates), the sender retransmits the lost packet 101.
Packet Loss Recovery Method #2 β Sender Retransmission Timeout (RTO)
In this method, a sender maintains a timer for a packet. If the packet has not been acknowledged within Retransmission Timeout (RTO) value, the sender retransmits the packet.
π Definition β Retransmission Timeout (RTO): A timer value maintained by the sender for each transmitted packet; if no acknowledgment is received before the timer expires, the sender retransmits the packet. π‘ Why this matters: RTO acts as a safety netβeven if the receiver does not support Fast Recovery, the sender will eventually recover lost packets through timeout-based retransmission.
β Key Takeaways
TCP provides two distinct packet loss recovery methods: Fast Recovery (triggered by duplicate ACKs from the receiver) and RTO (triggered by sender-side timers). Fast Recovery requires receiver support and activates after three duplicate ACKs (four identical ACKs total), allowing faster retransmission without waiting for a timeout. The RTO method is a universal fallbackβif no acknowledgment arrives within the timeout period, the sender retransmits the lost packet. Wireshark detects potential packet loss by monitoring gaps between the Sequence Number field and the computed nextseq value. These recovery mechanisms explain why TCP is essential for loss-intolerant applications like file transfer, email, and web browsing, while UDP suffices for loss-tolerant applications like streaming media.
π§ Quick Revision Questions
- How does Wireshark calculate the nextseq value, and what does a jump beyond it indicate?
- What is the difference between TCP and UDP regarding packet loss recovery?
- How many identical ACKs must the sender receive before triggering Fast Recovery retransmission?
- What triggers a retransmission in the RTO method?
- Name two applications that cannot tolerate data loss and two that can.
π Lecture 141 β Wireshark Lab 45
π Overview: This lecture demonstrates how to use a Wireshark display filter to detect packet loss in a TCP trace file. It shows how to identify βPrevious Segment Not Capturedβ warnings, count occurrences of lost segments, and explains the role of TCP Sequence Numbers in detecting missing packets.
ποΈ Topics Covered
Opening a .pcapng trace file in Wireshark and applying the display filter tcp.analysis.lost_segment. Understanding the βPrevious Segment Not Capturedβ warning message and how Wireshark uses TCP Sequence Numbers to detect packet loss. Interpreting the Status Bar count to determine how many times loss was detected, and clearing the filter after analysis.
π Lecture Summary
Step 1: Open Trace File
Open the file tr-general101d.pcapng in Wireshark. This trace file contains network traffic that will be analyzed for packet loss.
Step 2: Apply the Filter
In the display filter area, enter the filter tcp.analysis.lost_segment and click Apply. This filter tells Wireshark to show only packets where it detected a missing segment in the TCP stream.
π Definition β tcp.analysis.lost_segment: A Wireshark display filter that shows packets flagged because a previous TCP segment was not captured or was lost.
π Example: After applying the filter, the Status Bar shows βDisplayed: 5β. This means Wireshark has detected packet loss five times in this trace file. The Info column displays the warning βPrevious Segment Not Capturedβ for each of these packets.
π‘ Why this matters: This warning means Wireshark did not see the previous packet(s) in a TCP communication. Wireshark keeps track of packet ordering using TCP Sequence Numbers, and from this, it can easily detect when packets are missing.
Step 3: Clear the Filter
After finishing analysis of the trace file, click Clear to remove the filter. This resets the display to show all packets.
π Example: By applying the filter tcp.analysis.lost_segment on the traffic of a trace file, we easily found that packet loss is occurring. However, to determine how many packets were actually lost, we need to examine the TCP sequence numbers more closely.
β Key Takeaways
The filter tcp.analysis.lost_segment is a quick tool to detect packet loss events in a Wireshark trace. The Status Bar shows the total number of times loss was detected. The βPrevious Segment Not Capturedβ warning in the Info column indicates missing segments. Wireshark relies on TCP Sequence Numbers to determine ordering and detect gaps. To find the exact number of lost packets, you must manually analyze TCP sequence numbers rather than relying solely on the filter count.
π§ Quick Revision Questions
- What is the exact display filter used to detect lost TCP segments in Wireshark?
- What warning message appears in the Info column when a packet is flagged by the lost segment filter?
- How many times did Wireshark detect packet loss in the trace file
tr-general101d.pcapng? - What mechanism does Wireshark use to determine packet ordering and detect missing packets?
- Why is the filter count not sufficient to determine the exact number of packets lost?
π Lecture 142 β Wireshark Lab 46
π Overview: This lecture introduces a practical Wireshark lab that adds TCP sequencing columns to a trace file. The goal is to help students understand TCP sequencing behavior and determine how many packets are actually lost when Wireshark displays the βPrevious Segment Not Capturedβ message. This matters because it clarifies a common point of confusion in TCP analysis.
ποΈ Topics Covered
The lecture covers opening a specific trace file (tr-general101d.pcapng), expanding the TCP header in Packet 1, and adding a Sequence Number column by right-clicking on the field and selecting βApply as Column.β It then explains renaming the column to SEQ# by editing column details, and repeats this process for the Acknowledgment Number and Next Sequence Number fields.
π Lecture Summary
Step 1: Open tr-general101d.pcapng
The first step is to open the trace file named tr-general101d.pcapng in Wireshark. This file contains network traffic that will be analyzed for TCP sequencing patterns.
Step 2: Expand the TCP header in Packet 1
Navigate to Packet 1 in the capture and expand the TCP header section to reveal all relevant fields, including sequence numbers and acknowledgment numbers.
Step 3: Add and rename the Sequence Number column
Right-click on the Sequence Number field and select Apply as Column from the context menu. This creates a new column in the packet list pane. Then, right-click on the new column header, select Edit Column Details, and rename the column to SEQ#. This column will display the raw sequence number for each TCP segment.
π Definition β Sequence Number (SEQ#): A 32-bit number in the TCP header that identifies the byte position of the first data byte in the segment relative to the beginning of the data stream.
π Formula: SEQ# = Initial Sequence Number (ISN) + offset for each subsequent segment β Shows the position of data in the TCP flow.
π Example: In a TCP handshake, Packet 1βs SEQ# is the ISN (e.g., 0 relative to the SYN flag). After renaming the column, all packets will display their actual sequence numbers, making it easy to track gaps.
π‘ Why this matters: Adding the SEQ# column allows you to quickly see sequence number progression and detect missing segments indicated by βPrevious Segment Not Captured.β
Step 4: Repeat for Acknowledgment Number and Next Sequence Number
The same process is applied to the Acknowledgment Number field (rename to ACK#) and the Next Sequence Number field (rename to Next SEQ#). These columns provide additional context for understanding TCP flow control and retransmissions.
π Definition β Acknowledgment Number (ACK#): The next sequence number the receiver expects to receive, confirming receipt of all bytes up to that point.
π Definition β Next Sequence Number: The sequence number that will be used in the next segment after the current one (calculated as SEQ# + payload length).
π Example: If Packet 1 has SEQ# = 1000 and carries 200 bytes of data, then Next SEQ# = 1200. If the next received packet has SEQ# = 1200, no loss occurred. If it has SEQ# = 1400, a gap exists.
π‘ Why this matters: The combination of SEQ#, ACK#, and Next SEQ# columns enables you to manually calculate data loss by comparing expected and actual sequence numbers.
β Key Takeaways
A student must remember that three key columns (SEQ#, ACK#, and Next SEQ#) can be added to Wireshark by right-clicking on the TCP header fields and applying them as columns. Renaming these columns (SEQ#, ACK#, Next SEQ#) makes trace analysis intuitive. The SEQ# column reveals where data starts in each segment, while Next SEQ# shows where the next segment should start. By comparing actual Next SEQ# values with the next packetβs SEQ#, you can determine exactly how many bytes were lost (e.g., a gap of 1460 bytes = one lost full-sized segment). This lab directly addresses the βPrevious Segment Not Capturedβ message by replacing guesswork with precise byte-count loss detection.
π§ Quick Revision Questions
- What is the first trace file used in this lab exercise?
- Which TCP header field do you right-click to create the SEQ# column?
- What should you rename the Sequence Number column to?
- Besides SEQ#, what two other columns are recommended to add for TCP sequencing analysis?
- How does the Next SEQ# column help determine packet loss?
π Lecture 143 β Wireshark Lab 47
π Overview: This lecture demonstrates how to build and use the Bad TCP filter expression in Wireshark to quickly identify key TCP problems in a trace file. It provides step-by-step instructions for creating a reusable button that displays problematic packets, helping analysts efficiently diagnose network issues. Understanding this filtering technique is crucial for anyone performing network troubleshooting with Wireshark.
ποΈ Topics Covered
The lecture walks through creating a button using the tcp.analysis.flags && !tcp.analysis.window_update filter expression, saving it as a button named "Bad TCP," and activating it to view TCP problems. It revisits the concept of Previous Segment Not Captured from Topic 142, using packet 10417 as an example to illustrate how Wireshark detects mismatched sequence numbers and calculates lost bytes and packets.
π Lecture Summary
Wireshark Lab 47 β Building a Bad TCP Filter
We build a Bad TCP filter expression in Wireshark. The goal is to create a button which, when clicked once, will view many of the key TCP problems in a trace file.
Step 1: Open tr-general101d.pcapng.
Step 2: Type the following expression in the display filter area: tcp.analysis.flags && !tcp.analysis.window_update. Click the Coloring Rules button and look for the Bad TCP coloring rule. The filter expression we typed in Step 2 is the same as the Bad TCP coloring rule string.
Step 3: Click Save on the display filter toolbar to create a new button. Name this new button Bad TCP.
Step 4: Click the newly created Bad TCP button.
Review from Topic 142 (Packet 10417): When examining a specific packet (e.g., packet 10417) tagged with Previous Segment Not Captured, we access the display via NEXTSEQ# and SEQ# columns:
- NEXTSEQ#: the expected sequence number for the next packet from a given IP (in this example,
9,164,761for the next packet from10.9.9.9) - SEQ#: the actual sequence number in the arriving packet (
9,175,321)
A mismatch occurs: 9,175,321 - 9,164,761 = 10,560 bytes have been lost. The TCP header of packet 10,417 indicates it contains 1,320 bytes of data. Assuming all lost packets were 1,320 bytes long, 10,560 / 1,320 = 8 packets were lost prior to packet 10,417.
π Definition β Bad TCP Filter: tcp.analysis.flags && !tcp.analysis.window_update β a display filter expression that isolates TCP packets flagged by Wireshark with analysis issues (like retransmissions, duplicate ACKs, lost segments) while excluding window updates, which are not considered problems.
π Formula for lost bytes: Expected Next Sequence Number β Actual Sequence Number = Lost Bytes
π Formula for lost packets: Lost Bytes Γ· Bytes per Packet = Lost Packets
π Example: For packet 10,417:
- NEXTSEQ# = 9,164,761
- SEQ# = 9,175,321
- Lost bytes =
9,175,321 β 9,164,761 = 10,560 - Data per packet = 1,320 bytes
- Lost packets =
10,560 Γ· 1,320 = 8 packets
π‘ Why this matters: The Bad TCP button allows you to instantly surface all problematic TCP packets across a trace file, saving time by not manually scanning each packet for errors.
β Key Takeaways
The Bad TCP filter expression tcp.analysis.flags && !tcp.analysis.window_update is the exact string used by Wireshark's built-in Bad TCP coloring rule. Saving this expression as a button creates a one-click diagnostic tool to view all major TCP problems in a trace file. The Previous Segment Not Captured error is triggered by a mismatch between the NEXTSEQ# (expected sequence number) and SEQ# (actual sequence number). Calculating lost bytes (NEXTSEQ# β SEQ#) and dividing by the segment size (data bytes per packet) yields an estimate of the number of lost packets. This technique is essential for efficient network troubleshooting.
π§ Quick Revision Questions
- What is the exact display filter expression used to create the Bad TCP button?
- Why is the
!tcp.analysis.window_updatepart included in the filter expression? - In the example, how many lost bytes were detected between the NEXTSEQ# and the SEQ# for packet 10,417?
- Assuming all lost segments are 1,320 bytes long, how many packets were estimated lost prior to packet 10,417?
- What does the Previous Segment Not Captured Expert indication in Wireshark signify?
π Lecture 144 β Wireshark Lab 48
π Overview: This lecture teaches how to find packet loss counts using the Expert Infos feature in Wireshark. It demonstrates the practical steps to analyze network traces and interpret Wireshark's built-in diagnostic tools for identifying potential network problems.
ποΈ Topics Covered
The lecture covers opening a specific trace file (tr-general101d.pcapng), using the Expert Infos button on the Status Bar, interpreting the Errors tab (which shows no serious problems), and examining the Warnings tab to detect packet losses based on sequence number jumps. It also mentions that Wireshark detected 5 packet losses due to sudden jumps in sequence numbers, and notes that Wireshark does not take into account certain factors when counting losses.
π Lecture Summary
Step 1: Opening the Trace File
Open the file tr-general101d.pcapng in Wireshark. This is a pre-captured network traffic file that will be analyzed for packet loss.
Step 2: Accessing Expert Infos
Click the Expert Infos button located on the Status Bar of Wireshark. This opens a diagnostic window that provides automated analysis of the captured traffic.
Step 3: Interpreting Expert Infos Results
The Expert Infos title bar shows 1,616 Expert Infos items in the trace file. Under the Errors tab, there are no entries because Wireshark could not detect any serious problem in the trace file. π‘ Why this matters: This means the trace file has no malformed packets or protocol violations.
When you click the Warnings tab, Wireshark has observed 5 packet losses. This detection is based on sudden jumps in sequence numbers in the TCP traffic. Wireshark does not take into account all factors when counting losses β it only flags losses based on sequence number discontinuities.
π Lecture 145 β Wireshark Lab 49
π Overview: This lecture teaches how to identify where packets are being dropped in a network using Wiresharkβs Expert Infos feature. By analyzing warnings like βPrevious segment not capturedβ and observing Duplicate ACKs, network engineers can pinpoint packet loss locations and troubleshoot performance issues.
ποΈ Topics Covered
Opening a trace file and accessing the Expert Infos window. Navigating the Warnings tab to find βPrevious segment not capturedβ entries. Jumping to a specific packet (e.g., Packet 10,417) that indicates the first hint of loss. Observing the subsequent Duplicate ACKs that confirm the packet was dropped.
π Lecture Summary
Topic 145: Wireshark Lab 49
This topic shows how to use Wiresharkβs Expert Infos feature to detect where packets are being dropped in a TCP flow. The process begins with opening trace file tr-general101d.pcapng and clicking the Expert Infos button on the Status Bar. Inside the Expert Infos window, you click the Warnings tab to see all captured warnings.
From the Previous segment not captured (common at capture start) section, you can see the exact instances of Out-of-Order segments. The trace in this lecture contains 8 such instances. To analyze a specific problem, expand the section and click on a listed packet β Wireshark will jump to that packet in the Main window.
π Definition β Out-of-Order segment: a TCP segment that arrives at the receiver before a previous segment (that was expected first), typically due to packet loss or reordering.
π Definition β Duplicate ACK: a TCP acknowledgment sent by the receiver when it receives an out-of-order segment, informing the sender that it is still waiting for the missing segment.
π Example: Packet 10,417 is identified as the first packet after the loss point. After clicking it in the Expert Infos listing, Wireshark jumps to that packet in the main trace. Examining the surrounding traffic reveals numerous Duplicate ACKs following the missing packet indication, confirming that the packet at that position (or just before it) was dropped and never reached the destination.
π‘ Why this matters: By identifying the exact packet number where the loss is first detected, you can then examine the actual contents of surrounding packets to determine why the drop occurred β whether due to network congestion, a faulty link, or a misconfiguration.
β Key Takeaways
To locate packet drops in Wireshark, always start by opening the Expert Infos window from the Status Bar and clicking on the Warnings tab. Look for βPrevious segment not capturedβ entries; these mark the first sign of missing data. Clicking on any listed packet instantly jumps to that location in the Main window. After identifying the loss point, immediately check for Duplicate ACKs β their presence confirms that the packet was truly dropped and not just delayed. This method works across any .pcapng trace file and is the standard approach for diagnosing TCP retransmission events.
π§ Quick Revision Questions
- What is the first step to locate a packet drop using Wiresharkβs Expert Infos?
- On which tab of the Expert Infos window do you find βPrevious segment not capturedβ warnings?
- How many instances of Out-of-Order segments are noted in the Warnings tab for this trace?
- After jumping to a packet that indicates loss, what type of TCP packet confirms the drop?
- What is the practical benefit of clicking a packet listed in the Expert Infos Warnings tab?
π Lecture 146 β Duplicate ACKs and their Causes
π Overview: This lecture explains what duplicate ACKs are, why they are generated, and how they serve as signals for packet loss or out-of-order packet delivery. Understanding duplicate ACKs is essential for diagnosing TCP performance issues and network congestion.
ποΈ Topics Covered
The lecture covers how duplicate ACKs are used to inform the sender about packet loss, how they can also indicate out-of-order packets, under what conditions a host generates duplicate ACKs (when it supports Fast Recovery and detects a packet with sequence number beyond expected), and how to analyze packet capture to determine if packet loss or retransmission is occurring upstream or downstream.
π Lecture Summary
Duplicate ACKs and Packet Loss Detection
Duplicate ACKs are used to inform the sender about packet loss. Each duplicate ACK acts as a request for a specific sequence number. For instance, in the example, the receiver at 10.10.10.10 supports Fast Recovery using duplicate ACKs. Each duplicate ACK is a request for sequence number 9,164,761, as seen in the Acknowledgment Number field. The sender uses these duplicate ACKs to detect that a packet has been lost and that retransmission is needed.
π Definition β Duplicate ACK: An acknowledgment packet sent by a receiver that requests the same sequence number as a previous ACK, indicating that the receiver has not yet received the expected packet.
π Formula: No formula β the concept is based on sequence number tracking.
π Example: In the packet capture, the missing packet has sequence number 9,164,761. By filtering with tcp.seq==9164761, you can see whether the capture contains both the original packet and the retransmission, or just the retransmission. This determines whether you are upstream or downstream from the point of packet loss.
Determining Capture Position (Upstream vs. Downstream)
To diagnose packet loss, it is crucial to determine where the packet capture was made relative to the point of loss. If you see both the original packet and the Retransmission, the capture is upstream from the point of packet loss (closer to the sender). If you see only the Retransmission, the capture is downstream (closer to the receiver). In this example, entering tcp.seq==9164761 in the display filter area showed only the Retransmission, indicating downstream capture. Packet loss always degrades network performance; locate it and investigate its cause.
π Definition β Upstream capture: Capturing traffic closer to the data sender than the point of packet loss, allowing both original and retransmitted packets to be seen.
π Definition β Downstream capture: Capturing traffic closer to the receiver than the point of packet loss, where only retransmitted packets are visible (the original was lost before the capture point).
π Example: Using display filter tcp.seq==9164761 for the missing sequence number, if the filter shows only one packet (the retransmission), you are downstream. If it shows two packets (original and retransmission), you are upstream.
π‘ Why this matters: Knowing whether you are upstream or downstream helps pinpoint where packet loss is occurring in the network path.
Causes of Duplicate ACKs and Fast Recovery
Duplicate ACKs can also be an indication of out-of-order packets, not just packet loss. A host generates duplicate ACKs if it supports Fast Recovery and notices that a packet has arrived with a sequence number beyond the calculated next sequence number. When the receiver expects a particular sequence number but receives a higher one, it sends a duplicate ACK for the missing sequence number. Details of Fast Recovery are found in RFC 5681, "TCP Congestion Control." To determine whether an ACK is a duplicate ACK, check the Acknowledgment Number field; if it repeats the same value as a previous ACK, it is a duplicate.
π Definition β Fast Recovery: A TCP congestion control mechanism defined in RFC 5681 that allows a sender to retransmit a lost packet without waiting for a timeout, triggered by receiving three duplicate ACKs.
π Example: If the receiver expects sequence number 1000 but receives packet with seq=1200, it generates a duplicate ACK for seq=1000. Repeated duplicate ACKs for the same sequence number tell the sender that packet 1000 was likely lost or delayed.
β Key Takeaways
Duplicate ACKs serve as a signal for TCP to detect packet loss when the receiver supports Fast Recovery. They are generated when a packet arrives with a sequence number beyond the expected next sequence number. To diagnose network issues, capture location relative to packet loss (upstream or downstream) determines whether you see original and retransmitted packets or only the retransmission. Packet loss always degrades network performance, so locating and analyzing the point of loss is critical. Out-of-order packet delivery can also cause duplicate ACKs, so this must be considered when interpreting network captures.
π§ Quick Revision Questions
- What is the primary purpose of duplicate ACKs in TCP?
- How can you determine if your packet capture is upstream or downstream from the point of packet loss?
- What display filter would you use to check for a specific missing sequence number in Wireshark?
- Under what condition does a host generate duplicate ACKs (besides packet loss)?
- Which RFC defines the Fast Recovery mechanism mentioned in this lecture?
π Lecture 147 β Wireshark Lab 50
π Overview: This lecture demonstrates how to use Wireshark to analyze TCP retransmission behavior, specifically by counting Duplicate ACKs. It teaches the practical application of display filters to identify network packet loss and retransmission patterns, which is essential for network troubleshooting.
ποΈ Topics Covered
This lecture covers the definition and detection of Duplicate ACKs in Wireshark, the criteria for marking packets as Out-of-Order vs. Retransmissions, the use of specific display filters (tcp.analysis.duplicate_ack and tcp.analysis.out_of_order), and a step-by-step lab exercise to count Duplicate ACKs and identify the missing packet they request.
π Lecture Summary
Duplicate ACKs in Wireshark
Wireshark uses Data bytes, Window Size, Sequence Number, and ACK Number fields to identify duplicate acknowledgments. When two or more packets with identical values in all these fields arrive at a host from the same source, Wireshark marks the second and subsequent packets as duplicates of the first ACK. In Duplicate ACKs, the ACK Number field value indicates the requested sequence number β the packet that the receiver is still waiting for. A TCP host continues sending Duplicate ACKs until it receives the missing packet.
π Definition β Duplicate ACK: A packet with the same Data bytes, Window Size, Sequence Number, and ACK Number as a previous ACK, indicating the receiver has not yet received the expected packet.
Out-of-Order vs. Retransmission
When a receiver receives a packet with an incoming sequence number that jumps higher than the expected value, it cannot immediately determine if the packet is lost or merely out of order and arriving soon. Wireshark applies a 3 ms threshold to distinguish between these cases:
- If the missing sequence number packet arrives within 3 ms, Wireshark marks it as Out-of-Order.
- If it arrives later than 3 ms, Wireshark marks it as Retransmission or Fast Retransmission.
π Definition β Out-of-Order: A packet whose missing sequence number arrives within 3 ms, indicating a reordering event rather than packet loss. π Definition β Retransmission/Fast Retransmission: A packet whose missing sequence number arrives more than 3 ms after the gap was detected, indicating probable packet loss.
π‘ Why this matters: The 3 ms threshold helps network engineers distinguish between harmless packet reordering (common in load-balanced networks) and actual packet loss (which degrades TCP performance).
Wireshark Filters for ACK Analysis
Wireshark provides two key display filters for analyzing TCP acknowledgment behavior:
tcp.analysis.duplicate_ackβ used to determine the number of duplicate ACKs in a capture.tcp.analysis.out_of_orderβ used to keep a record of Out-of-Order packets.
π Formula: tcp.analysis.duplicate_ack β counts all packets Wireshark identifies as duplicate ACKs.
π Formula: tcp.analysis.out_of_order β counts all packets Wireshark identifies as out-of-order.
Lab: Counting Duplicate ACKs
Step 1: Open the trace file tr-general101d.pcapng.
Step 2: Enter the filter tcp.analysis.duplicate_ack in the display filter area and click Apply. From the Status Bar, Wireshark displays it has detected 1,019 Duplicate ACKs.
Step 3: Expand the TCP header of a packet. Click on the Acknowledgment Number field and select Apply as Column. Name this column ACK# by right-clicking on the column header and selecting Edit Column Details. When scrolling through the trace file, you will observe that all these Duplicate ACKs are requests for a single missing packet whose sequence number is 9,164,761.
π Example: In tr-general101d.pcapng, after applying the tcp.analysis.duplicate_ack filter, Wireshark shows 1,019 Duplicate ACKs. By adding the ACK Number as a column, we see all these ACKs request sequence number 9,164,761, indicating that one packet is lost and the receiver is repeatedly asking for it.
β Key Takeaways
The most critical point from this lecture is that Wireshark identifies Duplicate ACKs by matching four identical fields (Data bytes, Window Size, Sequence Number, ACK Number) from the same source. The 3 ms threshold distinguishes Out-of-Order packets from Retransmissions β packets arriving within 3 ms of the gap are considered reordered, while those arriving later are considered lost. The display filter tcp.analysis.duplicate_ack can count all Duplicate ACKs in a capture, and the ACK Number field reveals which specific packet is being requested. A single missing packet can generate over 1,000 Duplicate ACKs, demonstrating how aggressively TCP requests retransmission. Always extract the ACK Number as a column to identify the exact missing sequence number.
π§ Quick Revision Questions
- What four fields does Wireshark use to identify Duplicate ACKs?
- What is the time threshold (in milliseconds) Wireshark uses to distinguish Out-of-Order packets from Retransmissions?
- What does the ACK Number field in a Duplicate ACK indicate?
- How many Duplicate ACKs were detected in the
tr-general101d.pcapngtrace file? - What is the sequence number of the missing packet that all 1,019 Duplicate ACKs are requesting?
π Lecture 148 β Wireshark Lab 51
π Overview: This lecture demonstrates how to identify and analyze Duplicate ACKs in a network trace file using Wireshark's Expert Infos feature. It explains how to count and interpret Duplicate ACKs, which are critical for diagnosing packet loss and understanding TCP Fast Recovery behavior.
ποΈ Topics Covered
The lecture covers finding Duplicate ACKs using Expert Infos in Wireshark, opening the trace file tr-general101d.pcapng, examining Notes tab problems, grouping of Duplicate ACKs based on their number, interpreting multiple occurrences of Duplicate ACKs indicating Fast Recovery launches, and identifying an out-of-order packet situation near Packet 3,217.
π Lecture Summary
Topic 148: Wireshark Lab 51
This topic finds Duplicate ACKs using Expert Infos in Wireshark. Duplicate ACKs are requests for a single missing packet whose sequence number is 9,164,761. The host continues sending Duplicate ACKs until the missing sequence number is resolved.
To hide the ACK# column from view, right-click the ACK# column and select Hide Column. Click Clear to remove the display filter.
Step 1: Open tr-general101d.pcapng. Step 2: Click the Expert Infos button on the Status Bar.
Step 3: Examine problems in this trace file by clicking the Notes tab. Count the Duplicate ACKs. Wireshark does not count all Duplicate ACKs together; it groups Duplicate ACKs based on their number.
In a trace file, assume packet loss occurs twice. Both times the original ACK, Duplicate ACK#1, Duplicate ACK#2, and Duplicate ACK#3 were sent. Wireshark will list 3 Duplicate ACKs with an indication that each occurred twice.
Duplicate ACK (#1) occurs 5 times, i.e., the Fast Recovery process was launched 5 times. The 4 Duplicate ACK (#2) indications mean in one case the receiver only had to send the first Duplicate ACK and then it recovered.
Probably, the one out-of-order packet situation in the trace file occurs near Packet 3,217.
Step 4: Scroll to the end of the Notes section.
π‘ Why this matters: Understanding how Wireshark groups and displays Duplicate ACKs helps network analysts quickly identify the severity of packet loss events and determine whether Fast Recovery mechanisms are successfully resolving them.
β Key Takeaways
The key takeaways are that Duplicate ACKs indicate missing packets and trigger Fast Recovery in TCP. Wireshark's Expert Infos Notes tab groups Duplicate ACKs by number and shows how many times each group occurred. Multiple occurrences of Duplicate ACK (#1) indicate multiple Fast Recovery launches. One out-of-order packet situation was identified near Packet 3,217. The ACK# column can be hidden to simplify analysis.
π§ Quick Revision Questions
- What Wireshark feature is used to find Duplicate ACKs in a trace file?
- How does Wireshark group Duplicate ACKs?
- What does it indicate when Duplicate ACK (#1) occurs 5 times?
- Near which packet number does the out-of-order packet situation occur?
- How can you hide the ACK# column in Wireshark?
π Lecture 149 β Wireshark Lab 52
π Overview: This lecture teaches how to determine if Selective ACK (SACK) is in use by examining Duplicate ACKs in Wireshark. Understanding SACK is critical for network troubleshooting, as it distinguishes between efficient retransmissions (only missing packets) and wasteful retransmissions (all data from the lost point forward), helping engineers diagnose TCP performance issues.
ποΈ Topics Covered
The lecture covers the concept of SACK in TCP, how missing packet recovery differs with and without SACK, and a practical three-step Wireshark lab using tr-general101d.pcapng. It explains how to locate Duplicate ACKs via the Expert Infos window and use them to infer SACK usage when handshake packets are unavailable.
π Lecture Summary
Determining if SACK is in Use by Examining Duplicate ACKs in Wireshark
When two TCP hosts communicate and are using SACK, only the missing packets are retransmitted. If SACK is not in use, many unnecessary retransmissions will be generated β the sender retransmits every data packet starting from the missing sequence number. If the TCP handshake packets are not captured, we can examine duplicate ACKs to determine if SACK is enabled on the connection.
π‘ Why this matters: SACK saves network bandwidth and reduces retransmission overhead. Without it, a single lost packet causes the sender to resend all subsequent data, even if only one segment was lost.
π Definition β Selective ACK (SACK): A TCP mechanism that allows the receiver to acknowledge non-contiguous data blocks, enabling the sender to retransmit only the missing segments rather than everything after the loss.
Step 1: Open tr-general101d.pcapng
This step involves loading the capture file tr-general101d.pcapng in Wireshark.
Step 2: Click the Expert Infos Button on the Status Bar
The Expert Infos button is located on the Status Bar at the bottom of the Wireshark window. Clicking it opens a diagnostic window that analyzes the capture for notable events.
Step 3: Duplicate ACKs Can Be Located by Clicking on the Notes Tab
In the Expert Infos window, click the Notes tab. This tab displays a list of all noted events, including Duplicate ACKs. The text mentions that in one example, the TCP receiver requested a missing packet 809 times, indicating a packet was lost and recovery took significant time due to path latency or network disconnect. Finally, close the Expert Infos window after inspection.
β Key Takeaways
The fundamental difference between SACK and non-SACK TCP retransmission behavior is critical: with SACK only the missing packet is resent, without SACK all data from the missing sequence number must be retransmitted. When handshake packets are not available, you must examine Duplicate ACKs in the Expert Infos Notes tab to infer SACK usage. A high count of duplicate ACKs (e.g., 809 times) suggests either SACK is not in use or there is severe path latency/disconnect. Always use the Expert Infos button on the Status Bar to access diagnostic information.
π§ Quick Revision Questions
- What is the key benefit of SACK compared to non-SACK retransmission?
- How can you determine if SACK is enabled when the TCP handshake packets are missing?
- Where is the Expert Infos button located in Wireshark, and which tab shows Duplicate ACKs?
- What does it imply when the TCP receiver reports a missing packet 809 times?
- What happens to retransmissions if SACK is NOT in use?
π Lecture 150 β Out-of-Order Packets and their Causes
π Overview: This lecture examines the phenomenon of out-of-order packet delivery in TCP/IP networks, where packets arrive at the destination in a different sequence than they were sent. Understanding the causes and detection of out-of-order packets is critical for diagnosing network performance issues and troubleshooting application delays, as TCP cannot deliver data to the application until all bytes are correctly sequenced.
ποΈ Topics Covered
The lecture covers the definition and implications of out-of-order packets, the use of selective acknowledgments (SACK) with left edge (SLE) and right edge (SRE) information to identify missing or misordered segments, and a detailed step-by-step analysis in Wireshark to locate and interpret these TCP header fields for diagnosing such conditions.
π Lecture Summary
Out-of-Order Packets and their Causes
On a receiving host, the transmission control protocol (TCP) layer cannot pass the received data up to the application layer until all bytes are in the correct order. When packets arrive out of sequence β for example, packet 5 arrives before packet 4 β TCP must hold the later-arriving data in its buffer, waiting for the missing segments. This condition, termed out-of-order delivery, can be caused by network load balancing over multiple paths, router queuing variations, or parallel processing in high-speed switches.
π‘ Why this matters: Out-of-order packets force TCP to use acknowledgment mechanisms (like duplicate ACKs or SACK) to request retransmission of missing data, increasing latency and reducing throughput for the application.
π Definition β Out-of-Order Packet: A packet that arrives at the destination with a sequence number that is not the next expected sequence number, forcing TCP to buffer it until missing bytes are recovered.
π Formula: Sequence Number Order β Correct: [SEQ=100, SEQ=200, SEQ=300]; Out-of-Order: [SEQ=100, SEQ=300, SEQ=200] β Receiver holds SEQ=300 buffer until SEQ=200 arrives.
π Example: In Wireshark, when analyzing a TCP stream, if packet 10,420 arrives with a sequence number indicating it is not the next expected byte, the Info column will show SACK Left Edge (SLE) and SACK Right Edge (SRE) values. Expanding the TCP header in packet 10420 under the Options area reveals the exact SLE and RLE values, which specify the byte range of missing data the receiver is acknowledging.
β Key Takeaways
Students must remember that out-of-order packets prevent TCP from delivering data to the application layer immediately, causing buffering delays. The primary tool for identifying out-of-order segments in Wireshark is the Selective Acknowledgment (SACK) option, which uses SACK Left Edge (SLE) and SACK Right Edge (SRE) fields to indicate which byte ranges have been received out of order. To analyze this, expand the Duplicate ACK packet (e.g., packet 10,420) and locate the SLE/SRE values in the TCP header's Options area. The lecture's step-by-step procedure for Wireshark is critical for practical network troubleshooting.
π§ Quick Revision Questions
- Why can the TCP layer not pass received data to the application layer when packets arrive out of order?
- What does SACK stand for, and what information does it convey in the TCP header?
- In Wireshark, which field in the Info column indicates the presence of out-of-order packet data?
- What are SLE and RLE, and where exactly in the packet structure are they found?
- Name two common causes of out-of-order packet delivery in modern networks.
π Lecture 151 β Wireshark Lab 53
π Overview: This lecture examines the phenomenon of out-of-order packet delivery in TCP networks. It explains the causes of out-of-order packets, how Wireshark identifies them, and provides a hands-on lab exercise to detect and count these packets using Wireshark's display filter.
ποΈ Topics Covered
The lecture begins by defining out-of-order packets and the specific conditions Wireshark uses to label them as such. It then covers the primary causes of out-of-order delivery, including multiple speed paths, poor queuing configuration, and asymmetric routing. The second half of the lecture provides a step-by-step Wireshark lab exercise to filter and count out-of-order packets in a sample capture file.
π Lecture Summary
Letβs assume a scenario where two packets arrive at a host in reverse order
Out-of-order packet delivery occurs when packets arrive at a destination in a different sequence than they were sent. The lecture presents a scenario where two packets arrive within 1 ms in reverse order, noting that this is unlikely to cause performance problems. A small time gap between expected and actual arrival of out-of-order packets generally does not affect performance.
π Definition β Out-of-Order Packet: A packet that Wireshark labels as out-of-order if it meets three conditions: (a) contains data, (b) does not advance the sequence number value, and (c) arrives within 3 ms of the highest sequence number seen.
π‘ Why this matters: Wireshark's 3 ms threshold means not every out-of-sequence packet is flagged β only those arriving near the expected time are labeled, reflecting real-world tolerance for minor reordering.
Causes of Out-of-Order Packets
The lecture identifies three primary causes of out-of-order packet delivery:
- A stream using multiple different speed paths to reach the target, where packets take different routes with varying transmission speeds
- A poorly configured queuing along a path, where the queuing device does not forward packets in first-in/first-out (FIFO) order
- Asymmetric routing, where packets in the same stream travel different paths to the destination
π Definition β Asymmetric routing: A network condition where packets in the same TCP stream take different paths to reach the destination, potentially causing out-of-order arrival.
π Example: If a queuing device processes packets in a non-FIFO order (e.g., prioritizing certain packets regardless of arrival sequence), packets that were sent later may arrive before earlier packets, causing out-of-order delivery at the receiving host.
Topic 151: Wireshark Lab 53
This section provides a hands-on lab exercise to count out-of-order packets using a Wireshark display filter. The lab uses a sample capture file to demonstrate the detection process.
Step 1: Open the capture file tr-general101d.pcapng.
Step 2: Enter the expression tcp.analysis.out_of_order in the display filter area and click Apply.
π Formula: tcp.analysis.out_of_order β [This is a pre-defined Wireshark display filter that shows only packets flagged as out-of-order based on the three conditions described above]
π Example: After applying the filter to tr-general101d.pcapng, Wireshark detected 8 Out-of-Order packets as indicated by the Status Bar. Examining the packet numbers revealed specific packets were flagged, though the exact numbers are not specified in the lecture.
β Key Takeaways
Out-of-order packets occur when packets arrive in a different sequence than sent, and Wireshark flags them only if they contain data, don't advance the sequence number, and arrive within 3 ms of the highest sequence number. The three main causes are multiple speed paths, non-FIFO queuing, and asymmetric routing. A small timing difference between expected and actual arrival (within 1 ms) is unlikely to affect performance. Wireshark's specific filter tcp.analysis.out_of_order can detect and count these packets, as demonstrated in the lab where 8 out-of-order packets were found in the sample capture. Understanding these conditions is essential for network troubleshooting and performance analysis.
π§ Quick Revision Questions
- What three conditions must a packet meet for Wireshark to label it as out-of-order?
- Name the three primary causes of out-of-order packet delivery.
- In the lab exercise, how many out-of-order packets did Wireshark detect in the tr-general101d.pcapng file?
- What does "asymmetric routing" mean in the context of out-of-order packets?
- Why might a small time gap (like 1 ms) between expected and actual arrival of out-of-order packets not cause performance problems?