我正在将Linux(无效linux,我认为这没关系)作为无盘主机:
dhcp-> PXE-> iPXE-> iscsi-> grub-> kernel / initramfs-> dhcp-> iscsi-> init
系统成功启动并运行正常。
但是dhclient有麻烦。它不能延长IP租用时间。租期到期后,主机将冻结。
ip地址设置(br0正在initramfs阶段构建):
2: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP group default qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
3: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
inet 192.168.0.11/24 brd 192.168.0.255 scope global dynamic br0
valid_lft 5317sec preferred_lft 5317sec
inet6 fe80::xxxx:xxxx:xxxx:xxxx/64 scope link
valid_lft forever preferred_lft forever
我运行dhclient,但是它不会更新租约时间。
[root@void-iscsi ~]# dhclient -d br0
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/br0/xx:xx:xx:xx:xx:xx
Sending on LPF/br0/xx:xx:xx:xx:xx:xx
Sending on Socket/fallback
DHCPREQUEST for 192.168.0.11 on br0 to 255.255.255.255 port 67
DHCPACK of 192.168.0.11 from 192.168.0.1
RTNETLINK answers: File exists
bound to 192.168.0.11 -- renewal in 2704 seconds.
我想因此而来
RTNETLINK answers: File exists
这可能意味着IP已被使用。
听起来有点奇怪,当然它正在使用中。唯一使用该IP的主机就是该主机(运行dhclient的主机)。
尽管已在dhclient运行的接口上分配了IP,但是否可能以某种方式强制dhclient延长租约时间?
我试图删除dhclient.lease文件,但这没有帮助。