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

    Quagga OSPF not redistributing static routes

    Scheduled Pinned Locked Moved Routing and Multi WAN
    8 Posts 2 Posters 9.1k 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.
    • A
      awesomo
      last edited by

      I was having an issue with openospfd not forming neighbor relationships after the link went down. Quagga does not have this issue, but I also can not get quagga to redistribute static routes. This would be because quagga recognizes the routes I enter on the routing page in pfsense as kernel routes, not static routes. Any solutions to this?

      1 Reply Last reply Reply Quote 0
      • A
        awesomo
        last edited by

        I fixed it. I changed:

        if ($ospfd_conf['redistributestatic'])
                               $conffile .= "  redistribute static\n";

        To

        if ($ospfd_conf['redistributestatic'])
                               $conffile .= "  redistribute kernel\n";

        in /usr/local/pkg/quagga_ospfd.inc

        Anybody know how I can submit this to be changed? Redistribute Static does nothing with this package on pfSense. Does anyone know if there are any downsides to redistributing the kernel routes?

        1 Reply Last reply Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          Not sure what the difference is there. I'm the maintainer of that package but I'm still learning quagga myself.

          Just guessing but if you look at the output of "netstat -rn", static routes are routes with the S flag, and kernel might redistribute all routes in the table rather than only static routes.

          Some posts such as http://www.gossamer-threads.com/lists/quagga/users/21337 make me wonder if using 'kernel' there is the best solution either.

          Perhaps that needs a bit of smarts to instead make a list of networks from the config's static routes, rather than using the quagga keyword (so the same as adding them in the redistribute networks list at the bottom)

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          • A
            awesomo
            last edited by

            They do show with an S flag when you run netstat-rn, It threw me for a few minutes but then I noticed the Zebra routes showed all my static routes with a K. I actually stumbled across that same thread and came to the same conclusion, it works but is it really the best way? I was just having so many problems with OpenOSPFd not recovering neighbor relationships I had to get this working.

            Side note: I ran into a few issues running Quagga on the nanobsd 2.0.1 image after cold boot when power was lost. It would complain about the quagga and zebra pid's being locked and then it would never form neighbor relationships. I added a kill for both pids and threw a wait for 60 seconds after that in the start script, that seemed to fix it. Another thing that wasn't a very elegant solution, but it got the job done. I'd be willing to dig into these few issues deeper for more elegant solutions, I just need to know where I should start looking. There wasn't much documentation on quagga concerning these issues.

            1 Reply Last reply Reply Quote 0
            • jimpJ
              jimp Rebel Alliance Developer Netgate
              last edited by

              @awesomo:

              They do show with an S flag when you run netstat-rn, It threw me for a few minutes but then I noticed the Zebra routes showed all my static routes with a K. I actually stumbled across that same thread and came to the same conclusion, it works but is it really the best way? I was just having so many problems with OpenOSPFd not recovering neighbor relationships I had to get this working.

              Interesting. I wonder if the S is only for static routes configured inside of zebra and the K is for routes pulled from the OS. If that's the case, kernel routes may be the only good way to do it.

              @awesomo:

              Side note: I ran into a few issues running Quagga on the nanobsd 2.0.1 image after cold boot when power was lost. It would complain about the quagga and zebra pid's being locked and then it would never form neighbor relationships. I added a kill for both pids and threw a wait for 60 seconds after that in the start script, that seemed to fix it. Another thing that wasn't a very elegant solution, but it got the job done. I'd be willing to dig into these few issues deeper for more elegant solutions, I just need to know where I should start looking. There wasn't much documentation on quagga concerning these issues.

              If you try it again, let me know the exact error messages and when you saw them. Or if you can share the changes you made I can look at them also. I haven't yet tried to run quagga on NanoBSD, only full installs (the customers I've used it with have almost all been using it in Datacenters with CARP clusters, not exactly NanoBSD territory). I have an ALIX but it's being used for debugging a different issue at the moment.

              Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

              1 Reply Last reply Reply Quote 0
              • A
                awesomo
                last edited by

                I will be picking up another netgate m1n1wall next week. I'll post back when I get it all setup.

                1 Reply Last reply Reply Quote 0
                • jimpJ
                  jimp Rebel Alliance Developer Netgate
                  last edited by

                  I did check in a fix for the pid issue last week, so that may be OK now.

                  Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                  Need help fast? Netgate Global Support!

                  Do not Chat/PM for help!

                  1 Reply Last reply Reply Quote 0
                  • A
                    awesomo
                    last edited by

                    I totally forgot about this thread, sorry. I updated Quagga to the newest pfSense package available (just today) and gave it a try. The PID fix did not work. Upon a cold boot it spams my log with:
                    Jul 17 18:52:08 zebra[39656]: Zebra 0.99.20.1 starting: vty@2601
                    Jul 17 18:52:08 zebra[39656]: Zebra 0.99.20.1 starting: vty@2601
                    Jul 17 18:52:08 ospfd[40230]: OSPFd 0.99.20.1 starting: vty@2604
                    Jul 17 18:52:08 ospfd[40230]: OSPFd 0.99.20.1 starting: vty@2604

                    About 10 times over, then Quagga does not form any neighbor relationships until I restart it manually.

                    Another bug that seems to have been introduced is when the internet goes down for a few minutes and the neighbor relationship is lost, it never regains it again. I tried a few separate times to no avail. As soon as I made the few changes below, I have been throwing everything I have at it. Power failure, internet failure, and interface failure all for varying amounts of time. The relationship came up every time.

                    I had to remove a few lines and add a few. The sleep 60 may be unnecessary, but I didn't want Quagga coming up before my OpenVPN tunnel which it seemed to do sometimes if the sleep 60 wasn't in there.

                    
                        246         // Create rc.d file
                        247         $rc_file_stop = <<<eof<br>248
                        249         kill -9 `cat /var/run/quagga/zebra.pid`
                        250         kill -9 `cat /var/run/quagga/ospfd.pid`
                        251
                        252 EOF;
                        253         $rc_file_start = <<<eof<br>254 kill -9 'cat /var/run/quagga/zebra.pid'
                        255 kill -9 'cat /var/run/quagga/ospfd.pid'
                        256 sleep 60
                        257 /bin/mkdir -p /var/run/quagga
                        258 /bin/mkdir -p /var/log/quagga
                        259</eof<br></eof<br> 
                    

                    Side note: What was found out on the redistribute static vs redistribute kernel? I am still going in by hand to make the change to config to redistribute kernel.

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