OpenWrt Forum Archive

Topic: PPPoE server?

The content of this topic has been archived on 24 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

hi everybody.
im trying to setup a PPPoE server on openwrt with rp-pppoe package.
ive installled packages from http://pjf.asn.pl/openwrt/ipkg/ , found in this topic http://forum.openwrt.org/viewtopic.php?id=434.
ive not compiled pppoe support in kernel, but im using kmod-pppoe package (this should work, dont?).

im using whiterussian rc4 on a linksys WRT54GS v1.0
this is how i start pppoe-server:
/usr/sbin/pppoe-server -I br0 -T 60 -N 10 -C OpenWrt -S OpenWrt -R 192.168.100.10 -L 192.168.100.1

the pppoe-server-options:
root@OpenWrt:/etc/ppp# less pppoe-server-options
# PPP options for the PPPoE server
# LIC: GPL
require-pap
debug
auth
mru 1480
mtu 1480
lcp-echo-interval 30
lcp-echo-failure 4
ms-dns 192.168.11.1
#plugin radius.so
#plugin radattr.so


br0 is up without ip address:
root@OpenWrt:/etc/ppp# ifconfig br0
br0       Link encap:Ethernet  HWaddr 00:0F:66:95:4D:F0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:515 errors:0 dropped:0 overruns:0 frame:0
          TX packets:116 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:90636 (88.5 KiB)  TX bytes:4789 (4.6 KiB)

and br0 is:
root@OpenWrt:/etc/ppp# brctl show
bridge name     bridge id               STP enabled     interfaces
br0             8000.000f66954df0       yes             vlan0
                                                                            eth1

the problem: the connection always times out. this is logread output:

root@OpenWrt:/etc/ppp# logread
Jan  4 16:53:54 (none) kern.debug pppd[1093]: using channel 11
Jan  4 16:53:54 (none) user.notice using channel 11
Jan  4 16:53:54 (none) user.notice
Jan  4 16:53:54 (none) kern.info pppd[1093]: Using interface ppp0
Jan  4 16:53:54 (none) user.notice Using interface ppp0
Jan  4 16:53:54 (none) user.notice
Jan  4 16:53:54 (none) kern.notice pppd[1093]: Connect: ppp0 <--> /dev/pts/3
Jan  4 16:53:54 (none) kern.notice Connect: ppp0 -> /dev/pts/3
Jan  4 16:53:54 (none) user.notice
Jan  4 16:53:54 (none) kern.debug pppd[1093]: Waiting for 2 child processes...
Jan  4 16:53:54 (none) user.notice Waiting for 2 child processes...
Jan  4 16:53:54 (none) user.notice
Jan  4 16:53:54 (none) kern.debug pppd[1093]:   script /usr/sbin/pppoe -n -I br0 -e 2:00:e0:4c:e1:48:58OpenWrt -S ' -T 60', pid 1108
Jan  4 16:53:54 (none) user.notice   script /usr/sbin/pppoe -n -I br0 -e 2:00:e0:4c:e1:48:58OpenWrt -S ' -T 60', pid 1108
Jan  4 16:53:54 (none) user.notice
Jan  4 16:53:54 (none) kern.debug pppd[1093]:   script /usr/sbin/pppoe -n -I br0 -e 2:00:e0:4c:e1:48:58OpenWrt -S ' -T 60', pid 1094
Jan  4 16:53:54 (none) user.notice   script /usr/sbin/pppoe -n -I br0 -e 2:00:e0:4c:e1:48:58OpenWrt -S ' -T 60', pid 1094
Jan  4 16:53:54 (none) user.notice
Jan  4 16:53:55 (none) kern.debug pppd[1093]: sent [LCP ConfReq id=0x2 <mru 1480> <auth pap> <magic 0x8c697772>]
Jan  4 16:53:55 (none) kern.debug sent [LCP ConfReq id=0x2 ru 1480> <auth pap> <magic 0x8c697772>]
Jan  4 16:53:55 (none) user.notice
Jan  4 16:53:58 (none) kern.debug pppd[1093]: sent [LCP ConfReq id=0x2 <mru 1480> <auth pap> <magic 0x8c697772>]
Jan  4 16:53:58 (none) kern.debug sent [LCP ConfReq id=0x2 ru 1480> <auth pap> <magic 0x8c697772>]
Jan  4 16:53:58 (none) user.notice
Jan  4 16:53:59 (none) kern.debug pppd[1093]: sending SIGTERM to process 1108
Jan  4 16:53:59 (none) user.notice sending SIGTERM to process 1108
Jan  4 16:53:59 (none) user.notice
Jan  4 16:53:59 (none) kern.debug pppd[1093]: sending SIGTERM to process 1094
Jan  4 16:53:59 (none) user.notice sending SIGTERM to process 1094
Jan  4 16:53:59 (none) user.notice
Jan  4 16:53:59 (none) kern.warn pppd[1093]: tcflush failed: Bad file descriptor
Jan  4 16:53:59 (none) user.notice tcflush failed: Bad file descriptor
Jan  4 16:53:59 (none) user.notice
Jan  4 16:53:59 (none) kern.info pppd[1093]: Exit.
Jan  4 16:53:59 (none) kern.info pppoe-server[1044]: Session 2 closed for client 00:e0:4c:e1:48:58 (192.168.100.11) on br0
Jan  4 16:53:59 (none) kern.info pppoe-server[1044]: Sent PADT
Jan  4 16:53:59 (none) kern.info pppoe-server[1044]: Sent PADT
Jan  4 16:53:59 (none) user.notice pppoe:
Jan  4 16:53:59 (none) user.notice read (asyncReadFromPPP): Session 2: Input/output error
Jan  4 16:53:59 (none) user.notice
Jan  4 16:53:59 (none) kern.err pppoe[1109]: read (asyncReadFromPPP): Session 2: Input/output error
Jan  4 16:53:59 (none) user.notice pppoe:
Jan  4 16:53:59 (none) user.notice read (asyncReadFromPPP): Session 2: Input/output error
Jan  4 16:53:59 (none) user.notice
Jan  4 16:53:59 (none) kern.err pppoe[1101]: read (asyncReadFromPPP): Session 2: Input/output error


