RedHat中上网rp-pppoe的安装方法

东坡下载 2018年06月05日 11:27:10

      ADSL(rp-pppoe 工具)安装、使用方法(本文基于 linuxCN 的原创文章修改而成,原文参见:http://www.linuxfans.org/nuke/modules.php?name=Forums&file=viewtopic&t=218&highlight=ADSL) 
      《配置网卡》 
      首先运行 netconfig 并选择 DHCP,保存、退出。 
      《安装 rp-pppoe》 
      然后下载最新的 rp-pppoe 源码文件(Google 里搜索一下)并在 root 下安装,Magic linux 里默认已经安装了。 
      例如:进入linux,解压 rp-pppoe-3.5.tar.gz : 
      #tar -zxf rp-pppoe-3.5.tar.gz 
      进入生成的目录: 
      #cd rp-pppoe-3.5 
      在所在目录内运行脚本 go: 
      #./go 
      将自动进行编译和安装。 
      《配置拨号》 
      调用 /usr/sbin/adsl-setup 进行配置 
      #adsl-setup 
      当出现 
      >>> Enter your PPPoE user name : 
      输入ADSL帐号的用户名 
      当出现 
      >>> Enter the Ethernet interface connected to the ADSL modem 
      For Solaris, this is likely to be something like /dev/hme0. 
      For Linux, it will be ethn, where 'n' is a number. 
      (default eth0): 
      输入 eth0 ,这是ADSL相连的网卡的名字 
      当出现 
      >>> Enter the demand values (default no): 
      输入 no 
      当出现 
      >>> Enter the DNS inFORMation here: 
      输入相应的 DNS 服务器 IP 地址(一般有2个),在 magic linux 下通常需要输入 server,即让系统自动分配 ip 地址 
      当出现 
      >>> Please enter your PPPoE password: 
      输入你的 ADSL 帐号的密码 
      当出现 
      >>> Choose a type of firewall (0-2): 
      输入 0 或 1 
      当出现 
      >>> Accept these settings and adjust configuration files (y/n)? 
      如果输入的信息正确,输入 y ,完成配置,否则,输入 n 重新输入。 
      《拨号上网》 
      完成后使用命令: 
      adsl-start 启动 PPPOE 客户端软件,进行连接,如果成功,将出现 
      Connected; 
      adsl-stop 断开和ISP的连接 
      adsl-status 查看当前连接的状态 
      《技巧提示》 
      如果想在Linux系统启动时自动启动ADSL连接,输入以下命令 
      #chkconfig --add adsl 
      将在当前的运行级下加入ADSL的自启动脚本 
      不想自动运行,则每次上网前选在终端下运行adsl-start即可! 
      如果不知道相应DNS服务器的IP地址,可在 windows 里拨号后,在 MS-DOS 窗口里运行 ipconfig/all 查看 DNS Server 的 IP 地址(一般有两个)。如果本机上没有Windows,那么在本地域的其他装有 Windows 的机子上操作也可。 
      例如: 
      I:>ipconfig /all 
      Windows 2000 IP Configuration 
      Host Name . . . . . . . . . . . . : star 
      Primary DNS Suffix . . . . . . . : 
      Node Type . . . . . . . . . . . . : Broadcast 
      IP Routing Enabled. . . . . . . . : No 
      WINS Proxy Enabled. . . . . . . . : No 
      Ethernet adapter 本地连接: 
      Connection-specific DNS Suffix . : 
      Descrīption . . . . . . . . . . . : Realtek RTL8139(A) PCI Fast Etherne 
      Adapter 
      Physical Address. . . . . . . . . : 00-D0-F8-3D-CA-D8 
      DHCP Enabled. . . . . . . . . . . : Yes 
      Autoconfiguration Enabled . . . . : Yes 
      Autoconfiguration IP Address. . . : 169.222.23.123 
      Subnet Mask . . . . . . . . . . . : 255.255.0.0 
      Default Gateway . . . . . . . . . : 
      DNS Servers . . . . . . . . . . . : 
      PPP adapter 连接设备 Realtek RTL8139(A) PCI Fast Ethernet Adapter: 
      Connection-specific DNS Suffix . : 
      Descrīption . . . . . . . . . . . : WAN (PPP/SLIP) Interface 
      Physical Address. . . . . . . . . : 00-53-45-00-00-00 
      DHCP Enabled. . . . . . . . . . . : No 
      IP Address. . . . . . . . . . . . : 221.206.209.250 
      Subnet Mask . . . . . . . . . . . : 255.255.255.255 
      Default Gateway . . . . . . . . . : 221.206.209.250 
      DNS Servers . . . . . . . . . . . : 202.106.100.213 
      202.106.87.65 
      NetBIOS over Tcpip. . . . . . . . : Disabled 
      可以看出: 
      DNS Servers . . . . . . . . . . . : 202.106.100.213 
      202.106.87.65'