Error events and understanding them

In this recipe, we will get into error and event types, checksum errors, malformed packets, and other types of errors, and what we can understand from them.

Getting ready

Start capturing or open an existing file, and then start the Expert Infos window.

How to do it...

  1. From the Analyze menu, open Expert Infos by clicking on Expert Info.
  2. Click on the Errors: bar (should be opened as default). You will get the following window (all events are examples):
    How to do it...

    In the preceding window, you can see the following two types of errors:

    • Checksum errors: These can be in Ethernet, IP, or other protocols. In this case, it can be because of real errors or offload.
    • Malformed packets: These are usually in the application protocols. In this case also, it can be due to a real problem or a dissector error.

How it works...

Checksum is an error-checking mechanism that uses a byte or a sequence of bytes inserted in the packet in order to implement a frame verification algorithm. The principle of error-checking algorithms is to calculate a formula over the entire message (layer 4), packet (layer 3) or frame (layer 2), insert the result in bytes inside the packet, and when the packet arrives at the destination, it calculates the formula again. If we get the same result, it is a good packet; if not, there is an error. The error-checking mechanism can be calculated over the entire packet or only over the header, depending on the protocol.

Offload mechanisms are mechanisms on which the IP, TCP, and UDP checksums are calculated on the NIC just before they're transmitted to the wire. In Wireshark, these show up as corrupt packets because Wireshark captures packets before they are sent to the network adapter; therefore, it will not see the correct checksum because it has not been calculated yet.

For this reason, even though it might look like severe errors, in many cases checksum errors are actually Wireshark errors of misconfiguration. In cases where you see many checksum errors on packets that are sent from your PC, it is probably because of offload.

To cancel the checksum validation, you can do either of the following depending on your protocol:

  • For IPv4, when you see many checksum errors and you are sure they are because of the offload, navigate to Edit | Preferences.... Further, navigate to Protocols | IPv4 and uncheck the Validate the IPv4 checksum if possible: checkbox.
  • For TCP, when you see many checksum errors and you are sure they are because of the offload, navigate to Edit | Preferences.... Further, navigate to Protocols | TCP and uncheck the Validate the TCP checksum if possible: checkbox.

There's more...

Malformed packets can be Wireshark bugs or real malformed packets. Use other tools for isolating the problem. Suspected bugs can be reported on the Wireshark website.

Tip

When you see a large amount of malformed packets of checksum errors, it is probably because of offload or dissector errors. Networks with more than 1-2 percent errors of any kind will cause many other events (retransmissions for example) and will become much slower than expected, and therefore, you cannot have a high error rate with a functioning network!

See also

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.238.171