OPNsense Forum

Archive => 15.1 Legacy Series => Topic started by: rcpa0 on May 09, 2015, 05:33:08 pm

Title: [SOLVED] CARP VHID must be unique?
Post by: rcpa0 on May 09, 2015, 05:33:08 pm
Primary opnsense with Virtual IP: CARP, 192.168.2.1, VHID Group 1.
Backup opnsense with Virtual IP: CARP, 192.168.2.1, VHID Group 1 not allowed.

I thought the VHID must be the same on both the Primary and Secondary?
The Backup opnsense returns:

"The following input errors were detected:
  * This IP address is being used by another interface or VIP."

The XMLRPC made every Virtual IP on the Backup have a unique VHID.  That seems to go against the examples in https://www.freebsd.org/doc/en/books/handbook/carp.html.  It is not the way I have my existing pfsense 2.2 set up.

At what version of pfsense was opnsense forked?
Title: Re: CARP VHID must be unique?
Post by: AdSchellevis on May 10, 2015, 11:02:47 am
Hi,

Your right, the vhid must be equal on both machines and unique per machine. This could be an issue with the xmlrpc client part sending virtualip's to the other side.
The xmlrpc server part was completely rewritten some time ago, the client part still is up for improvement (the code quality of the original script is not very well).

Can you retest your setup with "Synchronize Virtual IPs" disabled and remove / create those items again on the backup node?

We started the project with the last publicly available pfSense version (2.2 development), but a lot has changed in the short time period between our original copy. We try to focus on improving code quality and eliminating non standard hooks.
Title: Re: CARP VHID must be unique?
Post by: rcpa0 on May 11, 2015, 09:33:23 am
On Backup, I deleted the NAT rules, and Virtual IPs.  The High Availability > pfsync Synchronize States is already unchecked.  Manually recreating Virtual IPs on Backup does allow vhid # to match the Primary's.

Deleted the manual Virtual IP on Backup again, set sync again, and resynced Primary to Backup worked this time.  Perhaps I did something wrong the first few times.

Thanks.