当 NTP 向后同步时间时,dhclient 不会续订租约

当 NTP 向后同步时间时,dhclient 不会续订租约
# uptime -s
2020-10-31 15:24:21

# head -1 /var/log/syslog
Oct 31 15:50:53 ...

观察:正常运行时间早于系统日志中的第一个时间戳

DHCP IP 已于 15:51 获取

Oct 31 15:51:34 dhclient[841]: DHCPOFFER of 10.50.51.49 from 10.50.51.102
Oct 31 15:51:38 dhclient[841]: bound to 10.50.51.49 -- renewal in 145 seconds

NTP 同步启动,时间回溯至 15:25(回溯约 25 分钟)

Oct 31 15:52:03 ntpd[944]: ...
Oct 31 15:25:42 ntpd[944]: ntpd: time set -1588.158001 s

NTP 似​​乎也因时间设置而删除了接口

Oct 31 15:30:09 ntpd[1278]: Deleting interface #3 eth0, 10.50.51.49#123, interface stats: received=27, sent=27, dropped=0, active_time=226 secs

下次更新时间为 15:54

Oct 31 15:54:03 dhclient[841]: DHCPREQUEST for 10.50.51.49 on eth0 to 10.50.51.102

由于 NTP,DHCP 更新不会在约 145 秒内发生,而是在 25 分钟内发生

我在 ubuntu 20.04 上安装了以下软件包:

# dpkg -l | grep dhc
ii  isc-dhcp-client                  4.4.1-2.1ubuntu5                  amd64        DHCP client for automatically obtaining an IP address
# dpkg -l | grep bind
ii  bind9-dnsutils                   1:9.16.1-0ubuntu2.4               amd64        Clients provided with BIND 9
ii  bind9-host                       1:9.16.1-0ubuntu2.4               amd64        DNS Lookup Utility
ii  bind9-libs:amd64                 1:9.16.1-0ubuntu2.4               amd64        Shared Libraries used by BIND 9

DHCP 进程正在运行:

root         841  0.0  0.2  99896  5960 ?        Ssl  Oct31   0:00 /sbin/dhclient -1 -4 -v -i -pf /run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases -I -df /var/lib/dhcp/dhclient6.eth0.leases eth0

相关内容