This is a static, read-only archive of Wireshark Q&A. Older questions and answers from October 2017 and earlier can be found at osqa-ask.wireshark.org.
0

Wlan packet radio duration sometimes larger than inter-packet delay

asked Oct 30 '17

updated Nov 01 '17

In my .pcap file captured in WLAN, I am getting the duration of the current packet more than the difference between capture times of current and next packets.

How come is it possible? If such a thing happened, it will mean that the first packet was still being captured when the next packet arrived. For example, for two packets, capture times are T1=0.002124s, T2=0.003407s, so T2-T1=0.001283s, and the duration of the first packet (given by the wlan_radio.duration display filter), D=0.002112s, which makes D>T2-T1. So, which one is correct: the duration field displayed by the Wireshark, or the packet capture times?

2 Answers

1

answered Nov 01 '17

You might need to disable the 802.11 radio information preference "TSF indicates the end of the PPDU". This preference is enabled by default. The fly-over comment associated with this option states "Some generators timestamp the end of the PPDU rather then the start of the (A)MPDU." In this context "generators" meaning the the device that created the wlan packet capture. I need to disable this preference for captures generated by my MacBook to avoid the same issue you appear to be having.

Comments

Can you please tell me where to disable preference, as I can see under the Edit->Preferences->.protocols a menu name IEEE802.11 and IEEERariotap, but I can't find the "TSF indicates the end of the PPDU" preference under these.

User 92967 ( Nov 01 '17 )

You'll find it at '802.11 Radio' protocol preferences.

User 39986 ( Nov 01 '17 )

In the preferences under Edit menu, there is only 'IEEE Raditap' protocol preference, and that shows only two fields: 'Assume bit 14 means FCS in header' and 'Interpret High rates as MCS'. Is there any other path?

User 92967 ( Nov 01 '17 )

Wireshark version?

User 39986 ( Nov 01 '17 )

Version 2.2.6, running on Ubuntu 16.06

User 92967 ( Nov 01 '17 )

This does not exist in Wireshark 2.2. You'll need to run Wireshark 2.4 for this.

User 39986 ( Nov 01 '17 )

What is the duration of Frame T2 showing?

User 23750 ( Nov 01 '17 )

1072 usec.

User 92967 ( Nov 01 '17 )

Even after installing Wireshark 2.4.2, I am seeing the same values. The packet duration is more than interpacket capture delay, in the example I gave in the question. (Here duration is shown by wlanradio.duration, and captures times are given by frame.timerelative

User 92967 ( Nov 01 '17 )

But is the '802.11 Radio' protocol preferences available? Have to disabled TSF indicates the end of the PPDU?

User 39986 ( Nov 01 '17 )

That makes sense. Then the capture time will be the time when the last byte has been captured. So:

T2-T1=0.001283s
D2=0.001072s, which makes D2<T2-T1

And what is the capture time of the frame in front of T1?

User 23750 ( Nov 01 '17 )

@User 23750: No, that does not make sense. Or at least I think so. It should be D1 < T2-T1, but D1 is 0.002112s. Or, it will only be correct if I assume that Wireshark records the end time of the frame.as the capture time. Is it that the case?

@User 39986: It still shows the same values for duration filed. But now it has added some more fields under the duration, like start and end fields.

User 92967 ( Nov 01 '17 )

@User 92967 why can’t you imagine that the last Byte counts for stamping the capture time. As this is thetime where the frame arrives the stack for further processing.

User 23750 ( Nov 01 '17 )

@ml Perhaps have a look at some at some small sample wifi captures attached to wireshark bug 13460. https://bugs.wireshark.org/bugzilla/s... Specifically look at the capture labeled "Small 12 frame wifi trace with Beacon and VHT NDP Announcement" (12-exported-wifi-with-beacon.pcapng). If you enable the wireless timeline feature and toggle the "TSF indicates the end of the PPDU" option you will actually see the difference this makes w.r.t to packets 2-6. The left edge of Packet 6's shows up before packets 2-5 when TSF indicates the end is enabled.

User 86582 ( Nov 02 '17 )

@User 23750: It's now clear to me that the capture time of a packet is the time the capture of that packet ends. Thank you for that. @User 86582 The problem still remains, as it does not change the Duration, In the new version, three more fields appear after Duration: Preamble, Start, Stop, and for some frames, IFS. Toggling the said preference changes the "Start" and "End" values and not the "Duration" value. What I wanted was to get the remaining time when I subtract Duration of the current packet from the difference in capture times of the current and the previous packets. I call it the idle time. (for the time being I assume all other times like IFS, backoff, and any undecoded energy etc are part of idle time). The idle time can never be negative. But that is happening now, as I explained in the question.

Thank you to @User 39986 and @User 86582 too. Please feel free to correct me if I understood wrong.

User 92967 ( Nov 02 '17 )
0

answered Nov 03 '17

updated Nov 03 '17

Your T1 and T2 values are the timestamps of the packets as recorded by the OS. Packet timestamps are not necessarily the instant that the start of the packets were seen by the WLAN interface. CPU scheduling and processing overhead can delay when the packets are timestamped causing the reported delay between two packets to be shorter or longer than was actually seen at the NIC. In the case of the WLAN packets, depending on the hardware and software, there's the opportunity of recording and reporting of the NIC's TSF value. The Radiotap header tree may include the TSF value as the MAC timestamp (radiotap.mactime) and the 802.11 radio information tree may include this value as the TSF timestamp (wlanradio.timestamp). The WLAN Duration field (wlanradio.duration) is a best effort calculated field based on the TSF. Recent enhancements to the 802.11 dissector have improved the calculation of the Duration field and includes some extra fields to help confirm the math.

Comments

Thank you. I will see it.

User 92967 ( Nov 03 '17 )
cc-by-sa Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.