OpenWrt Forum Archive

Topic: pppoe servicename problems with TL-WR1043ND

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

Hello,
I have problem connecting pppoe with servicename on my tp-link 1043
using backfire 10.03.1-rc* and with snapshot trunk too
with stock tp-link firmware and with dd-wrt no problems
here is some logs from router and configuration:

System Log from router:
Mar 29 03:01:02 OpenWrt daemon.notice pppd[4076]: pppd 2.4.4 started by root, uid 0
Mar 29 03:01:02 OpenWrt daemon.err pppd[4076]: Interface eth0.2 has MTU of 1492 -- should be 1500.  You may have serious connection problems.
Mar 29 03:01:03 OpenWrt user.notice ifup: Enabling Router Solicitations on lan (br-lan)
Mar 29 03:01:04 OpenWrt user.notice rdate: No usable time server for lan found
Mar 29 03:01:06 OpenWrt user.info firewall: adding lan (br-lan) to zone lan
Mar 29 03:01:17 OpenWrt daemon.warn pppd[4076]: Timeout waiting for PADO packets
Mar 29 03:01:17 OpenWrt daemon.err pppd[4076]: Unable to complete PPPoE Discovery
Mar 29 03:01:47 OpenWrt daemon.err pppd[4076]: Interface eth0.2 has MTU of 1492 -- should be 1500.  You may have serious connection problems.
Mar 29 03:02:02 OpenWrt daemon.warn pppd[4076]: Timeout waiting for PADO packets
Mar 29 03:02:02 OpenWrt daemon.err pppd[4076]: Unable to complete PPPoE Discovery


root@OpenWrt:~# cat /etc/config/network

config 'interface' 'loopback'
        option 'ifname' 'lo'
        option 'proto' 'static'
        option 'ipaddr' '127.0.0.1'
        option 'netmask' '255.0.0.0'

config 'interface' 'lan'
        option 'ifname' 'eth0.1'
        option 'type' 'bridge'
        option 'proto' 'static'
        option 'netmask' '255.255.255.0'
        option 'ipaddr' '192.168.2.2'

config 'interface' 'wan'
        option 'ifname' 'eth0.2'
        option 'mtu' '1492'
        option 'proto' 'pppoe'
        option 'username' 'myusername'
        option 'password' 'mypassword'
        option 'pppd_options' 'rp_pppoe_service lan1'

config 'switch'
        option 'name' 'rtl8366rb'
        option 'reset' '1'
        option 'enable_vlan' '1'

config 'switch_vlan'
        option 'device' 'rtl8366rb'
        option 'vlan' '1'
        option 'ports' '1 2 3 4 5t'

config 'switch_vlan'
        option 'device' 'rtl8366rb'
        option 'vlan' '2'
        option 'ports' '0 5t'


and output from this i saw here in forum searching posts similar my problem

root@OpenWrt:~# echo $(sed -nep /proc/$(head -n1 /var/run/ppp-pppoe-wan.pid)/cmdline)
/usr/sbin/pppd plugin rp-pppoe.so mtu 1492 mru 1492 nic-eth0.2 persist usepeerdns defaultroute replacedefaultroute user myusername password mypassword ipparam wan ifname pppoe-wan rp_pppoe_service lan1 nodetach

unfortunately cannot post configs and logs form dd-wrt right now

Add "option keepalive 3" to config interface wan.

added - no change at all,
also tested increasing +1 to 10 - log output is the same and no connection

How about running "ifup wan"?

no change after ifup wan

but i take the router and go to other isp and managed to get log from their AC,
here go interesting part
seems that openwrt/tp-link not sending service name at all?!

