779 views
3 votes
3 votes
Calculate the checksum for the following ICMP packet:
Type: Echo Request
Identifier: 123
Sequence number: 25
Message: HELLO
Assume that message is divided into 8-bits(1 bytes)

1 Answer

1 votes
1 votes

First turn all the given data into HEX as below:

ICMP Echo Request: 8 (as given in http://www.nthelp.com/icmp.html ) Binary: 1000 Hex: 08

Identifier: 123 Binary: 01111011 Hex: 7B

Sequence Number: 25 Binary: 11001 Hex: 19

Message: HELLO Convert each ASCII character to HEX as below:

H: ASCII 72 HEX: 48

E: ASCII 69 HEX: 45

L: ASCII 76 HEX: 4C

O: ASCII 79 HEX: 4F

Now, add all the words using 1's complement addition:

000010000 + 01111011 + 000110001 + 01001000 + 01000101 + 01001100 + 01001100 + 01001111 = 001000010000

Complementing gives the checksum: 110111101111 ⇒0xDEF

Related questions

0 votes
0 votes
1 answer
1
yogi_p asked Dec 22, 2017
366 views
which protocol has flow control but not error control?Stop-and-WaitSimplestGo-Back-N ARQSelective-Repeat ARQ Explain ?
1 votes
1 votes
0 answers
2
yogi_p asked Dec 8, 2017
480 views
A) YesB) NoC) Cannot SayD) None
0 votes
0 votes
1 answer
3
shyamalkishorejha asked Oct 25, 2016
1,756 views
The following is a dump of a TCP header in hexadecimal format.05320017 00001010 00000000 500207FF 00000000What is the source port and sequence number of the packet?