爱思考的呆呆鱼 發表於 2023-11-19 00:00:00

ubuntu的ADSL拨号上网(主要是无线网情况下)

<p>
        <span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>1.ADSL </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>在ubuntu 下拨号用ADSL拨号上网,首先需要用pppoeconf进行用户名和密码的设置。(参看ubuntu帮助) </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>1. 确认您的以太网卡已被检测到。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>2. 输入您的用户名。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>3. 输入您的密码。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>4. 若您曾经配置过一个 PPPoE 连接的话,您会被询问是否需要改变其设置。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>5. 常见选项:您被询问您是否想要 “noauth” 和 “defaultroute” 选项并移除 “nodetach” - 选择 Yes。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>6. 使用 peer DNS-选择Yes。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>7. Limited MSS problem - 选择 Yes。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>8. 当您被询问是否要在启动时连接,您通常会想选“是”。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>9. 最后您会被询问是否要立即建立连接。              </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>一旦您完成了这些步骤,您的连接应当就可用了。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>若想即时启动您的 ADSL 连接,请在终端中输入: </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>sudo pon dsl-provider </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>若想中断您的 ADSL 连接,请在终端中输入: </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>sudo poff dsl-provider </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>2.dns 设置 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>在拨号上网时,经常发现有些网站无法登录,例如www.openswan.org,www.kernel.org. </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>在命令行下输入:# nslookup </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>&gt;server </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>Default server: 202.102.192.68 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>Address: 202.102.192.68#53 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>Default server: 202.102.199.68 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>Address: 202.102.199.68#53 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>你就能发现自己正在使用的dns。也可以输入一些网址看看是否能解析。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>&gt;www.sohu.com </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>www.sohu.com    canonical name = d7.a.sohu.com. </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>d7.a.sohu.com   canonical name = cachesh1.a.sohu.com. </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>Name:   cachesh1.a.sohu.com </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>Address: 61.152.234.80 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>Name:   cachesh1.a.sohu.com </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>Address: 61.152.234.81 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>Name:   cachesh1.a.sohu.com </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>Address: 61.152.234.82 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>Name:   cachesh1.a.sohu.com </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>Address: 61.152.234.84 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>Name:   cachesh1.a.sohu.com </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>Address: 61.152.234.85 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>Name:   cachesh1.a.sohu.com </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>Address: 61.152.234.86 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>但是输入 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>&gt;www.kerner.org </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>Server:         202.102.192.68 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>Address:        202.102.192.68#53 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>Non-authoritative answer: </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>*** Can't find www.kernel.org: No answer </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>一番痛苦后,发现首先要修改/etc/ppp/pper/dsl-provider文件,将usepeerdns项释视掉。这项注释就是说不需要ubuntu自动设置的/etc/resolve.conf中的dns.本人在安徽合肥,ubuntu给我默认的dns如下: </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>nameserver 202.102.192.68 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>nameserver 202.102.199.68 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>后来到网上找个开源的DNS </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>如下: </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>nameserver 208.67.222.222  </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>nameserver 208.67.220.220 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>从此上网不在烦恼。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>转自http://linux.chinaunix.net/techdoc/system/2009/04/30/1109668.shtml</span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>但此方法结果导致重启后,无线网卡不启用。</span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>综合了几种情况,最后总结出办法如下:</span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>1.使用Ubuntu9.04自带的“网络管理器”,或者使用Wicd工具(据说能解决pppoe设置后没有无线网卡不启用的问题)。</span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>2.ADSL拨号工具,使用gtk-pppoe工具gtk-pppoe_0.0.1_i386.deb,安装后需要更改sudo gedit /etc/ppp/peers/</span><span style='line-height: 25.2px; font-size: 14px; font-family: tahoma, arial, "Microsoft YaHei"; color: rgb(255, 0, 0);'>dsl-provider</span><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>。下载地址http://cid-9eb071c4942d8e94.skydrive.live.com/self.aspx/ubuntu/gtk-pppoe%5E_0.0.1%5E_i386.deb</span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>内容为</span></p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        noipdefault<br>
        defaultroute<br>
        replacedefaultroute<br>
        hide-password<br>
        noauth<br>
        persist<br>
        plugin rp-pppoe.so <span>wlan0</span><br>
        usepeerdns<br>
        user "<span>拨号用户名</span>"</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        <span><img style="max-width:100%!important;height:auto!important;"title="ubuntu的ADSL拨号上网(主要是无线网情况下)" alt="ubuntu的ADSL拨号上网(主要是无线网情况下)" class="blogimg" small="0" src="https://zhuji.jb51.net/uploads/img/202305/42b34cb67620bf182a7030d71b7d54aa.jpg"></span></p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
         </p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        重启,用上面的那个软件就能上去了<br>
        在就是改端口 在 终端输入 sudo gedit /etc/ppp/peers/<span>dsl-provider</span>中eth0 改成wlan0(这个是指你系统识别出来的无线网卡名称) 就好了。通过以上的设置,就可以无误的实现上网了,每次启动此软件,点连接就可以。第3步就可以免了。</p>
