我的嵌入式系统使用 systemd 并通过 DHCP 获取其 IP 地址。如果遵守租用时间,DHCP 服务器使用租用时间为网络上的每台计算机提供相同的 IP 唯一地址。
我的嵌入式系统的网络配置如下:
/etc/systemd/network/dhcp.network
[Match]
Name=eth*
[Network]
DHCP=yes
Run Code Online (Sandbox Code Playgroud)
问题是每次启动时,我的系统都会得到一个新的 IP 地址。有没有我遗漏的配置?
更多信息:
$ cat /proc/version
Linux version 4.16.0 (aurelien@l2.lf) (gcc version 7.3.0 (Buildroot 2018.05-g0164235-dirty)) #18 SMP PREEMPT Tue Jul 17 14:28:37 CEST 2018
Run Code Online (Sandbox Code Playgroud)
Run Code Online (Sandbox Code Playgroud)Frame 13299: 327 bytes on wire (2616 bits), 327 bytes captured (2616 bits) on interface 0 Interface id: 0 (\\.\pipe\Shamrock_Wireshark_TAP__30815) Encapsulation type: Ethernet (1) Arrival Time: Jul 16, 2018 10:39:49.166800000 Paris, Madrid (heure d??t?) …