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

[SOLVED] Still problems with pfsense CARP trigger

Scheduled Pinned Locked Moved HA/CARP/VIPs
15 Posts 3 Posters 7.3k 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.
  • J
    jimp Rebel Alliance Developer Netgate
    last edited by Feb 7, 2012, 2:41 PM

    Does the carpup and carpdown script run if you run it by hand?

    It could be a problem with the script (wrong interpreter path, no exec bit, etc)

    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
    • D
      DeFix
      last edited by Feb 7, 2012, 3:20 PM Feb 7, 2012, 2:57 PM

      @jimp:

      Does the carpup and carpdown script run if you run it by hand?

      It could be a problem with the script (wrong interpreter path, no exec bit, etc)

      Yes it works when i run it by hand.

      Text in carpup

      #!/bin/sh
      /sbin/ifconfig bridge0 up
      logger -t $1 "Set the bridge port to [UP]"

      The rights of the file's

      [2.0.1-RELEASE][root@fw-tw-main.itnm]/usr/local/bin(4): ls -al | grep carp
      -rwxr-xr-x   1 root  wheel       83 Feb  7 12:26 carpdown
      -rwxr-xr-x   1 root  wheel       80 Feb  7 12:27 carpup

      Must i first enable something in pfsense to activate the triggering or so?

      1 Reply Last reply Reply Quote 0
      • J
        jimp Rebel Alliance Developer Netgate
        last edited by Feb 7, 2012, 3:33 PM

        No, if devd is running they should get triggered.

        Try using the full path to the logger command, too. I'm not sure it would have a PATH set when run from devd.

        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
        • D
          DeFix
          last edited by Feb 7, 2012, 3:40 PM

          @jimp:

          No, if devd is running they should get triggered.

          Try using the full path to the logger command, too. I'm not sure it would have a PATH set when run from devd.

          Yes devd is running.

          Also tried to add the full path to the logger. (also had it fully disabled) but no changes.

          Seems like there is no trigger at all. Can you tell me how i can trace that there is a trigger fired at all?

          1 Reply Last reply Reply Quote 0
          • J
            jimp Rebel Alliance Developer Netgate
            last edited by Feb 7, 2012, 3:59 PM

            Not sure off the top of my head. Look at FreeBSD's man page for devd/devd.conf and you'll probably find more answers there.

            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
            • D
              DeFix
              last edited by Feb 7, 2012, 4:11 PM

              @jimp:

              Not sure off the top of my head. Look at FreeBSD's man page for devd/devd.conf and you'll probably find more answers there.

              Hold on!! i have the solution!!  ;D

              Solution:
              In the devd.conf file is the subsystem carp. That is the name of the Virtual IP for CARP. On our system the name is vip1.

              So it won't match with the name carp.

              With that knowledge i changed my devd.conf to:

              CARP notify hooks. This will call carpup/carpdown with the

              interface (carp0, carp1) as the first parameter.

              notify 100 {
                  match "system"          "IFNET";
                  match "type"            "LINK_UP";
                  match "subsystem"          "vip1";
                  action "/usr/local/bin/carpup $subsystem";
              };

              notify 100 {
                  match "system"          "IFNET";
                  match "type"            "LINK_DOWN";
                  match "subsystem"          "vip1";
                  action "/usr/local/bin/carpdown $subsystem";
              };

              So i changed the carp to vip1. This is now a match for the trigger and it was the solution to our problem.

              Thanks for the good support and thinking.

              1 Reply Last reply Reply Quote 0
              • S
                Supermule Banned
                last edited by Feb 7, 2012, 4:16 PM

                But is it implemented by default in PFSense that way? Or can it be changed via the webgui so the trigger wont happen ?

                1 Reply Last reply Reply Quote 0
                • D
                  DeFix
                  last edited by Feb 7, 2012, 4:19 PM

                  @Supermule:

                  But is it implemented by default in PFSense that way? Or can it be changed via the webgui so the trigger wont happen ?

                  For me it was a default name of PFSense. Did search to rename it to carp (after i knew what the problem was), but did not found it in the WebGUI.

                  1 Reply Last reply Reply Quote 0
                  • J
                    jimp Rebel Alliance Developer Netgate
                    last edited by Feb 7, 2012, 4:20 PM

                    Ah, the 'carp' bit was probably left over from 1.2.3 and not updated. If you just use "vip" it may work also.

                    That file isn't written from the GUI, it's just there on the install. It would be overwritten during an upgrade, but it's left alone otherwise.

                    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
                    • D
                      DeFix
                      last edited by Feb 7, 2012, 4:22 PM

                      @jimp:

                      Ah, the 'carp' bit was probably left over from 1.2.3 and not updated. If you just use "vip" it may work also.

                      That file isn't written from the GUI, it's just there on the install. It would be overwritten during an upgrade, but it's left alone otherwise.

                      That explains a lot.

                      I use explecit vip1 because we also have a vip2 and that may not trigger the bridge port to UP or DOWN.

                      1 Reply Last reply Reply Quote 0
                      • C cjohn referenced this topic on Oct 25, 2023, 4:47 PM
                      15 out of 15
                      • First post
                        15/15
                        Last post
                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                        This community forum collects and processes your personal information.
                        consent.not_received