How to configure PPPoE server authenticate
Hello,I want to build a PPPoE client and server environment so I can set three computers to work with PPPoE: one computer run as PPPoE server, and the other two computers run as PPPoE client.So the two PPPoE clients can communicate with each other throuht PPPoE within Ethernet instead of using ADSL modem. I have some problems which I can not find answers in the manual pages and the document within the source code.
1. The first one is how to set config files. It's easy to use adsl-setup to set PPPoE client, but how can I set PPPoE server so the server can accept my PPPoE client? I find /etc/ppp/pppoe-server-options which is related to PPPoE server, but it only ask for pap with "require-pap", no other infomation which is used to authenticate PPPoE client's username and password. I also read /etc/ppp/pap-secrets, which records "client", "server", "secret" and "IP address". I guess maybe it will not only used by PPPoE client but also PPPoE server. The question is how should I put contents into the file. Maybe the "client" and "secret" should be the PPPoE client's username and password. How can I write "server" field? With "*"? And how shall I write "IP address"? As the PPPoE client's IP address is malloc dynamic, So what's the use of this field?
2. The Second is the relationship between executable files like "pppoe" and shell script files like "adsl-run". I believe that "pppoe" is essential for PPPoE client to run. But how about "adsl-run"? Since the manual page of "pppoe.conf" says that pppoe.conf is used only by the various adsl-* shell scripts, not by pppoe itself. So how "pppoe" get the information which is written in the pppoe.conf? Or "pppoe" does not need the information written in the pppoe.conf, it just need the username and password which is written in /etc/ppp/pap-secrets? And how about if I do not use shell script files? I write configure files manually and run "pppoe" manually, does it OK?
3. I find that /etc/ppp/pppoe.conf has one field named "USER". What is it's relationship between /etc/ppp/pap-secrets's field "client"? Does "USER" essential? How I set this informatin in PPPoE server?