here is the log:
Apr 30 14:17:28 r1 daemon.info pppoe-server[20940]: Session 453 created for client 54:xx:xx:xx:xx:xx  on eth0.12 using Service-Name ''
Apr 30 14:17:28 r1 local2.info pppd[20940]: Plugin radius.so loaded.
Apr 30 14:17:28 r1 local2.info pppd[20940]: RADIUS plugin initialized.
Apr 30 14:17:28 r1 local2.info pppd[20940]: Plugin radattr.so loaded.
Apr 30 14:17:28 r1 local2.info pppd[20940]: RADATTR plugin initialized.
Apr 30 14:17:28 r1 local2.info pppd[20940]: Plugin rp-pppoe.so loaded.
Apr 30 14:17:28 r1 local2.info pppd[20940]: Plugin rp-pppoe.so loaded.
Apr 30 14:17:28 r1 local2.notice pppd[20940]: pppd 2.4.4 started by root, uid 0
Apr 30 14:17:28 r1 local2.info pppd[20940]: Using interface ppp218
Apr 30 14:17:28 r1 local2.notice pppd[20940]: Connect: ppp218 <--> eth0.12
Apr 30 14:17:28 r1 daemon.info pppoe-server[20940]: Session 453 created for client 54:xx:xx:xx:xx:xx  on eth0.12 using Service-Name ''
Apr 30 14:17:28 r1 local2.info pppd[20940]: Plugin radius.so loaded.
Apr 30 14:17:28 r1 local2.info pppd[20940]: RADIUS plugin initialized.
Apr 30 14:17:28 r1 local2.info pppd[20940]: Plugin radattr.so loaded.
Apr 30 14:17:28 r1 local2.info pppd[20940]: RADATTR plugin initialized.
Apr 30 14:17:28 r1 local2.info pppd[20940]: Plugin rp-pppoe.so loaded.
Apr 30 14:17:28 r1 local2.info pppd[20940]: Plugin rp-pppoe.so loaded.
Apr 30 14:17:28 r1 local2.notice pppd[20940]: pppd 2.4.4 started by root, uid 0
Apr 30 14:17:28 r1 local2.info pppd[20940]: Using interface ppp218
Apr 30 14:17:28 r1 local2.notice pppd[20940]: Connect: ppp218 <--> eth0.12
Apr 30 14:17:33 r1 local2.warn pppd[20940]: PAP peer authentication failed for myusername
Apr 30 14:17:33 r1 local2.notice pppd[20940]: Connection terminated.
Apr 30 14:17:33 r1 local2.info pppd[20940]: Exit.
Apr 30 14:17:33 r1 daemon.info pppoe-server[2839]: Session 453 closed for client 54:xx:xx:xx:xx:xx  on eth0.12


update: i talk with my isp, and he told be that their servicename are not discoveryble but are present.
as i said in my first post, router connects with other firmware with servicename...

(Last edited by akebono on 30 Apr 2011, 12:37)

Does anyone have a solution to this problem?

Did they tell you the required service name?

For example if the servicename is "ISP" you could add this to your wan config:

option pppd_options 'rp_pppoe_service ISP'

Edit:
Scratch that, noticed just now that you already set it.
However, your other log uses "eth0.12" - could it be that your ISP pppoe dialin is on a specific tagged vlan?
If yes you should make your wan vlan 12 instead of 2 and set it to tagged as well.

this log is from other AC, and no, that eth0.12 is not tagged vlan.
this is just example from ac that openwrt not sending servicname.

Ah, I got it. I can investigate later whether there is something wrong with the service name option.

some progress here? i'v tried and other ppp option with no joy...

option 'pppd_options' 'rp_pppoe_ac lan1 rp_pppoe_service lan1'

the logs and results are the same as previous

I found the bug. Apparently "pppd" stops processing plugin arguments after the "nic-*" parameter so the service and ac name options are never initialized.
As a quick workaround you can try this:

root@bridge5:~# diff -u /rom/lib/network/pppoe.sh  /lib/network/pppoe.sh 
--- /rom/lib/network/pppoe.sh    Sat Apr  9 20:38:08 2011
+++ /lib/network/pppoe.sh    Thu May  5 21:16:28 2011
@@ -10,10 +10,12 @@
         /sbin/insmod $module 2>&- >&-
     done
 
+    config_get opt "$config" pppd_options
     config_get mtu "$config" mtu
     mtu=${mtu:-1492}
     start_pppd "$config" \
         plugin rp-pppoe.so \
         mtu $mtu mru $mtu \
