這期內(nèi)容當(dāng)中小編將會給大家?guī)碛嘘P(guān)NTPD如何刪除所有網(wǎng)絡(luò)接口,文章內(nèi)容豐富且以專業(yè)的角度為大家分析和敘述,閱讀完這篇文章希望大家可以有所收獲。
封丘網(wǎng)站建設(shè)公司成都創(chuàng)新互聯(lián)公司,封丘網(wǎng)站設(shè)計制作,有大型網(wǎng)站制作公司豐富經(jīng)驗。已為封丘1000多家提供企業(yè)網(wǎng)站建設(shè)服務(wù)。企業(yè)網(wǎng)站搭建\外貿(mào)網(wǎng)站建設(shè)要多少錢,請找那個售后服務(wù)好的封丘做網(wǎng)站的公司定做!
NTPD服務(wù)刪除并啟用網(wǎng)絡(luò)
我們在CentOS上的eth0上配置了兩個虛擬接口,它們時不時地出現(xiàn)故障?,F(xiàn)在,在查看日志文件之后,我發(fā)現(xiàn)ntpd顯然刪除了所有eth0接口,并且dhclient自動將eth0恢復(fù)。然而,這會導(dǎo)致我們的幾個虛擬網(wǎng)站無法訪問。
有人能給我解釋一下ntpd刪除接口的原因嗎?是否可以/應(yīng)該關(guān)閉該功能,或者是否可以/應(yīng)該配置dhclient以自動恢復(fù)虛擬接口?
編輯//我應(yīng)該發(fā)布的日志文件:
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.78 Nov 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 secs Nov 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 secs Nov 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 secs Nov 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 secs Nov 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 secs Nov 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 secs Nov 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 secs Nov 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 secs Nov 12 13:10:44 raptor NET[1573]: /sbin/dhclient-script : updated /etc/resolv.conf Nov 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.97#123 Enabled
eth0配置:
DEVICE="eth0" ONBOOT="yes" BOOTPROTO="dhcp" IPV6INIT="no" IPADDR=50.116.50.97 NETMASK=255.255.255.0 GATEWAY=50.116.50.1
虛擬界面(我只發(fā)布了第一個,它們大部分看起來都一樣):
# Configuration for eth0:0 DEVICE=eth0:0 BOOTPROTO=none # This line ensures that the interface will be brought up during boot. ONBOOT=yes # eth0:0 IPADDR=50.116.53.56 NETMASK=255.255.255.0 Answers答復(fù): 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.
決議
使用-L選項告訴ntpd不要監(jiān)聽虛擬接口。您可以在/etc/sysconfig/ntpd中設(shè)置-L。
當(dāng)接口關(guān)閉或刪除時,ntpd根據(jù)當(dāng)前接口狀態(tài)更新偵聽接口。
--- /etc/sysconfig/ntpd.bak 2016-09-26 08:35:05.408966980 -0400 +++ /etc/sysconfig/ntpd 2016-09-26 08:35:14.461086105 -0400 @@ -1,2 +1,2 @@ # Command line options for ntpd -OPTIONS="-g" +OPTIONS="-g -L"
上述就是小編為大家分享的NTPD如何刪除所有網(wǎng)絡(luò)接口了,如果剛好有類似的疑惑,不妨參照上述分析進(jìn)行理解。如果想知道更多相關(guān)知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道。
網(wǎng)頁標(biāo)題:NTPD如何刪除所有網(wǎng)絡(luò)接口
文章網(wǎng)址:http://aaarwkj.com/article6/jejeog.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供企業(yè)建站、建站公司、面包屑導(dǎo)航、營銷型網(wǎng)站建設(shè)、關(guān)鍵詞優(yōu)化、外貿(mào)網(wǎng)站建設(shè)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)