d2jsp
Log InRegister
d2jsp Forums > Off-Topic > General Chat > Homework Help > Manually Calculating Udp Checksum > In Binary
Add Reply New Topic New Poll
Member
Posts: 17,624
Joined: Mar 13 2009
Gold: 0.00
Sep 3 2016 07:35am
One of my assignment questions has me reading a wireshark packet. Within this dns UDP packet is the checksum. I need to MANUALLY calculate the checksum in binary and I'm having trouble with it.

I know in a UDP header there is the:

Pseudoheader: 32-bit source IP address
32-bit destination IP address
all 0s, 8-bit protocol(17), 16-bit UDP total length

Header: Source port address 16 bits, Destination port address 16 bits
UDP total length 16 bits, checksum 16 bits.

Data (30 bytes)

In this packet, the source IP address is: 128.238.38.160 - 10000000 11101110, 00100110 10100000
The destination IP address is: 128.238.29.23 - 10000000 11101110, 00011101 00010111
Length: 38 - 00000000 00100110

Source port: 3163 - 00001100 01011011
Destination Port: 53 - 00000000 00110101
Length: 38 - 00000000 00100110

Domain Name Data:

00000000 01101110
00000001 00000000
00000000 00000001
00000000 00000000
00000000 00000000
00000000 00000000
00000011 01110111
01110111 01110111
00000100 01101001
01100101 01110100
01100110 00000011
01101111 01110010
01100111 00000000
00000000 00000001
00000000 00000001

So how does the checksum calculation work, especially with wraparounds?
Member
Posts: 7,855
Joined: Apr 25 2016
Gold: 222.46
Sep 3 2016 08:27am
01000110 01010101 01000011 01001011 01011001 01001111 01010101 00100001
Member
Posts: 7,855
Joined: Apr 25 2016
Gold: 222.46
Sep 3 2016 04:46pm
01110011 01101111 01110010 01110010 01111001 00100000 01100001 01100010 01101111 01110101 01110100 00100000 01110100 01101000 01100001 01110100 00100000 01101000 01101111 01101110 01100101 01110011 01110100 01101100 01111001 00100000 01101001 00100000 01110111 01101111 01110101 01101100 01100100 01101110 00100111 01110100 00100000 01101000 01100001 01110110 01100101 00100000 01100001 00100000 01100011 01101100 01110101 01100101 00100000 01110111 01101000 01100101 01110010 01100101 00100000 01110100 01101111 00100000 01100010 01100101 01100111 01101001 01101110 00100000 00111010 01011110 00101000 00100000 01110011 01101111 01101101 01100101 01100010 01101111 01100100 01111001 00100000 01101000 01100101 01110010 01100101 00100000 01110111 01101001 01101100 01101100 00100000 01110000 01110010 01101111 01100010 01100001 01100010 01101100 01111001 00100000 01101011 01101110 01101111 01110111 00100000 01110100 01101000 01101111 00100000 00111010 01011110 00101001

This post was edited by FaceDeath on Sep 3 2016 05:14pm
Member
Posts: 7,855
Joined: Apr 25 2016
Gold: 222.46
Sep 4 2016 02:59am
01101111 01101110 01101100 01111001 00100000 01100001 00100000 01100011 01110101 01100011 01101011 00100000 01110111 01101111 01110101 01101100 01100100 00100000 01100010 01101111 01110100 01101000 01100101 01110010 00100000 01110100 01110010 01100001 01101110 01110011 01101100 01100001 01110100 01101001 01101110 01100111 00100000 01110100 01101000 01101001 01110011 00100000 00111010 01011110 00101001
Member
Posts: 17,624
Joined: Mar 13 2009
Gold: 0.00
Sep 5 2016 12:05am
Nevermind. I figured it out and have completed the calculations.
Go Back To Homework Help Topic List
Add Reply New Topic New Poll