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

    Quagga, ospf and high availability

    Scheduled Pinned Locked Moved pfSense Packages
    2 Posts 2 Posters 2.0k 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.
    • E
      equinoxefr
      last edited by

      Hi,

      We are using multiple pfsense clusters on our network with ospf for route distribution.

      First time we used the patch to start quagga on master and to stop it on backup node. Our gateways are using CARP for fail-over. With this method, we lost a few ip packets (> 4 pings)  :o when doing a fail-over. Other routers needs to wait for ospf dead timer (4 sec in our case) to rebuild routing tables and it costs a few seconds.

      Now, instead of switching quagga on and off, quagga is running on the two nodes of the cluster with lower route cost on master.

      Master: default route cost: 1
      Backup: default route cost: 10

      In the rc.carpmaster script we run this to change route priority dynamically to force other routers to get best path:

      #! /bin/sh
      echo "config term
         interface vmx1
         ip ospf cost 1
         interface vmx3_vlan111
         ip ospf cost 1
         interface vmx3_vlan224
         ip ospf cost 1 
         " | vtysh
      

      According to rc.carpmaster, we  run this in rc.carpbackup:

      #! /bin/sh
      echo "config term
         interface vmx1
         ip ospf cost 10
         interface vmx3_vlan111
         ip ospf cost 10
         interface vmx3_vlan224
         ip ospf cost 10
         " | vtysh
      
      

      Now with this setup, we don't lost any packet when doing a manual fail-over and only 2 pings when a power failure on master.  ;D

      1 Reply Last reply Reply Quote 0
      • Q
        quadrinary
        last edited by

        I've recently coded a GUI addition to the Quagga OSPF plugin for doing just this. I'll be submitting a pull request in Github in the next week or so as i finalize a few tweaks.

        This has really brought our HA router abilities to a new level and it's working well in our datacenters.

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