Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 操作系统 > Linux > arm-linux配置pppoe
【标  题】:arm-linux配置pppoe
【关键字】:arm-linux,pppoe
【来  源】:http://blog.csdn.net/yinchongyi/archive/2006/12/29/1467641.aspx

arm-linux配置pppoe

Your Ad Here
1.1    pppoe概述
1.1.1什么是PPP
 

    PPP是点对点协议(Point to Point Protocol)的缩写。它是TCP/IP网络协议包的一个成员。PPPTCP/IP的扩展,它增加了两个额外的功能组:它可以通过串行接口传输TCP/IP包; 它可以安全登录

当使用作为公共电话系统的部分的串行接口时,必须要注意确保所有通信的真实性。这个终端PPP集合了用户名字和密码安全。因此,一个路由器或者服务器通过 PPP接收到一个请求时,如果这个请求的来源是不安全的,这就需要授权。这个授权是PPP的一部分。因为它的通过串行接口路由TCP/IP包的能力和它的授权能力,ISPInternet服务提供商)通常使用PPP来允许拨号用户连接到Internet
 
1.1.2什么是PPPoE

    PPPoE的意思是通过以太网的点对点协议。PPP通常通过串行通信,例如拨号modem连接。很多DSL Internet服务提供商现在使用通过以太网的PPP协议,因为它的额外的登录和安全性的特性。PPPoE将这些功能带给不使用串行连接来连接他们的用户的ISP。串行的ISP已经在modem通讯中使用PPP。另一方面,DSL提供商使用Ethernet而不是串行通讯。因为这样,就需要PPPoE的额外的功能,允许他们通过使用用户登录来确保通讯的安全和测量每个用户的数据流量。

1.2    pppoe安装
1.2.1安装pppd
  • 首先准备pppd安装软件包ppp-2.4.1
  • linux下将其解压,cd切换到ppp-2.4.1工作目录。
  • 运行命令:make
  • make命令运行,编译之后将产生名为pppd的文件。将pppd文件拷贝到ramdisk/usr/sbin目录下。
1.2.2安装pppoe
  • 准备rp-pppoe-3.7软件包。
  • linux下将其解压,cd切换到rp-pppoe-3.7工作目录中。
  • 运行命令:make
  • make命令运行,编译之后将产生pppoepppoe-relaypppoe-serverpppoe-sniff四个文件。然后拷贝这四个文件到ramdisk中的/usr/sbin中的目录下。
1.3    pppoe配置
  • PPPoE目录下,复制optionspap-secertspppoe.confpppoe.setup文件到ramdisk中的/etc/ppp/options/etc/ppp/pap-secerts/etc/ppp/pppoe.conf/etc/ppp/pppoe.setup/usr/sbin/pppoe-setup
  • PPPoE目录下,复制Adsl-connectAdsl-setupAdsl-startAdsl-stop文件到ramdisk中的/sbin目录下。
  • PPPoE目录下,复制ifcfg-eth0ifcfg-eth1ramdisk中的/etc/sysconfig/network-scripts目录下。
  • PPPoE目录下,复制libcrypt.so.1libdl.so.2ramdisk中的/usr/lib目录下。
  • 切换到ramdisk中的/dev目录下,运行下面命令生成ppp节点设备。
#mknod /dev/ppp c 108 0
#mknod /dev/ptmx c 5 2
#mkdir pts
#cd pts
#mknod 0 c 136 0
#mknod 2 c 136 2
#mknod 3 c 136 3
#mknod 4 c 136 4
#mknod 5 c 136 5
1.4    pppoe编译
  • 切换到arm-linux内核源码/usr/src/arm-linux-2.4.19/目录下。
运行命令make xconfigmake menuconfig,进行内核编译配置。

 
选择Network device support,然后在Network device support选项下继续选择以下选项:

 <*> PPP (point-to-point protocol) support       
[*]   PPP multilink support (EXPERIMENTAL)                       
<*>   PPP support for async serial ports           
<*>   PPP over Ethernet (EXPERIMENTAL)
Esc键,继续选择File systems,在File systems下选择以下选项:

[*] /dev/pts file system for Unix98 PTYs
Esc键,继续选择Character device,在Character device下选择以下选项:

 [*] Unix98 PTY support
最后保存退出

运行命令
make clean
make dep
./mkbootp.sh
将编译后的镜像烧写到arm目标上。
1.5    pppoe拨号
1.5.1测试pppoe是否安装成功
 
通过超级终端运行arm目标板。
切换到/usr/sbin中运行pppd,如果出现乱码,代表pppoe移植成功。
 
1.5.2配置pppoe客户端
/usr/sbin目录下,运行pppoe-setup进行pppoe客户断的配置。
 
# pppoe-setup
 
#/usr/sbin/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 value (default no):

输入 no
 
当出现

>>> Enter the DNS information here:

输入 server ,这表示使用ADSL拨号自动获得的DNS服务器IP地址
如果不输入server,可以输入指定的DNS,如北京:202.106.0.20202.106.47.151
 
当出现

>>> Please enter your PPPoE password:

输入ADSL帐号的密码
 
当出现