+        $opt \
         "nic-$iface"
 }
root@bridge5:~#

I'll develop a proper pppd patch soon.

Perfect, its wirking!

Mar 29 13:23:52 OpenWrt daemon.info pppd[2075]: Plugin rp-pppoe.so loaded.
Mar 29 13:23:52 OpenWrt daemon.notice pppd[2075]: pppd 2.4.4 started by root, uid 0
Mar 29 13:23:52 OpenWrt daemon.err pppd[2075]: Interface eth0.2 has MTU of 1492 -- should be 1500.  You may have serious connection problems.
Mar 29 13:23:52 OpenWrt daemon.info pppd[2075]: PPP session is 34557
Mar 29 13:23:52 OpenWrt daemon.info pppd[2075]: Using interface pppoe-wan
Mar 29 13:23:52 OpenWrt daemon.notice pppd[2075]: Connect: pppoe-wan <--> eth0.2
Mar 29 13:23:53 OpenWrt user.notice ifup: Enabling Router Solicitations on lan (br-lan)
Mar 29 13:23:54 OpenWrt user.notice rdate: No usable time server for lan found
Mar 29 13:23:54 OpenWrt user.info firewall: adding lan (br-lan) to zone lan
Mar 29 13:23:56 OpenWrt daemon.info pppd[2075]: CHAP authentication succeeded: Welcome!!
Mar 29 13:23:56 OpenWrt daemon.notice pppd[2075]: CHAP authentication succeeded
Mar 29 13:23:56 OpenWrt daemon.notice pppd[2075]: peer from calling number xx:xx:xx:xx:4C:83 authorized
Mar 29 13:23:56 OpenWrt daemon.notice pppd[2075]: local  IP address aa.bb.175.235
Mar 29 13:23:56 OpenWrt daemon.notice pppd[2075]: remote IP address cc.ddd.eee.35
Mar 29 13:23:56 OpenWrt daemon.notice pppd[2075]: primary   DNS address cc.ddd.eee.34
Mar 29 13:23:56 OpenWrt daemon.notice pppd[2075]: secondary DNS address aaa.bb.c.98
Mar 29 13:23:56 OpenWrt user.notice ifup: Enabling Router Solicitations on wan (pppoe-wan)
Mar 29 13:23:57 OpenWrt user.info firewall: adding lan (br-lan) to zone lan
Mar 29 13:23:57 OpenWrt user.info firewall: adding wan (pppoe-wan) to zone wan
May  6 05:29:45 OpenWrt user.notice rdate: Synced with ptbtime1.ptb.de
May  6 05:29:45 OpenWrt daemon.info pppd[2075]: System time change detected.

Thank you!

Installed Backfire 10.03.1-rc5, met this bug. Thank you for workaround, it really helped! Will this be fixed in 10.03.1-rc6?

I am having a related but slightly different problem.  I have a very long service name (about 60 chars)  that can vary depending on  what options the user choses. I modifed pppoe.sh to create that service name and then pass it to start_pppd as one of the arguments. However pppd doesn't seem to start negotiations with that method.  I also tried to use the service name directly within /lib/network/ppp.sh as a parameter in the pppd command and same result.

The funny thing was that the pppd command line (in /proc/process_pid/cmdline ) seemed perfectly fine.  Also when the pppd command was run directly from a shell with all those service parameters it ran perfectly well !
It also runs fine if the service name is written into /etc/ppp/options.  However since the service name can vary depending on user choice  - writing that into the options file every time is not appropriate.

In summary - pppd when called in a normal command line shell with all the pppoe service parameters runs fine  - but fails when it is run via the script in /lib/network/ppp.sh   

Is there some limitation with command line lengths in a script which doesn't exist in normal shell ?

Hi,

Someone might find useful go over the UI under Interfaces and chose PPPoE option ...

https://s24.postimg.org/d9lf3gez9/Screenshot+-+13-04-2016+-+12:05:58.png

(Last edited by diogo on 16 Apr 2016, 01:51)

The discussion might have continued from here.