码迷,mamicode.com
首页 > 系统相关 > 详细

解决ubuntu的wifi连接不稳定

时间:2015-08-08 21:25:11      阅读:191      评论:0      收藏:0      [点我收藏+]

标签:ubuntu   wi-fi   

我笔记本用ubuntu的时候连wifi总是掉线重连,解决的途径是要去看/etc/ppp/下的option

ppp就是点对点协议,所有与ppp配置相关的文件都放在这个目录下

那就sudo vim /etc/ppp/option 吧

在两百一十多行的地方有这样一段


# If this option is given, pppd will send an LCP echo-request frame to the
# peer every n seconds. Normally the peer should respond to the echo-request
# by sending an echo-reply. This option can be used with the
# lcp-echo-failure option to detect that the peer is no longer connected.
lcp-echo-interval 4

# 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 30

下面一段意思是说lcp-echo-failure这个值设了,我们的拨号客户端pppd就会向你的peer发送一个请求帧,然后等他回复,lcp-echo-failure设为30也就是说如果pppd发了30次请求帧你的peer都没有回,他就认为你的链接断了。而上面那个lcp-echo-interval就是你每次等待回复的时间,默认设为4,如果网不是很给力的话,很容易就超时,被认为要重连,所以就频繁地断连接很烦人。现在把每次等待时间改长一点,设为30,然后就不那么容易掉了。


# If this option is given, pppd will send an LCP echo-request frame to the
# peer every n seconds. Normally the peer should respond to the echo-request
# by sending an echo-reply. This option can be used with the
# lcp-echo-failure option to detect that the peer is no longer connected.
lcp-echo-interval <span style="color:#FF0000;">30</span>

# 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 30


版权声明:本文为博主原创文章,未经博主允许不得转载。

解决ubuntu的wifi连接不稳定

标签:ubuntu   wi-fi   

原文地址:http://blog.csdn.net/xiaopangxia/article/details/47361651

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!