In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
In this issue, the editor will bring you about how NTPD deletes all network interfaces. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
NTPD service removes and enables the network
We configured two virtual interfaces on eth0 on CentOS, and they failed from time to time. Now, after looking at the log file, I find that ntpd obviously removes all eth0 interfaces, and dhclient automatically restores eth0. However, this will cause several of our virtual websites to be inaccessible.
Can someone explain to me why ntpd deleted the interface? Can / should this feature be turned off, or can / should dhclient be configured to automatically restore the virtual interface?
Edit / / the log file that I should publish:
Nov 12 13:10:28 raptor dhclient [20048]: DHCPREQUEST on eth0 to 255.255.255.255 port 67 (xid=0x6a825e97) Nov 12 13:10:42 raptor dhclient [20048]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8 (xid=0x24554092) Nov 12 13:10:42 raptor dhclient [20048]: DHCPOFFER from 96.126.108.78Nov 12 13:10:42 raptor dhclient [20048]: DHCPREQUEST on eth0 to 255.255.255.255 port 67 (xid=0x24554092) Nov 12 13:10:42 raptor dhclient [ 20048]: DHCPACK from 96.126.108.78 (xid=0x24554092) Nov 12 13:10:42 raptor ntpd [2109]: Deleting interface # 31 eth0 50.116.50.97#123, interface stats: received=3255, sent=3256, dropped=0, active_time=1559394 secsNov 12 13:10:42 raptor ntpd [2109]: Deleting interface # 32 eth0:0, 50.116.53.56#123, interface stats: received=3, sent=0, dropped=0, active_time=1559391 secsNov 12 13:10:42 raptor ntpd [2109]: Deleting interface # 33 eth0:1, 66.175.211.192#123, interface stats: received=2, sent=0, dropped=0, active_time=1559389 secsNov 12 13:10:42 raptor ntpd [2109]: Deleting interface # 34 eth0:2 50.116.53.95#123, interface stats: received=3, sent=0, dropped=0, active_time=1559387 secsNov 12 13:10:42 raptor ntpd [2109]: Deleting interface # 35 eth0:3, 97.107.132.32#123, interface stats: received=2, sent=0, dropped=0, active_time=1559385 secsNov 12 13:10:42 raptor ntpd [2109]: Deleting interface # 36 eth0:4, 50.116.56.201#123, interface stats: received=2, sent=0, dropped=0, active_time=1559383 secsNov 12 13:10:42 raptor ntpd [2109]: Deleting interface # 37 eth0:5 66.175.212.121#123, interface stats: received=2, sent=0, dropped=0, active_time=1559381 secsNov 12 13:10:42 raptor ntpd [2109]: Deleting interface # 38 eth0:6, 66.175.215.137#123, interface stats: received=2, sent=0, dropped=0 Active_time=1559379 secsNov 12 13:10:44 raptor NET [1573]: / sbin/dhclient-script: updated / etc/resolv.confNov 12 13:10:44 raptor dhclient [20048]: bound to 50.116.50.97-- renewal in 32692 seconds.Nov 12 13:10:45 raptor ntpd [2109]: Listening on interface # 39 eth0, 50.116.50.970.0123 Enabled
Eth0 configuration:
DEVICE= "eth0" ONBOOT= "yes" BOOTPROTO= "dhcp" IPV6INIT= "no" IPADDR=50.116.50.97NETMASK=255.255.255.0GATEWAY=50.116.50.1
Virtual interface (I only released the first one, and most of them look the same):
# Configuration for eth0:0DEVICE=eth0:0BOOTPROTO=none# This line ensures that the interface will be brought up during boot.ONBOOT=yes# eth0:0IPADDR=50.116.53.56NETMASK=255.255.255.0Answers reply: The BOOTPROTO= "dhcp" means you have DHCP.If you look, the DHCP client is running immediately before ntp changes anything. I think your DHCP client is removing all the static addresses on eth0. When NTP notices this it knows that it needs to stop listening on all the sockets it was listening on for the static addresses.
Resolution
Use the-L option to tell ntpd not to listen on the virtual interface. You can set-L in / etc/sysconfig/ntpd.
When an interface is shut down or deleted, ntpd updates the listening interface based on the current interface status.
-- / etc/sysconfig/ntpd.bak 2016-09-26 008 Command line options for ntpd-OPTIONS= 35 NTPD 05.408966980-0400 NTPD + / etc/sysconfig/ntpd 2016-09-26 0814 08106105-0400 vehicle @-1 Mague 2 + 1 @ # Command line options for ntpd-OPTIONS= "- g" + OPTIONS= "- g-L" above is how to delete all network interfaces shared by the editor. If you happen to have similar doubts, please refer to the above analysis for understanding. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.