Topic: PPPoE Server

Hi,
I want to configure PPPoE Server. Here http://kbonev.christian.net/pppoe I have explained what I have done and what are my problems.

If anyone can help I would be greateful.

Thanks.

Last edited by mak (2005-09-13 09:47:40)

Re: PPPoE Server

You should really consider creating a whole thread (message) with colors, bold stuff, ...

If you just register on every BSD forum to post a link I'm not sure someone will take the time to answer.

<wintellect> NetBSD users are smart enough to accept that there's no 3D support tongue

Re: PPPoE Server

I want to configure PPPoE server on FreeBSD.

1. I have compiled kernel with needed options:
options         NETGRAPH
options         NETGRAPH_PPPOE
options         NETGRAPH_SOCKET
options         NETGRAPH_IFACE
options         DUMMYNET

2. I modified /etc/defaults/rc.conf

pppoed_enable="YES"
pppoed_provider="pppoe"
pppoed_flags=" -d -P /var/run/pppoed.pid -l "default" "
pppoed_interface="vr0"          # The interface that pppoed runs on.
gateway_enable="YES"

3. I configure /etc/ppp/ppp.conf


pppoe:
set device /usr/libexec/pppoed
allow users
set mtu 1450
set mru 1450
set speed sync
#set server /var/tmp/pppuser%d "" 0177
allow mode direct
enable chap                        #turn on chap and pap accounting
#enable pap                         #turn on chap and pap accounting
enable lqr                         #turn on ppp bridging
disable ipv6cp                     #we don't use ipv6, don't want the errors
#load server
#set radius /etc/radius.conf       (I am disabling set radius at this point because I want to be sure that my ppppoe server is running without radius and then to connect to the radius, my point is this server to work with radius)
disable deflate deflate24 pred1 acfcomp protocomp
deny deflate deflate24 pred1 acfcomp protocomp
set dns 212.110.95.71 212.110.95.4
accept dns
set ifaddr 192.168.145.1 192.168.145.6-192.168.145.60
set log connect command chap lcp error alert warning

4. I run pppoed with:
/usr/libexec/pppoed -d -P /var/run/pppoed.pid -l pppoe vr0
The result is:
PPPoE_Server# /usr/libexec/pppoed -d -P /var/run/pppoed.pid -l pppoe vr0
Sending NGM_LISTHOOKS to vr0:
Got reply from id [1]: Type ether with 1 hooks
  Got [1]:orphans -> [4]:ethernet
Sending PPPOE_LISTEN to .:pppoe-2997, provider


PPPoE_Server# ps aux | grep pppoed
root   2998  0.0  1.0   924  596  ??  Is    9:35AM   0:00.00 /usr/libexec/pppoed -d -P /var/run/pppoed.pid -l pppoe vr0

5. In my /etc/ppp/ I have only ppp.conf, so I made ppp.secret and in it:
user        password

is this ok? should I have ppp.secret by default or is it ok making it by myself? Is this the right place where the user and password should be?

When I am sure that my pppoe server is ok, I want to connect it to free radius, ( I have installed free radius on other mashine) and from there to take the user and password and other information like IP.

You can see that I have disabled
load server
set radius /etc/radius.conf

and in /etc/radius.conf I have:
auth        IP_to_radius:port    secret

Is this enough for connecting with free radius or I need something to install, something that my pppoe server should be client to this free radius.?

6. Testing the PPPoE Server:

PPPoE_Server# ifconfig
vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet 192.168.145.1 netmask 0xffffff00 broadcast 192.168.145.255
        ether 00:02:44:92:59:ed
        lp0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
        inet 127.0.0.1 netmask 0xff000000
ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552
faith0: flags=8002<BROADCAST,MULTICAST> mtu 1500
tun0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500


I am with Suse 9.3 192.168.145.5  (I am working with my pppoe server through ssh) , so I want to use this linux as a client.
eth0 is my public address, eth0:1 Virtual private on same network card.
eth0:1    Link encap:Ethernet  HWaddr 00:11:09:02:94:1C
          inet addr:192.168.145.5  Bcast:192.168.145.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:11 Base address:0xe800

The results from pppoe -A from clients side:

cirio:/var/log # cd /
cirio:/ # pppoe -A[/color]
Access-Concentrator: PPPoE_Server
Got a cookie: 40 3d eb c0
AC-Ethernet-Address: 00:02:44:92:59:ed
--------------------------------------------------

This means that client recognize pppoe server in the network.

Now, I want to test my PPPoE Server does it work properly.
The main purpose of the server is to work with windows mashines, I dont have here on my network windows, so I am trying to connect with Suse, with rp-pppoe.

adsl-setup:
Ethernet Interface: eth0:1
User name:          user
Activate-on-demand: No
DNS:                Do not adjust
Firewalling:        NONE

>>> Accept these settings and adjust configuration files (y/n)? y
Adjusting /etc/ppp/pppoe.conf
Adjusting /etc/ppp/pap-secrets and /etc/ppp/chap-secrets
  (But first backing it up to /etc/ppp/pap-secrets-bak)
  (But first backing it up to /etc/ppp/chap-secrets-bak)



Congratulations, it should be all set up!

Type 'adsl-start' to bring up your ADSL link and 'adsl-stop' to bring
it down.  Type 'adsl-status' to see the link status.


Now I type adsl-start and the result is:
cirio:/ # adsl-start
................TIMED OUT

The results from adsl-connect:

cirio:/ # adsl-connect
Using interface ppp0
Connect: ppp0 <--> /dev/pts/3
Could not determine local IP address
Connect time 0.1 minutes.
Sent 74 bytes, received 90 bytes.
Connection terminated.
pppoe: read (asyncReadFromPPP): Session 57: Input/output error
Script /usr/sbin/pppoe -p /var/run/pppoe.conf-adsl.pid.pppoe -I eth0:1 -T 80 -U  -m 1412    finished (pid 11087), status = 0x1
Using interface ppp0
Connect: ppp0 <--> /dev/pts/3
Could not determine local IP address
Connect time 0.1 minutes.
Sent 74 bytes, received 90 bytes.
Connection terminated.
PADT: Generic-Error: session closed
Script /usr/sbin/pppoe -p /var/run/pppoe.conf-adsl.pid.pppoe -I eth0:1 -T 80 -U  -m 1412    finished (pid 11131), status = 0x0

The results from adsl-status:

cirio:/ # adsl-status
adsl-status: Link is down -- could not find interface corresponding to
pppd pid 11174




This is what I have done so far.

I will appriciate any help or sugestions.

Thank you.