and tcpdump:

root@OpenWrt:~# tcpdump -i br0
tcpdump: WARNING: br0: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on br0, link-type EN10MB (Ethernet), capture size 96 bytes

16:53:23.491020 PPPoE PADI [Service-Name] [Host-Uniq 0x0400000007000000] [EOL]
16:53:23.491656 PPPoE PADO [AC-Name "OpenWrt"] [Service-Name "OpenWrt"] [AC-Cookie 0x6495321B50B711C0CE64A6936167C2F614040000] [Host-Uniq 0x0400000007000000]
16:53:23.492012 PPPoE PADR [Service-Name "OpenWrt"] [Host-Uniq 0x0400000008000000] [AC-Cookie 0x6495321B50B711C0CE64A6936167C2F614040000]
16:53:23.498059 PPPoE PADS [ses 0x2] [Service-Name "OpenWrt"] [Host-Uniq 0x0400000008000000]
16:53:23.523423 PPPoE  [ses 0x2] LCP, Conf-Request (0x01), id 0, MRU  1480, Magic-Num  0x2a455f16, Call-Back  CBCP, length 17
16:53:24.624576 PPPoE  [ses 0x2] LCP, Conf-Request (0x01), id 1, MRU  1480, Auth-Prot  PAP, Magic-Num  0x42f78232, length 18
16:53:24.627431 PPPoE  [ses 0x2] LCP, Conf-Ack (0x02), id 1, MRU  1480, Auth-Prot  PAP, Magic-Num  0x42f78232, length 18
16:53:24.633758 7d:22:7d:21:7d:20 > 7e:ff:7d:23:c0:21, ethertype Unknown (0x7d32), length 38:
        0x0000:  7d21 7d24 7d25 c87d 237d 24c0 237d 257d  }!}$}%.}#}$.#}%}
        0x0010:  2642 f782 32a5 6d7e                      &B..2.m~
16:53:25.518035 PPPoE  [ses 0x2] LCP, Conf-Request (0x01), id 1, MRU  1480, Magic-Num  0x2a455f16, Call-Back  CBCP, length 17
16:53:25.522637 7d:21:7d:21:7d:20 > 7e:ff:7d:23:c0:21, ethertype Unknown (0x7d31), length 40:
        0x0000:  7d21 7d24 7d25 c87d 257d 262a 455f 7d36  }!}$}%.}%}&*E_}6
        0x0010:  7d2d 7d23 7d26 7d5e 3b7e                 }-}#}&}^;~
