确定安装了ppp和rp-pppoe软件包
1、编辑/etc/ppp/options,添加:
plugin rp-pppoe.so
表示导入rp-pppoe.so
2、编辑/etc/ppp/pppoe-server-options,内容如下:
# PPP options for the PPPoE server
# LIC: GPL
auth #采用认证方式
#require-pap
require-chap #采用chap
lcp-echo-interval 10
lcp-echo-failure 2
ms-dns 202.106.0.20 #主DNS
ms-dns 202.106.46.151 #备份DNS
3、编辑/etc/ppp/chap-secrets,添加用户,内容如下:
# Secrets for authentication using CHAP
# client server secret IP addresses
"test1" * "test1" *
"test2" * "test2" *
"test3" * "test3" *
注:在IP addresses 项上也可以加入分配给客户端的IP
4、启动pppoe server
#modprobe pppoe
#pppoe-server -I eth0 -C PPPOESERVER -S ADSLSERVER -L 10.1.1.254 -R 10.1.1.1 -u -r
-I 指定网络接口设备
-C 访问集线器名
-S 服务名
-L 本地IP 即建立点到点服务器IP地址
-R 设置远程IP地址池
-u Pass 'unit' option to pppd
-r 随机产生会话数
如果把pppoe编译到内核,则可以使用内核态启动服务,参数为:
-k: 使用内核方式
另外在启动时运行在/etc/rc.local文件中加上上面两条命令.
1、编辑/etc/ppp/options,添加:
plugin rp-pppoe.so
表示导入rp-pppoe.so
2、编辑/etc/ppp/pppoe-server-options,内容如下:
# PPP options for the PPPoE server
# LIC: GPL
auth #采用认证方式
#require-pap
require-chap #采用chap
lcp-echo-interval 10
lcp-echo-failure 2
ms-dns 202.106.0.20 #主DNS
ms-dns 202.106.46.151 #备份DNS
3、编辑/etc/ppp/chap-secrets,添加用户,内容如下:
# Secrets for authentication using CHAP
# client server secret IP addresses
"test1" * "test1" *
"test2" * "test2" *
"test3" * "test3" *
注:在IP addresses 项上也可以加入分配给客户端的IP
4、启动pppoe server
#modprobe pppoe
#pppoe-server -I eth0 -C PPPOESERVER -S ADSLSERVER -L 10.1.1.254 -R 10.1.1.1 -u -r
-I 指定网络接口设备
-C 访问集线器名
-S 服务名
-L 本地IP 即建立点到点服务器IP地址
-R 设置远程IP地址池
-u Pass 'unit' option to pppd
-r 随机产生会话数
如果把pppoe编译到内核,则可以使用内核态启动服务,参数为:
-k: 使用内核方式
另外在启动时运行在/etc/rc.local文件中加上上面两条命令.