>>> Choose a type of firewall (0-2):

输入 0 ,不使用防火墙
 
当出现

>>> Accept these settings and adjust configuration files (y/n)?

如果输入的信息正确,输入 y ,完成配置,否则,输入 n 重新输入。
 
1.5.3启动adsl拨号
pppoe客户端配置完毕以后,可以启动adsl进行拨号了。
运行命令:
# sh /sbin/adsl-start &
# ifconfig
 
eth0      Link encap:Ethernet  HWaddr 00:13:72:27:88:CE 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1310 errors:0 dropped:0 overruns:0 frame:1
          TX packets:326 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (24.9 GiB)  TX bytes:0 (626.9 MiB)
          Interrupt:35

ppp0      Link encap:Point-Point Protocol 
          inet addr:61.48.76.114  P-t-P:24.24.24.24  Mask:255.255.255.255
          UP BROADCAST RUNNING NOARP MULTICAST  MTU:16436  Metric:1
          RX packets:54 errors:0 dropped:0 overruns:0 frame:0
          TX packets:57 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:3990 (3.8 KiB)  TX bytes:7220 (5.7 KiB)

出现上面中的信息,在输出中应该含有关于 ppp0 的一堆信息,其中还绑定了 IP 地址,说明已经从拨号中获得了IP地址。
使用ping命令看是否成功。如果ping通,证明pppoe拨号成功。

 
 
1.6    PC中架设pppoe server(pppoe服务器)
 
1.6.1安装pppoe软件包
架设pppoe服务器,首先需要一台装有linux系统的PC机。在PC上安装pppdrp-pppoe两个软件包。包名为rp-pppoe-3.3-7ppp-2.4.1-3。然装完后查看是否安装成功。运行命令:
 
[root@localhost sbin]# rpm -qa|grep ppp
rp-pppoe-3.3-7
ppp-2.4.1-3
 
1.6.2配置pppoe服务器
1.6.2.1              配置/etc/ppp/options
第一步配置/etc/ppp/options文件,options文件内容如下:
 

# Don't use the modem control lines.

local

# Specifies that pppd should use a UUCP-style lock on the serial device

# to ensure exclusive access to the device.

lock

# Set the MRU [Maximum Receive Unit] value to <n> for negotiation. pppd

# will ask the peer to send packets of no more than <n> bytes. The

# minimum MRU value is 128. The default MRU value is 1500. A value of

# 296 is recommended for slow links (40 bytes for TCP/IP header + 256

# bytes of data).
mru 1492

# Set the MTU [Maximum Transmit Unit] value to <n>. Unless the peer

# requests a smaller value via MRU negotiation, pppd will request that

# the kernel networking code send data packets of no more than n bytes

# through the PPP network interface.

mtu 1492
 
1.6.2.2              配置pap-secrets、chap-secrets
需要拨入的用户名需要存在文件pap-secretschap-secrets中,其内容相同。
内容如下(以表格形式呈现)
客户端用户名
服务器
密码
IP地址
lumino
*
123456
*
原文对比:
# Secrets for authentication using PAP
# client server secret IP addresses

"lumino"      *    "123456"   *

最后一个必须是*
 
1.6.2.3             配置/etc/ppp/pppoe-sever-options
pppoe-server-options内容如下:
 
# PPP options for the PPPoE server
#require-pap
#login # this is need when auth is enable
#lcp-echo-interval 10
#lcp-echo-failure 2
#DNS1=202.106.47.151
#DNS2=202.106.0.20
 
1.6.3测试pppoe安装是否成功
PC中测试pppoe是否安装成功。
首先切换到目录/usr/sbin
运行pppd,如果出现乱码,代表安装已经成功。

 
1.6.4启动pppoe拨号服务器
运行命令:
pppoe-server -L 192.168.0.6 -R 192.168.0.11
启动pppoe拨号服务器
参数 –L 指定pppoe服务器

参数 –R指定 pppoe客户端

Linux 下的“Hello world!”:【上一篇】
SkyEye配置选项:【下一篇】
【相关文章】
  • ADSL pppoe vpn QoS数据包计划程序
  • PPPoE,在安全的边缘徘徊
  • PPPOE协议简介(zz)
  • PPPOE拨号服务器(zz)
  • PPPoE工作原理与帧格式
  • 安装,配置rp-pppoe拨号软件,使adsl成功上网
  • OpenLDAP+FreeRADIUS+MySQL+RP-PPPOE 构建PPPOE服务器
  • PPPOE + FreeRADIUS + MySQL 配置记录
  • 架设PPPoEServer笔记
  • 架设PPPoEServer笔记(转自system.cublog.cn )
  • 【随机文章】
  • 几句话介绍MagicAjax
  • 在Windows下面从源代码编译PHP的步骤
  • 困扰JSP的一些问题与解决方法
  • 修复不能拖放的ASF和WMV文件
  • Delphi一点通:如何将源代码学好
  • QQ宠物挂机外挂
  • 7017-S85升级
  • 学习OGRE~~
  • asp+版本简单的留言板的制作(一) 
  • windows下远程访问linux桌面
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 bbb软讯网络 All Rigths Reserved.