Using the Protocol Hierarchy tool from the Statistics menu

In this recipe, we will learn how to get protocol hierarchy information of the data that runs over the network.

Getting ready

Start Wireshark, click on Statistics.

How to do it...

To use the Protocol Hierarchy tool from the statistics menu, go through the following steps:

  1. From the statistics menu, choose Protocol Hierarchy.
    How to do it...
  2. What you will get here is data about the protocol distribution in the captured file. You will get the protocol distribution of the captured data, as shown in the following screenshot:
    How to do it...
  3. You will get the following fields in the Protocol Hierarchy window:
    • Protocol: This field specifies the protocol name
    • % Packets: This field specifies the percentage of protocol packets from the total captured packets
    • Packets: This field specifies the number of protocol packets from the total captured packets
    • % Bytes: This field specifies the percentage of protocol bytes from the total captured packets
    • Bytes: This field specifies the number of protocol bytes from the total captured packets
    • Mbit/s: This field specifies the bandwidth of this protocol in relation to the capture time
    • End Packets: This field specifies the total number of packets in this protocol (for the highest protocol in the decode file)
    • End Bytes: This field specifies the absolute number of bytes of this protocol (for the highest protocol in the decode file)
    • End Mbit/s: This field specifies the bandwidth of this protocol relative to the capture packets and time (for the highest protocol in the decode file)

Tip

The End Packets, End Bytes, and End Mbits/s columns are those in which the protocol in this line is the last protocol in the packet (that is, when the protocol comes at the end of the packet, and there is no higher layer information). These can be, for example, TCP packets with no payload (for example, SYN packets), which do not carry any upper layer information. That is why you see a 0 count for Ethernet and IPv4 and UDP end packets because there are no frames where these protocols are the last protocol in the frame.

How it works...

In simple terms, it calculates statistics over the captured data. Some important things to notice are:

  • The percentage always refers to the same layer protocols. For example, we see in the previous example that IPv4 has 81.03 percent of the packets, IPv6 has 8.85 percent of the packets, and ARP has 10.12 percent of the packets; a total of 100 percent of the protocols over layer-2.
  • On the other hand, we see that TCP has 75.70 percent of the data, and within TCP, only 12.74 percent of the packets are HTTP, and there is nearly nothing more. This is because Wireshark counts only the packets with the HTTP headers. It doesn't count for example, the acknowledge packets or data packets that doesn't have HTTP header.

There's more...

In order to ensure that Wireshark will also count the data packets, for example, the data packets of HTTP within the TCP packet, disable the Allow sub-dissector option to reassemble the TCP streams. You can do this from the Preferences menu or by right-clicking on the TCP in the Packet Details pane.

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

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