UDP报文格式
UDP (User Datagram Protocol)协议为运用程序之间的消息发送提供了最小开销的协议机制。UDP是传输层协议,没有重传机制,不保障传输的可靠性。
一、 UDP报文格式
0 15 16 31
+-----------------+-----------------+
| Source Port |Destination Port |
+-----------------+-----------------+
| | |
| Length | Checksum |
+-----------------+-----------------+
| |
| data octets ... |
+-----------------------------------+
二、 UDP报文格式解释
字段 | 长度 | 描述 |
---|---|---|
Source Port | 2字节 | 标识哪个应用程序发送(发送进程)。 |
Destination Port | 2字节 | 标识哪个应用程序接收(接收进程)。 |
Length | 2字节 | UDP首部加上UDP数据的字节数,最小为8。 |
Checksum | 2字节 | 覆盖UDP首部和UDP数据,是可选的。 |
data octets | 变长 | UDP负载,可选的。 |
三、UDP报文示例
Frame 1: 264 bytes on wire (2112 bits), 264 bytes captured (2112 bits) on interface 0
Interface id: 0 (unknown)
Encapsulation type: Ethernet (1)
Arrival Time: Dec 2, 2014 11:14:23.037470000
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1417490063.037470000 seconds
[Time delta from previous captured frame: 0.000000000 seconds]
[Time delta from previous displayed frame: 0.000000000 seconds]
[Time since reference or first frame: 0.000000000 seconds]
Frame Number: 1
Frame Length: 264 bytes (2112 bits)
Capture Length: 264 bytes (2112 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ethertype:ip:udp:data]
[Coloring Rule Name: UDP]
[Coloring Rule String: udp]
Ethernet II, Src: 00:ac:27:96:47:87 (00:ac:27:96:47:87), Dst: 04:f9:38:d7:d4:a1 (04:f9:38:d7:d4:a1)
Destination: 04:f9:38:d7:d4:a1 (04:f9:38:d7:d4:a1)
Address: 04:f9:38:d7:d4:a1 (04:f9:38:d7:d4:a1)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Source: 00:ac:27:96:47:87 (00:ac:27:96:47:87)
Address: 00:ac:27:96:47:87 (00:ac:27:96:47:87)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Type: IP (0x0800)
Internet Protocol Version 4, Src: 10.60.23.77 (10.60.23.77), Dst: 10.10.13.100 (10.10.13.100)
Version: 4
Header Length: 20 bytes
Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
0000 00.. = Differentiated Services Codepoint: Default (0x00)
.... ..00 = Explicit Congestion Notification: Not-ECT (Not ECN-Capable Transport) (0x00)
Total Length: 250
Identification: 0x0abd (2749)
Flags: 0x00
0... .... = Reserved bit: Not set
.0.. .... = Don't fragment: Not set
..0. .... = More fragments: Not set
Fragment offset: 0
Time to live: 128
Protocol: UDP (17)
Header checksum: 0x443f [validation disabled]
[Good: False]
[Bad: False]
Source: 10.60.23.77 (10.60.23.77)
Destination: 10.10.13.100 (10.10.13.100)
[Source GeoIP: Unknown]
[Destination GeoIP: Unknown]
User Datagram Protocol, Src Port: 58588 (58588), Dst Port: dnp (20000)
Source Port: 58588 (58588)
Destination Port: dnp (20000)
Length: 230
Checksum: 0x3a79 [validation disabled]
[Good Checksum: False]
[Bad Checksum: False]
[Stream index: 0]
Data (222 bytes)
Data: 3081db020103300f02020166020300ffff04010702010304...
[Length: 222]
发表评论