pfSense Gold Subscription

Author Topic: PPPoE reconenction fix - mpd fix ($100)  (Read 44961 times)

0 Members and 1 Guest are viewing this topic.

Offline xbipin

  • Hero Member
  • *****
  • Posts: 1220
  • Karma: +0/-0
    • View Profile
Re: PPPoE reconenction fix - mpd fix ($100)
« Reply #75 on: November 30, 2011, 10:17:33 am »
take ur time

Offline xbipin

  • Hero Member
  • *****
  • Posts: 1220
  • Karma: +0/-0
    • View Profile
Re: PPPoE reconenction fix - mpd fix ($100)
« Reply #76 on: December 01, 2011, 01:55:19 am »
if adding a switch does make it work along with the patch then i would need to replace my existing switch instead of buying a dedicated one just to make pppoe reconnect in which case can some1 recommend me the cheapest 10/100mbps switch with VLAN support or would it be possible to use one switch without vlan and use 6 ports for LAN and 2 ports for pppoe (1 from pf wan to switch and 1 from isp modem to switch).

im just trying to avoid using a dedicated switch simply for pppoe and even though if there is a power failure, it still wont reconnect untill pfsense is rebooted

or to make things easier, im ready to pay $50 if some1 could simply make me a patch which would detect the unsuccessful pppoe reconnects for about 5mins or so and then reboot pfsense, i have cron package installed and running

Offline ermal

  • Administrator
  • Hero Member
  • *****
  • Posts: 3363
  • Karma: +0/-0
    • View Profile
Re: PPPoE reconenction fix - mpd fix ($100)
« Reply #77 on: December 01, 2011, 08:21:48 am »
I had 30 minutes and came back to this and looking at the code i have another option for you xibpin.
Edit /etc/inc/interfaces.inc

Remove the comment made on line 166 to 177
The diff below maybe explains it better. Not sure why that has been done and try again.
Code: [Select]

diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 3f67e5d..a20936c 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -167,11 +167,11 @@ function interface_netgraph_needed($interface = "wan") {
 PPP interfaces are found above in the previous if ($found == false) block.
 This block of code is only entered for OPTx interfaces that are configured for PPPoE modem access, so $realif != $ppp['if']

+*/
                                if ($realif == $ppp['if']) {
                                        $found = true;
                                        break;
                                }
-*/
                                $ports = explode(',',$ppp['ports']);
                                foreach($ports as $pid => $port){
                                        $port = get_real_interface($port);

Offline xbipin

  • Hero Member
  • *****
  • Posts: 1220
  • Karma: +0/-0
    • View Profile
Re: PPPoE reconenction fix - mpd fix ($100)
« Reply #78 on: December 01, 2011, 08:32:25 am »
how do i upload the edited file, i tried using winscp but i guess there r some commands i need to run to make the system go out of read only mode, could u be kind enough to provide those?

Offline ermal

  • Administrator
  • Hero Member
  • *****
  • Posts: 3363
  • Karma: +0/-0
    • View Profile
Re: PPPoE reconenction fix - mpd fix ($100)
« Reply #79 on: December 01, 2011, 08:39:52 am »
- ssh into the box
- /etc/rc.conf_mount_rw
- Do what you want with WinSCP or use you favorite editor
- /etc/rc.conf_mount_ro
- Reboot.

Offline xbipin

  • Hero Member
  • *****
  • Posts: 1220
  • Karma: +0/-0
    • View Profile
Re: PPPoE reconenction fix - mpd fix ($100)
« Reply #80 on: December 01, 2011, 08:50:49 am »
tried it, still the same, no luck :(

Code: [Select]
Dec 1 18:44:40 ppp: [wan_link0] LCP: no reply to 1 echo request(s)
Dec 1 18:44:50 ppp: [wan_link0] LCP: no reply to 2 echo request(s)
Dec 1 18:45:00 ppp: [wan_link0] LCP: no reply to 3 echo request(s)
Dec 1 18:45:10 ppp: [wan_link0] LCP: no reply to 4 echo request(s)
Dec 1 18:45:20 ppp: [wan_link0] LCP: no reply to 5 echo request(s)
Dec 1 18:45:20 ppp: [wan_link0] LCP: peer not responding to echo requests
Dec 1 18:45:20 ppp: [wan_link0] LCP: state change Opened --> Stopping
Dec 1 18:45:20 ppp: [wan_link0] Link: Leave bundle "wan"
Dec 1 18:45:20 ppp: [wan] Bundle: Status update: up 0 links, total bandwidth 9600 bps
Dec 1 18:45:20 ppp: [wan] IPCP: Close event
Dec 1 18:45:20 ppp: [wan] IPCP: state change Opened --> Closing
Dec 1 18:45:20 ppp: [wan] IPCP: SendTerminateReq #3
Dec 1 18:45:20 ppp: [wan] IPCP: LayerDown
Dec 1 18:45:20 ppp: [wan] IFACE: Down event
Dec 1 18:45:20 ppp: [wan] IPCP: Down event
Dec 1 18:45:20 ppp: [wan] IPCP: LayerFinish
Dec 1 18:45:20 ppp: [wan] Bundle: No NCPs left. Closing links...
Dec 1 18:45:20 ppp: [wan] IPCP: state change Closing --> Initial
Dec 1 18:45:20 ppp: [wan_link0] LCP: SendTerminateReq #2
Dec 1 18:45:20 ppp: [wan_link0] LCP: LayerDown
Dec 1 18:45:22 ppp: [wan_link0] LCP: SendTerminateReq #3
Dec 1 18:45:24 ppp: [wan_link0] LCP: state change Stopping --> Stopped
Dec 1 18:45:24 ppp: [wan_link0] LCP: LayerFinish
Dec 1 18:45:24 ppp: [wan_link0] PPPoE: connection closed
Dec 1 18:45:24 ppp: [wan_link0] Link: DOWN event
Dec 1 18:45:24 ppp: [wan_link0] LCP: Down event
Dec 1 18:45:24 ppp: [wan_link0] LCP: state change Stopped --> Starting
Dec 1 18:45:24 ppp: [wan_link0] LCP: LayerStart
Dec 1 18:45:24 ppp: [wan_link0] Link: reconnection attempt 1 in 1 seconds

Dec 1 18:45:46 ppp: [wan_link0] PPPoE connection timeout after 9 seconds
Dec 1 18:45:46 ppp: [wan_link0] Link: DOWN event
Dec 1 18:45:46 ppp: [wan_link0] LCP: Down event
Dec 1 18:45:46 ppp: [wan_link0] Link: reconnection attempt 3 in 4 seconds
Dec 1 18:45:50 ppp: [wan_link0] Link: reconnection attempt 3
Dec 1 18:45:50 ppp: [wan_link0] PPPoE: Connecting to ''
Dec 1 18:45:59 ppp: [wan_link0] PPPoE connection timeout after 9 seconds
Dec 1 18:45:59 ppp: [wan_link0] Link: DOWN event
Dec 1 18:45:59 ppp: [wan_link0] LCP: Down event
Dec 1 18:45:59 ppp: [wan_link0] Link: reconnection attempt 4 in 1 seconds
Dec 1 18:46:00 ppp: [wan_link0] Link: reconnection attempt 4
Dec 1 18:46:00 ppp: [wan_link0] PPPoE: Connecting to ''
Dec 1 18:46:09 ppp: [wan_link0] PPPoE connection timeout after 9 seconds
Dec 1 18:46:09 ppp: [wan_link0] Link: DOWN event
Dec 1 18:46:09 ppp: [wan_link0] LCP: Down event
Dec 1 18:46:09 ppp: [wan_link0] Link: reconnection attempt 5 in 4 seconds
Dec 1 18:46:13 ppp: [wan_link0] Link: reconnection attempt 5
Dec 1 18:46:13 ppp: [wan_link0] PPPoE: Connecting to ''
Dec 1 18:46:22 ppp: [wan_link0] PPPoE connection timeout after 9 seconds
Dec 1 18:46:22 ppp: [wan_link0] Link: DOWN event
Dec 1 18:46:22 ppp: [wan_link0] LCP: Down event
Dec 1 18:46:22 ppp: [wan_link0] Link: reconnection attempt 6 in 4 seconds
Dec 1 18:46:26 ppp: [wan_link0] Link: reconnection attempt 6
Dec 1 18:46:26 ppp: [wan_link0] PPPoE: Connecting to ''
Dec 1 18:46:35 ppp: [wan_link0] PPPoE connection timeout after 9 seconds
Dec 1 18:46:35 ppp: [wan_link0] Link: DOWN event
Dec 1 18:46:35 ppp: [wan_link0] LCP: Down event
Dec 1 18:46:35 ppp: [wan_link0] Link: reconnection attempt 7 in 1 seconds
Dec 1 18:46:36 ppp: [wan_link0] Link: reconnection attempt 7
Dec 1 18:46:36 ppp: [wan_link0] PPPoE: Connecting to ''

Offline ermal

  • Administrator
  • Hero Member
  • *****
  • Posts: 3363
  • Karma: +0/-0
    • View Profile
Re: PPPoE reconenction fix - mpd fix ($100)
« Reply #81 on: December 01, 2011, 09:31:06 am »
Can you do me a 'ngctl list' when in this situation?

Offline xbipin

  • Hero Member
  • *****
  • Posts: 1220
  • Karma: +0/-0
    • View Profile
Re: PPPoE reconenction fix - mpd fix ($100)
« Reply #82 on: December 01, 2011, 09:47:25 am »
here is the output before and after

when normally connected after reboot
Code: [Select]
$ ngctl list
There are 17 total nodes:
  Name: <unnamed>       Type: socket          ID: 0000001c   Num hooks: 0
  Name: <unnamed>       Type: socket          ID: 0000001b   Num hooks: 0
  Name: <unnamed>       Type: pppoe           ID: 00000011   Num hooks: 2
  Name: <unnamed>       Type: socket          ID: 00000010   Num hooks: 0
  Name: ng0             Type: iface           ID: 0000000d   Num hooks: 1
  Name: mpd10888-wan_link0-lt Type: tee             ID: 0000000f   Num hooks: 2
  Name: vr1             Type: ether           ID: 00000002   Num hooks: 1
  Name: vr2             Type: ether           ID: 00000003   Num hooks: 0
  Name: bridge0         Type: ether           ID: 00000018   Num hooks: 0
  Name: mpd10888-stats  Type: socket          ID: 00000012   Num hooks: 0
  Name: mpd10888-cso    Type: socket          ID: 0000000b   Num hooks: 0
  Name: mpd10888-wan-mss Type: tcpmss          ID: 00000013   Num hooks: 2
  Name: mpd10888-wan    Type: ppp             ID: 0000000e   Num hooks: 3
  Name: mpd10888-eso    Type: socket          ID: 0000000c   Num hooks: 0
  Name: mpd10888-lso    Type: socket          ID: 0000000a   Num hooks: 1
  Name: wlan0           Type: ether           ID: 00000017   Num hooks: 0
  Name: ngctl4052       Type: socket          ID: 00000023   Num hooks: 0

when endless loop of reconenction
Code: [Select]
$ ngctl list
There are 16 total nodes:
  Name: <unnamed>       Type: socket          ID: 0000001c   Num hooks: 0
  Name: <unnamed>       Type: socket          ID: 0000001b   Num hooks: 0
  Name: <unnamed>       Type: pppoe           ID: 00000011   Num hooks: 2
  Name: <unnamed>       Type: socket          ID: 00000010   Num hooks: 0
  Name: ng0             Type: iface           ID: 0000000d   Num hooks: 0
  Name: mpd10888-wan_link0-lt Type: tee             ID: 00000028   Num hooks: 2
  Name: vr1             Type: ether           ID: 00000002   Num hooks: 1
  Name: vr2             Type: ether           ID: 00000003   Num hooks: 0
  Name: ngctl23563      Type: socket          ID: 0000002d   Num hooks: 0
  Name: bridge0         Type: ether           ID: 00000018   Num hooks: 0
  Name: mpd10888-stats  Type: socket          ID: 00000012   Num hooks: 0
  Name: mpd10888-cso    Type: socket          ID: 0000000b   Num hooks: 0
  Name: mpd10888-wan    Type: ppp             ID: 0000000e   Num hooks: 1
  Name: mpd10888-eso    Type: socket          ID: 0000000c   Num hooks: 0
  Name: mpd10888-lso    Type: socket          ID: 0000000a   Num hooks: 2
  Name: wlan0           Type: ether           ID: 00000017   Num hooks: 0

Offline xbipin

  • Hero Member
  • *****
  • Posts: 1220
  • Karma: +0/-0
    • View Profile
Re: PPPoE reconenction fix - mpd fix ($100)
« Reply #83 on: December 04, 2011, 05:08:54 am »
Can you do me a 'ngctl list' when in this situation?

any luck?

Offline xbipin

  • Hero Member
  • *****
  • Posts: 1220
  • Karma: +0/-0
    • View Profile
Re: PPPoE reconenction fix - mpd fix ($100)
« Reply #84 on: April 05, 2012, 01:20:41 am »
still no fix for this

Offline dhatz

  • Hero Member
  • *****
  • Posts: 1002
  • Karma: +0/-0
    • View Profile
Re: PPPoE reconenction fix - mpd fix ($100)
« Reply #85 on: April 06, 2012, 03:54:09 am »
Have your tried pfsense 2.1-DEVEL just in case the latest mpd 5.6 improves things?

Offline xbipin

  • Hero Member
  • *****
  • Posts: 1220
  • Karma: +0/-0
    • View Profile
Re: PPPoE reconenction fix - mpd fix ($100)
« Reply #86 on: April 06, 2012, 04:16:38 am »
havent tried it coz its not much in a usable state currently for light production, mayb later

Offline dhatz

  • Hero Member
  • *****
  • Posts: 1002
  • Karma: +0/-0
    • View Profile
Re: PPPoE reconenction fix - mpd fix ($100)
« Reply #87 on: April 06, 2012, 10:25:07 pm »
Try adding

set bundle no noretry

src: http://unix.derkeiler.com/Mailing-Lists/FreeBSD/questions/2007-09/msg01895.html

Apparently it was also discussed here a couple of years ago:

According to http://mpd.sourceforge.net/doc5/mpd4.html
Quote
Changes since version 4.1rc2:
Bundle's noretry option is enabled by default now.
« Last Edit: April 06, 2012, 10:56:08 pm by dhatz »

Offline xbipin

  • Hero Member
  • *****
  • Posts: 1220
  • Karma: +0/-0
    • View Profile
Re: PPPoE reconenction fix - mpd fix ($100)
« Reply #88 on: April 07, 2012, 01:01:52 am »
i tried to feed that line in using edit file from the web GUI but it seems pfsense seems to remove that entry if rebooted or even if i goto interfaces and click disconnect and then connect

any help regarding some php code change to keep that entry intact?

Offline xbipin

  • Hero Member
  • *****
  • Posts: 1220
  • Karma: +0/-0
    • View Profile
Re: PPPoE reconenction fix - mpd fix ($100)
« Reply #89 on: April 07, 2012, 02:16:10 am »
i managed to edit the interfaces.inc so it adds the line which it does now but i guess mpd ignores it as the system log gives the below message

ppp: mpd_wan.conf:31: Incorrect context for: 'set bundle no noretry'