Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    PPPoE reconenction fix - mpd fix ($100)

    Scheduled Pinned Locked Moved Expired/Withdrawn Bounties
    243 Posts 24 Posters 191.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • X
      xbipin
      last edited by

      where do i put this

      /usr/local/sbin/pfSctl -c interface reload $iface

      1 Reply Last reply Reply Quote 0
      • E
        eri--
        last edited by

        oh on the down script that jim told you.

        1 Reply Last reply Reply Quote 0
        • X
          xbipin
          last edited by

          so i replace the below

          /usr/sbin/ngctl shutdown $1:

          with ur line right?

          1 Reply Last reply Reply Quote 0
          • E
            eri--
            last edited by

            Just add the line and do not touch anything else.
            But since you ask add after that line :)

            1 Reply Last reply Reply Quote 0
            • X
              xbipin
              last edited by

              tried it and has no effect

              1 Reply Last reply Reply Quote 0
              • E
                eri--
                last edited by

                Show the system logs please?

                1 Reply Last reply Reply Quote 0
                • X
                  xbipin
                  last edited by

                  its the same as before but mayb a vr1 down is additional but in all cases it still doesnt reconnect untill a reboot

                  1 Reply Last reply Reply Quote 0
                  • X
                    xbipin
                    last edited by

                    here is the system log when disconnect button is pressed from interfaces (this situation works fine and has been from long)

                    Nov 3 12:14:43 	syslogd: kernel boot file is /boot/kernel/kernel
                    Nov 3 12:15:58 	syslogd: exiting on signal 15
                    Nov 3 12:15:59 	syslogd: kernel boot file is /boot/kernel/kernel
                    Nov 3 12:18:30 	check_reload_status: Configuring interface wan
                    Nov 3 12:18:37 	check_reload_status: Configuring interface wan
                    Nov 3 12:18:37 	check_reload_status: Rewriting resolv.conf
                    Nov 3 12:18:44 	check_reload_status: Configuring interface wan
                    Nov 3 12:18:44 	check_reload_status: Rewriting resolv.conf
                    Nov 3 12:18:46 	php: : rc.newwanip: Failed to update wan IP, restarting...
                    Nov 3 12:18:46 	check_reload_status: Configuring interface wan
                    Nov 3 12:18:46 	apinger: ALARM: WAN(195.229.252.27) *** down ***
                    Nov 3 12:18:51 	check_reload_status: Rewriting resolv.conf
                    Nov 3 12:18:53 	php: : rc.newwanip: Failed to update wan IP, restarting...
                    Nov 3 12:18:56 	check_reload_status: Reloading filter
                    Nov 3 12:18:58 	check_reload_status: Configuring interface wan
                    Nov 3 12:18:58 	check_reload_status: Rewriting resolv.conf
                    Nov 3 12:19:01 	php: : rc.newwanip: Failed to update wan IP, restarting...
                    Nov 3 12:19:01 	check_reload_status: Configuring interface wan
                    Nov 3 12:19:06 	check_reload_status: Rewriting resolv.conf
                    Nov 3 12:19:07 	php: : Could not find gateway for interface(wan).
                    Nov 3 12:19:07 	php: : Could not find gateway for interface(wan).
                    Nov 3 12:19:08 	dnsmasq[3112]: reading /etc/resolv.conf
                    Nov 3 12:19:08 	dnsmasq[3112]: using nameserver 198.153.192.1#53
                    Nov 3 12:19:08 	dnsmasq[3112]: using nameserver 208.67.222.222#53
                    Nov 3 12:19:08 	dnsmasq[3112]: using nameserver 213.42.20.20#53
                    Nov 3 12:19:08 	dnsmasq[3112]: using nameserver 8.8.8.8#53
                    Nov 3 12:19:08 	dnsmasq[3112]: ignoring nameserver 127.0.0.1 - local interface
                    Nov 3 12:19:08 	dnsmasq[3112]: ignoring nameserver 127.0.0.1 - local interface
                    Nov 3 12:19:11 	php: : rc.newwanip: Failed to update wan IP, restarting...
                    Nov 3 12:19:11 	check_reload_status: Configuring interface wan
                    Nov 3 12:19:07 	php: : Could not find gateway for interface(wan).
                    Nov 3 12:19:07 	php: : Could not find gateway for interface(wan).
                    Nov 3 12:19:08 	dnsmasq[3112]: reading /etc/resolv.conf
                    Nov 3 12:19:08 	dnsmasq[3112]: using nameserver 198.153.192.1#53
                    Nov 3 12:19:08 	dnsmasq[3112]: using nameserver 208.67.222.222#53
                    Nov 3 12:19:08 	dnsmasq[3112]: using nameserver 213.42.20.20#53
                    Nov 3 12:19:08 	dnsmasq[3112]: using nameserver 8.8.8.8#53
                    Nov 3 12:19:08 	dnsmasq[3112]: ignoring nameserver 127.0.0.1 - local interface
                    Nov 3 12:19:08 	dnsmasq[3112]: ignoring nameserver 127.0.0.1 - local interface
                    Nov 3 12:19:11 	php: : rc.newwanip: Failed to update wan IP, restarting...
                    Nov 3 12:19:11 	check_reload_status: Configuring interface wan
                    Nov 3 12:19:11 	check_reload_status: Configuring interface wan
                    Nov 3 12:19:17 	check_reload_status: Configuring interface wan
                    Nov 3 12:19:17 	check_reload_status: Rewriting resolv.conf
                    Nov 3 12:19:22 	php: : rc.newwanip: Failed to update wan IP, restarting...
                    Nov 3 12:19:22 	check_reload_status: Configuring interface wan
                    Nov 3 12:19:22 	dnsmasq[3112]: reading /etc/resolv.conf
                    Nov 3 12:19:22 	dnsmasq[3112]: using nameserver 198.153.192.1#53
                    Nov 3 12:19:22 	dnsmasq[3112]: using nameserver 208.67.222.222#53
                    Nov 3 12:19:22 	dnsmasq[3112]: using nameserver 213.42.20.20#53
                    Nov 3 12:19:22 	dnsmasq[3112]: using nameserver 8.8.8.8#53
                    Nov 3 12:19:22 	dnsmasq[3112]: ignoring nameserver 127.0.0.1 - local interface
                    Nov 3 12:19:22 	dnsmasq[3112]: ignoring nameserver 127.0.0.1 - local interface
                    Nov 3 12:19:37 	dnsmasq[3112]: reading /etc/resolv.conf
                    Nov 3 12:19:37 	dnsmasq[3112]: using nameserver 198.153.192.1#53
                    Nov 3 12:19:37 	dnsmasq[3112]: using nameserver 208.67.222.222#53
                    Nov 3 12:19:37 	dnsmasq[3112]: using nameserver 213.42.20.20#53
                    Nov 3 12:19:37 	dnsmasq[3112]: using nameserver 8.8.8.8#53
                    Nov 3 12:19:37 	dnsmasq[3112]: ignoring nameserver 127.0.0.1 - local interface
                    Nov 3 12:19:37 	dnsmasq[3112]: ignoring nameserver 127.0.0.1 - local interface
                    Nov 3 12:19:42 	dnsmasq[3112]: reading /etc/resolv.conf
                    Nov 3 12:19:42 	dnsmasq[3112]: using nameserver 198.153.192.1#53
                    Nov 3 12:19:42 	dnsmasq[3112]: using nameserver 208.67.222.222#53
                    Nov 3 12:19:42 	dnsmasq[3112]: using nameserver 213.42.20.20#53
                    Nov 3 12:19:42 	dnsmasq[3112]: using nameserver 8.8.8.8#53
                    Nov 3 12:19:42 	dnsmasq[3112]: ignoring nameserver 127.0.0.1 - local interface
                    Nov 3 12:19:42 	dnsmasq[3112]: ignoring nameserver 127.0.0.1 - local interface
                    Nov 3 12:19:42 	php: : ROUTING: setting default route to 195.229.252.27
                    Nov 3 12:19:42 	apinger: Exiting on signal 15.
                    Nov 3 12:19:43 	check_reload_status: Reloading filter
                    Nov 3 12:19:43 	apinger: Starting Alarm Pinger, apinger(22415)
                    Nov 3 12:19:43 	php: : DynDns: updatedns() starting
                    Nov 3 12:19:43 	php: : DynDns debug information: 92.96.212.240 extracted from local system.
                    Nov 3 12:19:43 	php: : DynDns: Current WAN IP: 92.96.212.240 Cached IP: 92.99.207.73
                    Nov 3 12:19:43 	php: : DynDns debug information: DynDns: cacheIP != wan_ip. Updating. Cached IP: 92.99.207.73 WAN IP: 92.96.212.240
                    Nov 3 12:19:43 	php: : DynDns: DynDns _update() starting.
                    Nov 3 12:19:44 	php: : DynDns: DynDns _checkStatus() starting.
                    Nov 3 12:19:44 	php: : DynDns: Current Service: dyndns
                    Nov 3 12:19:44 	php: : DynDns debug information: 92.96.212.240 extracted from local system.
                    Nov 3 12:19:45 	php: : phpDynDNS: updating cache file /conf/dyndns_wandyndns'xbipin.dyndns.org'.cache: 92.96.212.240
                    Nov 3 12:19:45 	php: : phpDynDNS: (Success) IP Address Changed Successfully! (92.96.212.240)
                    Nov 3 12:19:51 	php: : Resyncing OpenVPN instances for interface WAN.
                    Nov 3 12:19:51 	php: : The command '/usr/bin/killall 'ntpd'' returned exit code '1', the output was 'killall: warning: kill -TERM 17243: No such process'
                    Nov 3 12:19:51 	php: : OpenNTPD is starting up.
                    Nov 3 12:19:51 	php: : pfSense package system has detected an ip change 92.99.207.73 -> ... Restarting packages.
                    Nov 3 12:19:51 	check_reload_status: Starting packages
                    Nov 3 12:19:58 	php: : Restarting/Starting all packages.
                    Nov 3 12:20:43 	apinger: Error while feeding rrdtool: Broken pipe
                    
                    

                    will give u more logs in some time with the modem reset and cable unplug situation

                    1 Reply Last reply Reply Quote 0
                    • X
                      xbipin
                      last edited by

                      here is the system log with wan cable unplug and replug and the endless loop of pppoe reconnection

                      Nov 3 12:25:13 	syslogd: exiting on signal 15
                      Nov 3 12:25:13 	syslogd: kernel boot file is /boot/kernel/kernel
                      Nov 3 12:25:20 	kernel: vr1: vr_link_task: Tx/Rx shutdown error -- resetting
                      Nov 3 12:25:20 	kernel: vr1: link state changed to DOWN
                      Nov 3 12:25:20 	check_reload_status: Linkup starting vr1
                      Nov 3 12:25:21 	kernel: vr1: restarting
                      Nov 3 12:25:21 	kernel: vr1: vr_stop: Rx shutdown error
                      Nov 3 12:25:21 	kernel: vr1: Using force reset command.
                      Nov 3 12:25:30 	apinger: ALARM: WAN(195.229.252.27) *** down ***
                      Nov 3 12:25:40 	check_reload_status: Reloading filter
                      Nov 3 12:26:26 	check_reload_status: Configuring interface wan
                      Nov 3 12:26:26 	check_reload_status: Rewriting resolv.conf
                      Nov 3 12:26:33 	dnsmasq[3112]: using nameserver 198.153.192.1#53
                      Nov 3 12:26:33 	dnsmasq[3112]: using nameserver 208.67.222.222#53
                      Nov 3 12:26:33 	dnsmasq[3112]: using nameserver 213.42.20.20#53
                      Nov 3 12:26:33 	dnsmasq[3112]: using nameserver 8.8.8.8#53
                      Nov 3 12:26:33 	dnsmasq[3112]: ignoring nameserver 127.0.0.1 - local interface
                      Nov 3 12:26:33 	dnsmasq[3112]: ignoring nameserver 127.0.0.1 - local interface
                      Nov 3 12:27:19 	check_reload_status: Linkup starting vr1
                      Nov 3 12:27:19 	kernel: vr1: link state changed to UP
                      
                      

                      after rebooting pfsense only connection is successful

                      1 Reply Last reply Reply Quote 0
                      • X
                        xbipin
                        last edited by

                        i reported the same to freebsd mailing list as well as the mpd bug list but there is no outcome, mpd developer blames pfsense for it and the mailing list just recommended some settings which didnt work and ppl left the topic down the list and forgot about it

                        1 Reply Last reply Reply Quote 0
                        • C
                          clarknova
                          last edited by

                          @jimp:

                          Failing that, give this a try: Edit usr/local/sbin/ppp-linkdown and comment out or remove this line (keep an unaltered copy around though so you can restore the copy if it doesn't help)

                          /usr/sbin/ngctl shutdown $1:
                          

                          This worked for me! Sorry it took this long for me to be able to test this.

                          It appears that the change to that file did survive a reboot, but will it survive an upgrade (can I just say I'm so happy that 2.0 is final)? Better yet, here's to hoping this can be fixed for 2.1.

                          db

                          1 Reply Last reply Reply Quote 0
                          • X
                            xbipin
                            last edited by

                            @clarknova:

                            @jimp:

                            Failing that, give this a try: Edit usr/local/sbin/ppp-linkdown and comment out or remove this line (keep an unaltered copy around though so you can restore the copy if it doesn't help)

                            /usr/sbin/ngctl shutdown $1:
                            

                            This worked for me! Sorry it took this long for me to be able to test this.

                            It appears that the change to that file did survive a reboot, but will it survive an upgrade (can I just say I'm so happy that 2.0 is final)? Better yet, here's to hoping this can be fixed for 2.1.

                            doesnt still work for me, while ur at it, can u test without using a switch between pfsense and ur isp modem etc?

                            1 Reply Last reply Reply Quote 0
                            • C
                              clarknova
                              last edited by

                              I can try that but I can't make any guarantee about timeline, as this is a production system.

                              db

                              1 Reply Last reply Reply Quote 0
                              • X
                                xbipin
                                last edited by

                                take ur time

                                1 Reply Last reply Reply Quote 0
                                • X
                                  xbipin
                                  last edited by

                                  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

                                  1 Reply Last reply Reply Quote 0
                                  • E
                                    eri--
                                    last edited by

                                    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.

                                    
                                    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);
                                    
                                    
                                    1 Reply Last reply Reply Quote 0
                                    • X
                                      xbipin
                                      last edited by

                                      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?

                                      1 Reply Last reply Reply Quote 0
                                      • E
                                        eri--
                                        last edited by

                                        • 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.
                                        1 Reply Last reply Reply Quote 0
                                        • X
                                          xbipin
                                          last edited by

                                          tried it, still the same, no luck :(

                                          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 ''
                                          
                                          1 Reply Last reply Reply Quote 0
                                          • E
                                            eri--
                                            last edited by

                                            Can you do me a 'ngctl list' when in this situation?

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.