This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Why are the bytes ‘00 00’ but Wireshark shows an ip total length of 2016?

0

The ip total length field gives the value in bytes of the ip header along with the data it contains. However, in the below image the byes are 00 00 but Wireshark has a total length 0f 2016. Can someone clue me in on how that is calculated?

alt text

asked 25 Nov '12, 12:13

Binyan's gravatar image

Binyan
6112
accept rate: 0%

looks strange. Your screenshot shows 0x0000 where it should be 0x07E0.

Can you post that single packet as pcap file on cloudshark.org?

(25 Nov '12, 12:49) Kurt Knochner ♦

I've save the single packet as a pcap file but loudshark.org, doesn't resolve for me. Is that the correct address?

(25 Nov '12, 13:32) Binyan

sorry, should have been cloudshark.org.

(25 Nov '12, 13:40) Kurt Knochner ♦
(25 Nov '12, 13:43) Binyan

2 Answers:

1

Sometimes valid IP packets from interfaces doing TCP segmentation offloading will have an IP length of 0, and Wireshark has a preference to handle that. The preference is probably set for you; note that if you turn it off, things will not work very well.

For some reason, at least with Safari, Cloudshark isn't letting me download the packet; Chrome on OS X, and Internet Explorer 9 on a Windows 7 virtual machine, isn't doing so either. Perhaps Cloudshark is just completely broken.

The Git-trunk version of tcpdump has code, compiled in if GUESS_TSO is #defined, to do the same thing Wireshark does; that's not enabled by default. The blog post I cited above says

Note: Network Monitor already takes that into account and hence you don’t need to take any corrective action if you’re checking the trace with it.

and I think it's a Microsoft blog, so, while NetMon may show the field as having the value 0 (because its dissection is done based on protocol format descriptions, which might make it harder to show the inferred value of the field), it might still handle the packet correctly.

Wireshark should probably note that this is a calculated value and that this is the result of TCP segmentation offloading; I've modified the code on the SVN trunk to do so.

answered 25 Nov '12, 16:37

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196
accept rate: 19%

edited 25 Nov '12, 19:16

Cloudshark isn't letting me download the packet;

just remove /export from the URL and then use the regular download function of cloudshark. The /export links don't seem to work very well.

(26 Nov '12, 03:14) Kurt Knochner ♦

That worked - I guess the /export URL is a URL for the export pop-up window, and, if accessed out of context, doesn't work. I edited the comment containing the URL to remove the /export.

(26 Nov '12, 12:05) Guy Harris ♦♦

0

O.K. it's really 0x0000 and Wireshark (1.9.0 SVN-46157) shows the length as 2016. As this is clearly wrong, I double checked with tcpdump and MS Netmon.

tcpdump:

20:50:14.587897 IP bad-len 0

MS Netmon:

shows IP TotalLength as 0

I would say, this is probably a bug in Wireshark. If Wireshark deduces the length from the rest of the frame, it should at least output some warning about the zero IP length (Expert Info and/or coloring of IP Length field).

Please file a bug report at bugs.wireshark.org with a link to this question. Please provide the capture file in the bug report.

Please also post the link to the bug here.

Regards
Kurt

answered 25 Nov '12, 13:54

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
24.8k1039237
accept rate: 15%

edited 25 Nov '12, 14:02

Well I would think it is an error if it wasn't for the fact that the # is correct. There really is 2016 bytes of data in the packet (20 bytes for ip header + 20 bytes for tcp header + 1976 bytes for HTTP post). I have a total of 6 post in ths file and 4 have this issue where there is a total length of 00 00 but the byte count is really right.

(25 Nov '12, 14:07) Binyan

Well I would think it is an error if it wasn't for the fact that the # is correct.

if it's a bug or not is up to the core developers to decide. However, there is no (full) plausibility check of the IP length in the code, so either this is by design or a bug ;-)

(25 Nov '12, 14:42) Kurt Knochner ♦

there you have it. It's by design :-))

(26 Nov '12, 02:19) Kurt Knochner ♦