解决ubuntu的wifi连接不稳定
我笔记本用ubuntu的时候连wifi总是掉线重连,解决的途径是要去看/etc/ppp/下的optionppp就是点对点协议,所有与ppp配置相关的文件都放在这个目录下那就sudo vim /etc/ppp/option 吧在两百一十多行的地方有这样一段 # If this option is given, pppd will send an LCP echo-requ...
·
我笔记本用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
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐
所有评论(0)