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

How to interpret IPv4 header

0

I need guides on how to read following hexadecimal value.

I got the following example, but still don't really get it on how to read them.

45 00 00 30 44 22 40 00 8 006 00 00 8c 7c 19 ac ae 24 1e 2b

As you can see above..there are 20 bytes/bits (still not really sure how to call them)

How do i determine following.

1)Version 2)Header length 3)Type of service 4)Total length 5)Identification 6)Flags 7)Fragment offset 8)TTL 9)Protocol 10)Header checksum 11)Source IP 12)Destination IP

I hope there will be anyone kind enough to guide me on how to get the data.

TQVM.

asked 23 Apr '14, 06:19

Titanfall's gravatar image

Titanfall
1112
accept rate: 0%

edited 23 Apr '14, 06:27

grahamb's gravatar image

grahamb ♦
19.8k330206


2 Answers:

2

I believe you want RFC 791, in particular Sect 3.1 Internet Header Format

answered 23 Apr '14, 06:25

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%

Hello sir, thx for replying.

I have gone through those notes.Unfortunately I still don't get it on how thing works.

Therefore,my purpose of above question was to look for ppl who might be free to provide me the way they get the answer.

I hope you could help me out.

(23 Apr '14, 07:54) Titanfall
0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Version|  IHL  |Type of Service|          Total Length         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

45 00 00 30 44 ...
First for bits is 4 (out of Hexadecimal 45) Version = 4
IHL = next for bits = 5
and so on ( Total lenght = #00 30)

(23 Apr '14, 08:18) Anders ♦

2

alt text

answered 23 Apr '14, 12:54

mrEEde2's gravatar image

mrEEde2
3364614
accept rate: 20%