Thursday 12 February 2015

Calculate Packet Size

Packet sniffers allow for users to determine packet length


In computer networking, a packet is the basic unit for data being sent across the network. Each packet contains information about its origin, its destination and its contents. Packets are sent when initiating a connection between two computers, during the connection itself and when a connection is broken. Some packets even contain other packets.


Instructions


Instructions for tcpdump


1. Open the command line software


2. Run tcpdump as follows:


tcpdump -v


3. Examine the tcpdump output. An example:


16:50:16.752851 IP (tos 0x0, ttl 64, id 26928, offset 0, flags [DF], proto TCP (6), length 46) yyy.yyy.yyy.yyy.22003 > zzz.zzz.zzz.zzz.5190: P, cksum 0x7d2a (correct), 2169864800:2169864806(6) ack 1098759742 win 62984


4. Find the 'length' section of the tcpdump output. In the given example, the length was 46, indicating a packet length of 46 bytes.


Instructions for WinDump


5. Open the command line software


6. Run tcpdump as follows:


windump -v


7. Examine the windump output. An example:


16:50:16.752851 IP (tos 0x0, ttl 64, id 26928, offset 0, flags [DF], proto TCP (6), length 46) yyy.yyy.yyy.yyy.22003 > zzz.zzz.zzz.zzz.5190: P, cksum 0x7d2a (correct), 2169864800:2169864806(6) ack 1098759742 win 62984


8. Find the 'length' section of the windump output. In the given example, the length was 46, indicating a packet length of 46 bytes.

Tags: packet length, 0x7d2a correct, 0x7d2a correct 2169864800, 1098759742 62984, 1098759742 62984 Find, 2169864800 2169864806