Networking

DHCP 更新失敗 - 網際網路每 2 小時掉線一次

  • August 17, 2016

每 2 小時,所有工作站都會失去網際網路連接 10 秒。ISP 技術支持似乎不願意解決這個問題,所以我正在嘗試自己解決它。這是我們的網路圖:

網路圖

我寫了一個shell腳本來記錄輟學。該腳本(在遠端伺服器上)每秒 ping 我們的外部 IP 地址並記錄 ping 失敗的時間段。以下是日誌的摘錄:

=======================================
Failure Start           Length
=======================================
2016-08-16 17:52:11     10 sec
2016-08-16 19:52:23     10 sec
2016-08-16 21:52:34     10 sec
2016-08-17 23:52:46     10 sec

此外,這是路由器日誌的摘錄:

50 2016-08-16 17:29:03 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
51 2016-08-16 17:31:07 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
52 2016-08-16 17:33:11 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
53 2016-08-16 17:35:15 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
54 2016-08-16 17:36:51 <5> : WAN1:DHCP lease timeout, beging a new one. 
55 2016-08-16 17:38:51 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
56 2016-08-16 17:40:55 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
57 2016-08-16 17:42:59 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
58 2016-08-16 17:45:03 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
59 2016-08-16 17:47:07 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
60 2016-08-16 17:49:11 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
61 2016-08-16 17:51:15 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
62 2016-08-16 17:51:51 <5> : WAN1:DHCP renew fail, begin a new discovery. 
63 2016-08-16 17:52:02 <5> : WAN1:DHCP getting IP succeeded, and IP addr:XX.XX.XX.97, mask:255.255.254.0, gateway:XX.XX.XX.1.
64 2016-08-16 18:54:06 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
65 2016-08-16 18:56:10 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
66 2016-08-16 18:58:14 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
67 2016-08-16 19:00:18 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
68 2016-08-16 19:02:22 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
69 2016-08-16 19:04:26 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
70 2016-08-16 19:06:30 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
71 2016-08-16 19:08:34 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
72 2016-08-16 19:10:38 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
73 2016-08-16 19:12:42 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
74 2016-08-16 19:14:46 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
75 2016-08-16 19:16:50 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
76 2016-08-16 19:18:54 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
77 2016-08-16 19:20:58 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
78 2016-08-16 19:23:02 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
79 2016-08-16 19:25:06 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
80 2016-08-16 19:27:10 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
81 2016-08-16 19:29:14 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
82 2016-08-16 19:31:18 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
83 2016-08-16 19:33:22 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
84 2016-08-16 19:35:26 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
85 2016-08-16 19:37:02 <5> : WAN1:DHCP lease timeout, beging a new one. 
86 2016-08-16 19:39:02 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
87 2016-08-16 19:41:07 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
88 2016-08-16 19:43:10 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
89 2016-08-16 19:45:14 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
90 2016-08-16 19:47:19 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
91 2016-08-16 19:49:22 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
92 2016-08-16 19:51:26 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
93 2016-08-16 19:52:02 <5> : WAN1:DHCP renew fail, begin a new discovery. 
94 2016-08-16 19:52:14 <5> : WAN1:DHCP getting IP succeeded, and IP addr:XX.XX.XX.97, mask:255.255.254.0, gateway:XX.XX.XX.1.
95 2016-08-16 20:54:18 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
96 2016-08-16 20:56:22 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
97 2016-08-16 20:58:26 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
98 2016-08-16 21:00:30 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
99 2016-08-16 21:02:33 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
100 2016-08-16 21:04:37 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
101 2016-08-16 21:06:41 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
102 2016-08-16 21:08:46 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
103 2016-08-16 21:10:50 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
104 2016-08-16 21:12:54 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
105 2016-08-16 21:14:58 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
106 2016-08-16 21:17:02 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
107 2016-08-16 21:19:06 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
108 2016-08-16 21:21:09 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
109 2016-08-16 21:23:14 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
110 2016-08-16 21:25:17 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
111 2016-08-16 21:27:22 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
112 2016-08-16 21:29:26 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
113 2016-08-16 21:31:30 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
114 2016-08-16 21:33:34 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
115 2016-08-16 21:35:38 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
116 2016-08-16 21:37:14 <5> : WAN1:DHCP lease timeout, beging a new one. 
117 2016-08-16 21:39:14 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
118 2016-08-16 21:41:18 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
119 2016-08-16 21:43:22 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
120 2016-08-16 21:45:26 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
121 2016-08-16 21:47:30 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
122 2016-08-16 21:49:34 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
123 2016-08-16 21:51:38 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
124 2016-08-16 21:52:14 <5> : WAN1:DHCP renew fail, begin a new discovery. 
125 2016-08-16 21:52:25 <5> : WAN1:DHCP getting IP succeeded, and IP addr:XX.XX.XX.97, mask:255.255.254.0, gateway:XX.XX.XX.1.
126 2016-08-16 22:54:29 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
127 2016-08-16 22:56:33 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
128 2016-08-16 22:58:37 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
129 2016-08-16 23:00:41 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
130 2016-08-16 23:02:45 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
131 2016-08-16 23:04:49 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
132 2016-08-16 23:06:54 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
133 2016-08-16 23:08:58 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
134 2016-08-16 23:11:02 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
135 2016-08-16 23:13:05 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
136 2016-08-16 23:15:09 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
137 2016-08-16 23:17:13 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
138 2016-08-16 23:19:17 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
139 2016-08-16 23:21:21 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
140 2016-08-16 23:23:26 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
141 2016-08-16 23:25:30 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
142 2016-08-16 23:27:34 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
143 2016-08-16 23:29:38 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
144 2016-08-16 23:31:42 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
145 2016-08-16 23:33:46 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
146 2016-08-16 23:35:50 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
147 2016-08-16 23:37:25 <5> : WAN1:DHCP lease timeout, beging a new one. 
148 2016-08-16 23:39:25 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
149 2016-08-16 23:41:29 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
150 2016-08-16 23:43:33 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
151 2016-08-16 23:45:37 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
152 2016-08-16 23:47:41 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
153 2016-08-16 23:49:45 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
154 2016-08-16 23:51:49 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
155 2016-08-16 23:52:25 <5> : WAN1:DHCP renew fail, begin a new discovery. 
156 2016-08-16 23:52:37 <5> : WAN1:DHCP getting IP succeeded, and IP addr:XX.XX.XX.97, mask:255.255.254.0, gateway:XX.XX.XX.1.
157 2016-08-17 00:54:42 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 
158 2016-08-17 00:56:46 <5> : WAN1:DHCP send DHCP-REQUEST timeout. 

每次我們得到一個 dropout 時,路由器都會記錄“DHCP 更新失敗”和“DHCP 獲取 IP 成功”。可能是什麼問題?它與外部IP地址的租用時間有關嗎?

還有這些“DHCP 發送 DHCP-REQUEST 超時”日誌是什麼?

謝謝!

看起來您的 ISP 網路管理員在 DHCP 上的配置有問題。DHCP 客戶端的標准設置是在租約結束時呼叫以續訂,並繼續嘗試直到續訂發生。日誌告訴我您的 ISP 有 2 小時的租約。但中途更新失敗。可能被屏蔽了。

我還看到 DHCP 發現正在工作,而 DHCP 更新卻沒有。

跟在他們後面。我懷疑他們有網路管理員的空缺,而其他人正試圖填補這個角色。或者他們有一個沒有經驗的新人。閱讀 DHCP RFC,並與他們的技術支持人員通話。

引用自:https://serverfault.com/questions/797388