<p>
        <span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>3.这一步,主要是对使用pppoe之后造成不能使用无线网卡的现象进行补救,但自己的情况是没有成功,才搜索出上面的办法。</span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>修改Ubuntu自带网络管理器network manager设置:</span></p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        打开/etc/NetworkManager/nm-system-settings.conf</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        sudo gedit /etc/NetworkManager/nm-system-settings.conf<br>
        修改<br>
        <br>
        managed=false  ;把false改为true</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        到最后,无线网卡的灯其实没有亮,但的确是在工作。</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        多方转载,自加总结。</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        再载一篇:</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        ubuntu 9.10刚出来就装了,启动稍微慢了点,不过运行却很流畅。<br>
        用到现在唯一遇到的bug就是无法ADSL拨号,记录下最简单的两种方法:<br><br><span>一、使用新版的NetworkManager</span><br><br>
        直接引用lainme简洁明了的回复;<br><font color="#428bca">http://forum.ubuntu.org.cn/viewtopic.php?f=48&amp;t=239763&amp;start=3</font><br><br>
        1、从PPA更新network-manager<br>
        sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BC8EBFE8<br>
        在/etc/apt/sources.list最后加上<br>
        deb <font color="#428bca">http://ppa.launchpad.net/network-manager/trunk/ubuntu</font> karmic main<br>
        deb-src <font color="#428bca">http://ppa.launchpad.net/network-manager/trunk/ubuntu</font> karmic main<br>
        sudo aptitude update<br>
        sudo aptitude safe-upgrade<br><br>
        2、解决pppoeconf和network-manager冲突<br>
        更改/etc/NetworkManager/nm-system-settings.conf中的managed=true<br>
        更改/etc/network/interfaces,只保留<br>
        auto lo<br>
        iface lo inet loopback<br>
        删除/etc/resolv.conf<br><br>
        然后sudo /etc/init.d/network-manager restart<br>
        如果面板没有nm图标,ALT+F2输入nm-applet,并添加自启动(我的安装时没有添加)<br><br>
        3、右击NM图标,编辑链接,切换到DSL,新建,输入用户名和密码。<br><br><span>二、使用pppoeconf命令拨号</span><br><br>
        启用有线连接:sudo ifconfig eth0 up<br>
        在终端中输入:sudo pppoeconf<br>
        一个基于文本菜单的程序会指导你进行下面的步骤:<br><br>
        1. 确认以太网卡已被检测到。<br>
        2. 输入你的用户名(由ISP所提供 注意:输入时请先清除输入框中的“username“,否则可能造成验证错误)。<br>
        3. 输入你的密码(由ISP所提供)。<br>
        4. 如果你已经配置了一个PPPoE的连接,会通知你这个连接将会被修改。<br>
        5. 弹出一个选项:你被询问是否需要'noauth'和'defaultroute'选项和去掉'nodetach',这里选择"Yes"。<br>
        6. Use peer DNS - 选择 "Yes".<br>
        7. Limited MSS problem - 选择 "Yes".<br>
        8. 当你被询问是否在需要在进入系统的时候自动连接,你可以选择"Yes"。<br>
        9. 最后,你会被询问是否马上建立连接。<br><br>
        在需要的时候启动ADSL连接,可以在终端中输入:sudo pon dsl-provider<br><br>
        断开ADSL连接,可以在终端中输入:sudo poff<br><br>
        如果你发现连接正常工作,尝试手动去调整你之前ADSL连接的配置(参考前一节)。<br><br>
        需要查看日志,可以在终端中输入:plog<br>
        获得接口信息,可以在终端中输入:ifconfig ppp0<br><br>
        使用pppoeconf拨号后,Network Manager显示设备未托管的解决办法:<br><br>
        在终端中输入以下命令,来配置网络连接管理文件:<br><br>
        sudo gedit /etc/NetworkManager/nm-system-settings.conf<br>
        打开后,找到<br>
        <br>
        managed=false<br>
        修改成:<br>
        <br>
        managed=true<br><br>
        终端运行sudo gedit /etc/network/interfaces<br>
        只保留<br><br>
        auto lo<br>
        iface lo inet loopback<br><br>
        删除dns设置<br>
        sudo mv /etc/resolv.conf /etc/resolv.conf_backup<br><br>
        之后重启network-manager服务:<br>
        sudo service network-manager restart</p>
頁: [1]
查看完整版本: ubuntu的ADSL拨号上网(主要是无线网情况下)