每天一次,eth0 上的网络出现故障,我们需要执行 sudo ifdown eth0;sudo ifup eth0 启动网络。
这是系统日志:
Feb 11 12:48:01 www-tech-1 dhclient: DHCPREQUEST of address> on eth0 to 131.121.113.228 port 67
Feb 11 12:52:35 www-tech-1 dhclient: DHCPREQUEST of address> on eth0 to 131.121.113.228 port 67
Feb 11 12:56:23 www-tech-1 dhclient: DHCPREQUEST of address> on eth0 to 131.121.113.228 port 67
Feb 11 13:00:28 www-tech-1 dhclient: DHCPREQUEST of address> on eth0 to 131.121.113.228 port 67
Feb 11 13:04:29 www-tech-1 dhclient: DHCPREQUEST of address> on eth0 to 131.121.113.228 port 67
Feb 11 13:09:16 www-tech-1 dhclient: DHCPREQUEST of address> on eth0 to 131.121.113.228 port 67
Feb 11 13:13:53 www-tech-1 dhclient: DHCPREQUEST of address> on eth0 to 131.121.113.228 port 67
Feb 11 13:18:16 www-tech-1 dhclient: DHCPREQUEST of address> on eth0 to 131.121.113.228 port 67
Feb 11 13:22:25 www-tech-1 dhclient: DHCPREQUEST of address> on eth0 to 131.121.113.228 port 67
Feb 11 13:26:52 www-tech-1 dhclient: DHCPREQUEST of address> on eth0 to 131.121.113.228 port 67
Feb 11 13:30:44 www-tech-1 dhclient: DHCPREQUEST of address> on eth0 to 131.121.113.228 port 67
Feb 11 13:31:49 www-tech-1 dhclient: There is already a pid file /var/run/dhclient.eth0.pid with pid 3198
Feb 11 13:31:49 www-tech-1 dhclient: Listening on LPF/eth0/00:e0:81:49:fc:e0
Feb 11 13:31:49 www-tech-1 dhclient: Sending on LPF/eth0/00:e0:81:49:fc:e0
Feb 11 13:31:49 www-tech-1 dhclient: DHCPRELEASE on eth0 to 131.121.113.228 port 67
Feb 11 13:31:49 www-tech-1 dhclient: There is already a pid file /var/run/dhclient.eth0.pid with pid 134519072
Feb 11 13:31:50 www-tech-1 dhclient: Listening on LPF/eth0/00:e0:81:49:fc:e0
Feb 11 13:31:50 www-tech-1 dhclient: Sending on LPF/eth0/00:e0:81:49:fc:e0
Feb 11 13:31:52 www-tech-1 dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
Feb 11 13:31:52 www-tech-1 dhclient: DHCPREQUEST of 131.121.14.17 on eth0 to 255.255.255.255 port 67
Feb 11 13:31:53 www-tech-1 kernel: [265383.991682] eth0: no IPv6 routers present
请检查此系统日志的最后一部分。
有谁能够帮我?
我假设这是关于服务器的,因为它在 SF 上。
你真的应该为你的服务器使用静态 IP 地址。尝试使用 netconfig(从终端运行)为您的机器设置静态 IP。您还应该在用作 DHCP 服务器的任何设备中查看您的 DHCP 设置。为您的服务器新的静态 IP 设置一个例外。
您从 IP 地址“131.121.113.228”开始。对该地址的请求似乎没有得到答复,然后是 DHCP 释放,然后您最终获得地址“131.121.14.17”。
您是否手动进行了 DHCP 释放?如果没有,您可能会在这里发生一些不同的事情:
如果您的网络上没有使用 IPv6,禁用它也是一个好主意。这可以提高性能。
你用什么做 DHCP 服务器?当从 GNU/Linux 机器提供 DHCP 时,我遇到了一些非常奇怪的问题,即 DHCP 租约并不总是能正确更新。BSD、Solaris 或设备(人们期望内部有 GNU/Linux)DHCP 服务器也遇到过同样的问题。无论哪种方式,我现在倾向于避免 DHCP 用于较小的受控网络。如果它不是必要的功能(例如支持最终用户的便利),我建议不要部署它。