Monday, May 21, 2007

pppoe-server in linux install&configure----writen by welv

我的RS3么搞定,所以移到OpenSUSE上来搞。

网上有现成的rpm包,找来装上就成,不会有什么麻烦,装完后:

linux:~ # rpm -qa | grep ppp
ppp-2.4.4-24
rp-pppoe-3.8-5
smpppd-1.59-38
linux:~ #

然后就是配置了,主要是在/etc/ppp/目录下,
首先是认证方式:pppoe-server-options文件里,pap or chap,pap不好用,只能用chap;
其次是在相应的文件里指定用户名和密码,比如chap-secrets:

# client          server        secret         IP addresses
"21026A"           *           "cisco1"        10.74.52.51
"21026AA"         *           "cisco12"      10.74.52.52
"21026AAA"       *           "cisco123"    10.74.52.53

再后来就么什么了,启动程序吧:

linux:/etc/ppp # pppoe-server --help
pppoe-server: invalid option -- -
Usage: pppoe-server [options]
Options:
-I if_name -- Specify interface (default eth0.)
-T timeout -- Specify inactivity timeout in seconds.
-C name -- Set access concentrator name.
-m MSS -- Clamp incoming and outgoing MSS options.
-L ip -- Set local IP address.
-l -- Increment local IP address for each session.
-R ip -- Set start address of remote IP pool.
-S name -- Advertise specified service-name.
-O fname -- Use PPPD options from specified file
(default /etc/ppp/pppoe-server-options).
-p fname -- Optain IP address pool from specified file.
-N num -- Allow 'num' concurrent sessions.
-o offset -- Assign session numbers starting at offset+1.
-f disc:sess -- Set Ethernet frame types (hex).
-s -- Use synchronous PPP mode.
-u -- Pass 'unit' option to pppd.
-r -- Randomize session numbers.
-d -- Debug session creation.
-P -- Check pool file for correctness and exit.
-h -- Print usage information.

PPPoE-Server Version 3.8, Copyright (C) 2001-2006 Roaring Penguin
Software Inc.
PPPoE-Server comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under the terms of the GNU General Public License, version 2
or (at your option) any later version.
http://www.roaringpenguin.com
linux:/etc/ppp #

 

晕了吧,简单点的:
linux:/etc/ppp #pppoe-server -I eth0 -S sipurash -L 10.74.52.50 -R 10.74.52.51 -N 3

明白了吧,easy哈?

No comments: