Ubuntu14.04拨号上网踩的坑
朋友有个在Linux上拨号上网的问题,迟迟么有解决,昨天搞到深夜,还是没搞定,今天上午继续搞,还好,总算搞定,记录一下过程。Linux上拨号上网基础教程网上有,自行搜索。
以下个人理解:
拨号上网有两种方式:
[*]Ubuntu上貌似自带一个dsl的config界面,命令行输入:pppoeconf然后回车就会进入config GUI。好,第一个坑来了,在username那里,记得把默认的username字符删掉,否则些字符也会当成你的用户名来保存到配置文件里。密码没有这个问题。
[*]另外一个就是pppoe-setup命令行,这个也请自行搜索吧,可以看看这几篇文章:
[*]pppoe-setup整个流程:
https://blog.csdn.net/mingzznet/article/details/52888388
-start时有问题:
http://www.cnblogs.com/dczsf/archive/2011/03/05/1971404.html
其实这两种方式,原理相同,最终会把配置信息都存放到各自的conf文件里。
pppoeconf方式,最终conf文件在: /etc/ppp/peers/dsl-provider,所以命令行vim直接修改里面的参数,完了保存退出,再运行pon dsl-provider,再运行plog查看是否拨号成功。
root@pppoe:~# vim /etc/ppp/peers/dsl-provider
root@pppoe:~# pon dsl-provider
Plugin rp-pppoe.so loaded.
root@pppoe:~# plog
Jun8 10:25:47 pppoe pppd: Using interface ppp1
Jun8 10:25:47 pppoe pppd: Connect: ppp1eth1
Jun8 10:25:47 pppoe pppd: Remote message: Authentication Successful,Welcome!
Jun8 10:25:47 pppoe pppd: PAP authentication succeeded
Jun8 10:25:47 pppoe pppd: peer from calling number 00:22:93:5D:E0:20 authorized
Jun8 10:25:47 pppoe pppd: not replacing existing default route via 180.101.205.254
Jun8 10:25:47 pppoe pppd: localIP address x.x.x.x
Jun8 10:25:47 pppoe pppd: remote IP address x.x.x.x
Jun8 10:25:47 pppoe pppd: primary DNS address x.x.x.x
Jun8 10:25:47 pppoe pppd: secondary DNS address x.x.x.x
root@pppoe:~# ifconfig
ifconfig就会看到多了一个ppp1,eth1就是通过这个来上网。
第二个坑来了:如果username和password那里你输错了,通过GUI界面太麻烦了,直接vim 下面dsl-provider的密码配置文件。格式里面有说明,照着配就行了。
root@pppoe:~# vim /etc/ppp/pap-secrets
好了,就这么多吧!
页:
[1]