User Datagram Protocol - UDP Header (RFC 768)
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Byte Offset 0
Byte Offset 1
Byte Offset 2
Byte Offset 3
Source Port Number (16-bit)
Destination Port Number (16-bit)
Byte Offset 4
Byte Offset 5
Byte Offset 6
Byte Offset 7
Length (16-bit)
Checksum (16-bit)
Byte Offset 8
Byte Offset 9
Byte Offset 10
Byte Offset 11
data (variable length…)
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Common Port Numbers
D
Hex
D
Hex
D
Hex
7
0x07
69
0x45
500
0x1F4
19
0x13
123
0x7B
514
0x202
37
0x25
137
0x89
520
0x208
53
0x35
138
0x8A
33434
829A
67
0x43
161
0xA1
68
0x44
162
0xA2
Length
Number of bytes in the entire datagram including header
minimum value 8 bytes
(Which is the length of just the header with no data)
maximum value 65515 bytes (or 65507 bytes of UDP data)
(Max IP is 65535 bytes - 20 byte header = 65515 bytes for UDP packet - 8 bytes of UDP header = 65507)
Covers psedo header (IP Header source and destinstation addresses, the protocol and UDP length) and entire UDP
datagram
(Note: By RFC, the crc is not required)