在dhcp数据包中,字段表示客户端硬件地址,但与mac地址不同,如"fa:16:3e:6f:1a:9d“。
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| op (1) | htype (1) | hlen (1) | hops (1) |
+---------------+---------------+---------------+---------------+
| xid (4) |
+-------------------------------+-------------------------------+
| secs (2) | flags (2) |
+-------------------------------+-------------------------------+
| ciaddr (4) |
+---------------------------------------------------------------+
| yiaddr (4) |
+---------------------------------------------------------------+
| siaddr (4) |
+---------------------------------------------------------------+
| giaddr (4) |
+---------------------------------------------------------------+
| |
| chaddr (16) |
| |
| |
+---------------------------------------------------------------+
| |
| sname (64) |
+---------------------------------------------------------------+
| |
| file (128) |
+---------------------------------------------------------------+
| |
| options (variable) |
+---------------------------------------------------------------+发布于 2016-01-13 11:29:40
请参阅https://www.ietf.org/rfc/rfc2131.txt
4.4.1 Initialization and allocation of network address
...
The client MUST include its hardware address in the 'chaddr'
field, if necessary for delivery of DHCP reply messages. 前六个字节包含硬件地址,其余为零。可以检查bootp/dhcp包的内容,例如在Linux中使用dhcpdump。
https://stackoverflow.com/questions/34757765
复制相似问题