Does tcpdump ethernet packet length include ip packet and data length

networkingtcpdump

Does the Ethernet packet header length displayed by tcpdump include the size of the IP packet as well as the data contained ?

Best Answer

When you use the -e option may get three lengths as shown below. The first length is the length of the IP packet including the TCP packet; the second is the length of the TCP packet including the header and data; and the third is the length of the data contained in the TCP packet.

 23:07:10.621602 xx:xx:xx:xx:xx:xx > yy:yy:yy:yy:yy:yy, ethertype IPv4 (0x0800), length 60: (tos 0x0, ttl 128, id 24031, offset 0, flags [DF], proto TCP (6), length 40)
     192.0.2.12.63357 > 192.168.0.8.25: Flags [R.], cksum 0x7e4c (correct), seq 1, ack 48, win 0, length 0