2018年8月10日 星期五

Ubuntu 16.04 無線網路常常無預警斷線--嘗試解決

一直以來都有的症頭,筆電安裝Ubuntu16.04後,無線網路有時候就會無預警的斷線,就算換了不同的AP環境,這樣的情形還是偶一發生,雖然頻率不是很頻繁,而且只要斷掉wifi後再重啟,就都可以正常連線,今天終於不要太ㄚQ地,試試、找找解決的方法。
sudo service network restart

我的推論是,我的無線模組應該有點爛,所以才容易斷線。

因此試試修改了/etc/ppp/options


# If this option is given, pppd will presume the peer to be dead if n
# LCP echo-requests are sent without receiving a valid LCP echo-reply.
# If this happens, pppd will terminate the connection.  Use of this
# option requires a non-zero value for the lcp-echo-interval parameter.
# This option can be used to enable pppd to terminate after the physical
# connection has been broken (e.g., the modem has hung up) in
# situations where no hardware modem control lines are available.
lcp-echo-failure 4


上面的意思大致上是說pppd服務會去偵測,如果LCP echo-request的回應值如果低於所設的數字,pppd服務就會斷線。這有可能是AP modem的問題。

當然我寧願猜測是我網路卡很爛所造成的問題,畢竟我已在不同環境都會發生這樣的症頭了。

所以更改了
lcp-echo-failure 40
#echo-requests 回應數如果超過40次,再自動幫我關閉pppd服務斷線吧!!

 sudo service pppd-dns restart

附註:目前觀察中.......