16:53:27.632934 PPPoE  [ses 0x2] LCP, Conf-Request (0x01), id 1, MRU  1480, Auth-Prot  PAP, Magic-Num  0x42f78232, length 18
16:53:27.643149 PPPoE  [ses 0x2] LCP, Conf-Ack (0x02), id 1, MRU  1480, Auth-Prot  PAP, Magic-Num  0x42f78232, length 18
16:53:27.647605 7d:22:7d:21:7d:20 > 7e:ff:7d:23:c0:21, ethertype Unknown (0x7d32), length 38:
        0x0000:  7d21 7d24 7d25 c87d 237d 24c0 237d 257d  }!}$}%.}#}$.#}%}
        0x0010:  2642 f782 32a5 6d7e                      &B..2.m~

repeat the last messages a lot of times...and then...

16:53:59.858301 PPPoE PADT [ses 0x2] [Generic-Error "RP-PPPoE: Child pppd process terminated"]
16:53:59.858669 PPPoE PADT [ses 0x2] [EOL]
16:53:59.859606 PPPoE PADT [ses 0x2] [Generic-Error "Received PADT"]

i really have no idea what is happening, ive searched about "ethertype Unknown (0x7d3[12])", which is the only problem that i can guess, but i have found nothing.
shoul i try with "kernel mode" pppoe support?
ive the same config (with radius support enabled) working ok in a debian sarge.

thanks in advance.


Roberto

hi if you still online on this board . please advice me .

i set up pppoe-server on link wrt54gl openwrt whiterussian.

i can run  usr/sbin/pppoe-server -I br0 -T 60 -N 10 -C OpenWrt -S OpenWrt -R 192.168.100.10 -L 192.168.100.1

but when i dialup the logread show

Jan  1 00:32:40 (none) kern.info pppoe-server[1060]: Session 1 created for client 00:1b:24:47:58:de on br0 using Service-Name ''
Jan  1 00:32:40 (none) kern.err pppd[1060]: pppd is unable to open the /dev/ppp device. You need to create the /dev/ppp device node by executing the following command as root: ^Imknod /dev/ppp c 108 0
Jan  1 00:32:40 (none) kern.info pppoe-server[1041]: Session 1 closed for client 00:1b:24:47:58:de (192.168.182.1) on br0
Jan  1 00:32:40 (none) kern.info pppoe-server[1041]: Sent PADT
Jan  1 00:32:40 (none) kern.info pppoe-server[1041]: Sent PADT

but when i try  mknod /dev/ppp c 108 0

logread show

Jan  1 00:33:08 (none) kern.info pppoe-server[1041]: Session 2 closed for client 00:1b:24:47:58:de (192.168.182.2) on br0
Jan  1 00:33:08 (none) kern.info pppoe-server[1041]: Sent PADT
Jan  1 00:33:08 (none) kern.info pppoe-server[1041]: Sent PADT
Jan  1 00:34:09 (none) kern.info pppoe-server[1063]: Session 3 created for client 00:1b:24:47:58:de on br0 using Service-Name ''
Jan  1 00:34:09 (none) kern.err pppd[1063]: This system lacks kernel support for PPP.  This could be because the PPP kernel module could not be loaded, or because PPP was not included in the kernel configuration.  If PPP was included as a module, try `/sbin/modprobe -v ppp'.  If that fails, check that ppp.o exists in /lib/modules/`uname -r`/net. See README.linux file in the ppp distribution for more details.

it 's ask for ppp.o where is it?

how can i set up it.

on README.linux said

2.3 System setup for 2.4 kernels

Under the 2.4 series kernels, pppd needs to be able to open /dev/ppp,
character device (108,0).  If you are using devfs (the device
filesystem), the /dev/ppp node will automagically appear when the
ppp_generic module is loaded, or at startup if ppp_generic is compiled
in.

If you have ppp_generic as a module, and you are using devfsd (the
devfs daemon), you will need to add a line like this to your
/etc/devfsd.conf:

LOOKUP        ppp        MODLOAD

Otherwise you will need to create a /dev/ppp device node with the
commands:

# mknod /dev/ppp c 108 0
# chmod 600 /dev/ppp

If you use module autoloading and have PPP as a module, you will need
to add the following to your /etc/modules.conf or /etc/conf.modules:

alias /dev/ppp        ppp_generic
alias char-major-108    ppp_generic
alias tty-ldisc-3    ppp_async
alias tty-ldisc-14    ppp_synctty
alias ppp-compress-21    bsd_comp
alias ppp-compress-24    ppp_deflate
alias ppp-compress-26    ppp_deflate

i try that but still logread the same

Can anyone advice me?

The discussion might have continued from here.