• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
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 189.9k 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.
  • D
    dhatz
    last edited by Apr 9, 2012, 12:01 PM

    @xbipin:

    there r many others with the problem but they r either using 1.2.3 or trying to live with 2.0.1 like me.

    Then why aren't any others bidding here to try to get it fixed?

    1 Reply Last reply Reply Quote 0
    • X
      xbipin
      last edited by Apr 9, 2012, 12:16 PM

      coz officially ermal was on this to get it solved but then mayb he realized its not a easy fix by simply patching some php code so this thread went old as i was out of town and got abandoned so most might not have read it also now but if u look at other threads here and there in the complete forum then there r quiet a few ppl suffering the same and it was already discussed many many times but didnt yield any permanent solution.

      after a lot of tracing in the past also it came to light that there was something to do with the isp BRAS or pppoe server or whatever they call it and some security measures but my point is that how do commercial routers overcome this and pfsense or mpd doesnt

      1 Reply Last reply Reply Quote 0
      • W
        w0w
        last edited by May 23, 2012, 2:21 PM

        Looks like I've run into  the same issue, not absolutely the same, but similar and solution for the problem is the same - reboot of pfsense always helps.
        Is there the way to reboot pfsense automatically after XX PPPoE connection retries? I know this is not the best way, but at least it works always for me.

        1 Reply Last reply Reply Quote 0
        • E
          eri--
          last edited by May 23, 2012, 3:40 PM

          not really i backed off just other priorities first.

          Sorry about that.

          1 Reply Last reply Reply Quote 0
          • W
            w0w
            last edited by May 23, 2012, 6:47 PM

            ermal, at least you are monitoring  ::)

            Looks like I've found the solution, that works at least for me
            I've added two lines to the end of ppp-linkdown

            ifconfig em0 down
            ifconfig em0 up

            And looks like reconnection bug is gone.
            P.S. em0 is interface, where PPPoE is
            P.P.S. I think it's related to driver.

            1 Reply Last reply Reply Quote 0
            • X
              xbipin
              last edited by May 24, 2012, 9:02 AM

              @w0w:

              ermal, at least you are monitoring  ::)

              Looks like I've found the solution, that works at least for me
              I've added two lines to the end of ppp-linkdown

              ifconfig em0 down
              ifconfig em0 up

              And looks like reconnection bug is gone.
              P.S. em0 is interface, where PPPoE is
              P.P.S. I think it's related to driver.

              can u mention the location of the file and where exactly did u put those lines, ill give it a try too

              1 Reply Last reply Reply Quote 0
              • E
                eri--
                last edited by May 24, 2012, 10:28 AM

                Certainly that will reset the device by doing up/down.
                Just not a generic solution :)

                1 Reply Last reply Reply Quote 0
                • W
                  w0w
                  last edited by May 24, 2012, 1:38 PM May 24, 2012, 1:30 PM

                  @xbipin:

                  @w0w:

                  ermal, at least you are monitoring  ::)

                  Looks like I've found the solution, that works at least for me
                  I've added two lines to the end of ppp-linkdown

                  ifconfig em0 down
                  ifconfig em0 up

                  And looks like reconnection bug is gone.
                  P.S. em0 is interface, where PPPoE is
                  P.P.S. I think it's related to driver.

                  can u mention the location of the file and where exactly did u put those lines, ill give it a try too

                  usr/local/sbin

                  You can also use Commands-Find File in WinSCP if you have windows

                  
                  #!/bin/sh
                  if [ -f /tmp/$1up ] && [ -f /conf/$1.log ]; then
                          seconds=$((`date -j +%s` - `/usr/bin/stat -f %m /tmp/$1up`))
                          /usr/local/sbin/ppp-log-uptime.sh $seconds $1 &
                  fi
                  if [ "$3" != "" ]; then
                  	echo "Removing states from $3" | logger -t ppp-linkdown
                  	/sbin/pfctl -k 0.0.0.0/0 -k $3/32
                  	/sbin/pfctl -k $3/32
                  	pfctl -K $3/32
                  fi
                  if [ "$4" != "" ]; then
                  	echo "Removing states to $4" | logger -t ppp-linkdown
                  	/sbin/pfctl -b 0.0.0.0/32 -b $4/32
                  
                  	if [ -f "/tmp/${interface}_defaultgw" ]; then
                  		route delete default $4
                  	fi
                  
                  fi
                  # delete the node just in case mpd cannot do that
                  /usr/sbin/ngctl shutdown $1:
                  if [ -f "/var/etc/nameserver_$1" ]; then
                  	# Remove old entries
                  	for nameserver in `cat /var/etc/nameserver_$1`; do
                  		/sbin/route delete $nameserver >/dev/null 2>&1
                  	done
                  	/bin/rm -f /var/etc/nameserver_$1
                  fi
                  # Do not remove gateway used during filter reload.
                  /bin/rm -f /tmp/$1_router
                  /bin/rm -f /tmp/$1up
                  /bin/rm -f /tmp/$1_ip
                  /usr/local/sbin/pfSctl -c 'service reload dns'
                  ifconfig em0 down
                  ifconfig em0 up
                  
                  

                  Do not forget to replace em0 with your own device name.

                  1 Reply Last reply Reply Quote 0
                  • X
                    xbipin
                    last edited by May 24, 2012, 1:48 PM

                    how do we find out the device name?

                    1 Reply Last reply Reply Quote 0
                    • M
                      marcelloc
                      last edited by May 24, 2012, 2:03 PM

                      @xbipin:

                      how do we find out the device name?

                      on status interface, you can see interface name and device.

                      WAN interface (em0)

                      Treinamentos de Elite: http://sys-squad.com

                      Help a community developer! ;D

                      1 Reply Last reply Reply Quote 0
                      • X
                        xbipin
                        last edited by May 24, 2012, 2:07 PM

                        on that it shows this
                        WAN interface (pppoe0)

                        where as im using a alix and my wan port is vr1 so should i use pppoe0 or vr1?

                        1 Reply Last reply Reply Quote 0
                        • W
                          w0w
                          last edited by May 24, 2012, 2:16 PM May 24, 2012, 2:10 PM

                          vr1

                          You need to restart physical (port) interface, not virtual PPPoE, that I've tried to do also, by killing mpd and starting again with no luck

                          xxxx.jpg
                          xxxx.jpg_thumb
                          xxx2.jpg
                          xxx2.jpg_thumb

                          1 Reply Last reply Reply Quote 0
                          • X
                            xbipin
                            last edited by May 24, 2012, 2:15 PM

                            well then i see this

                            CropperCapture[1].jpg
                            CropperCapture[1].jpg_thumb

                            1 Reply Last reply Reply Quote 0
                            • X
                              xbipin
                              last edited by May 24, 2012, 2:20 PM

                              anyways i tried vr1 and rebooted and checked, it fixes the issue partially, meaning, if my isp fiber optic device is switched off and on then pfsense would connect fine once the device is booted which means one issue solved, but there is a reset switch on that isp device and suppose if i press that then once its booted, pfsense wont connect and fall into endless reconnection loop and one easier way to solve this is to pull the wan wire which connects isp device to pfsense and then pfsense reconnects instead of rebooting pfsense

                              1 Reply Last reply Reply Quote 0
                              • X
                                xbipin
                                last edited by May 24, 2012, 2:26 PM

                                yes there was vr1 on it.

                                this means when power is on on the isp device port coz its reset then the solution doesnt work but if its switched off and on or cable unplugged then the port looses power and then once reconnected pppoe reconnects fine.

                                the reason y i try to do the reset scenario coz in a few instances, the isp device gets a firware update and then it reboots, this leaves the power on and then pfsense wont reconnect

                                1 Reply Last reply Reply Quote 0
                                • W
                                  w0w
                                  last edited by May 24, 2012, 2:32 PM

                                  @xbipin:

                                  anyways i tried vr1 and rebooted and checked, it fixes the issue partially, meaning, if my isp fiber optic device is switched off and on then pfsense would connect fine once the device is booted which means one issue solved, but there is a reset switch on that isp device and suppose if i press that then once its booted, pfsense wont connect and fall into endless reconnection loop and one easier way to solve this is to pull the wan wire which connects isp device to pfsense and then pfsense reconnects instead of rebooting pfsense

                                  You can also not to push reset switch on your magic ISP device :) Just power off and on to reset it  8)

                                  Can you show the System and  PPP log, when you have pressed the reset switch and pfsense won't reconnect?

                                  1 Reply Last reply Reply Quote 0
                                  • X
                                    xbipin
                                    last edited by May 24, 2012, 2:38 PM

                                    like i said, i dont need to reset it, but due to a firmware update from isp or even a remotely trigerred reboot from isp causes this, the log is same as here
                                    http://forum.pfsense.org/index.php/topic,41061.msg225631.html#msg225631

                                    1 Reply Last reply Reply Quote 0
                                    • W
                                      w0w
                                      last edited by May 24, 2012, 2:48 PM

                                      I hope that you have restored your original pppoe-linkdown file after playing with
                                      /usr/sbin/ngctl shutdown $1:
                                      and
                                      /usr/local/sbin/pfSctl -c 'interface reload $iface'
                                      that was suggested in november 2011

                                      1 Reply Last reply Reply Quote 0
                                      • W
                                        w0w
                                        last edited by May 24, 2012, 2:56 PM

                                        And I can't see system log anywhere, PPP only

                                        1 Reply Last reply Reply Quote 0
                                        • X
                                          xbipin
                                          last edited by May 24, 2012, 2:58 PM

                                          yes the linkdown file is the standard one without any edits coz those edits didnt help, ill get u the system log now, frankly speaking i have already posted logs so many times that i got tired of doing the same again and again when some1 tries to help

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                            This community forum collects and processes your personal information.
                                            consent.not_received