CentOS下安装命令
yum install rp-pppoe
安装完成后
cd /etc/ppp
vi pppoe-server-options
里面内容大概可以看明白
# PPP options for the PPPoE server
# LIC: GPL
require-pap
require-chap
login
lcp-echo-interval 10
lcp-echo-failure 2
logfile /var/log/pppoe.log
接着创建用户
vi chap-secrets
# Secrets for authentication using CHAP
# client server secret IP addresses
####### redhat-config-network will overwrite this part!!! (begin) ##########
####### redhat-config-network will overwrite this part!!! (end) ############
testuser * "testpwd" *
上面testuser/testpwd 就是我创建的用户和密码
启动pppoe
pppoe-server -I eth0 -L 10.10.10.1 -R 10.10.10.100-200
-I eth0 在eth0端口上检测pppoe discover包
-L 10.10.10.1 虚拟网关的意思,就是pppoe服务器端虚拟网关ip
-R 10.10.10.100-200 分配虚拟IP,分别是10.10.10.100到10.10.10.200