understand the CARP "advskew" option

CARP supports "advskew" (advertisement skew) parameter which is essentially a delay in 1/256 of seconds added to the base advertisement interval to make one host advertise a bit slower that the other. For example if "advbase" (advertisement base) is 2 seconds and in addition there is a "advskew 100" configured, then host sends CARP messages with 2.39 (2+1/256*100) second interval instead of 2 second interval. Why does the messages interval matter to CARP? Am I correct that CARP works in a way that VHID with lowest messages interval (advertisement base+advertisement skew) will become a master?
 
Correct.

If there are two systems online with the same VHID, the one with the lowest advskew will become master.

This allows you to configure two devices in a master/slave relationship, where the slave will only ever take over if the master is dead. When the master comes back online, it takes over. It just provides a bit of stability into the mix, so that you know "If systemA is online, then it is the master, always".
 
phoenix said:
If there are two systems online with the same VHID, the one with the lowest advskew will become master.

Based on my tests it's true only if the "advbase" of two systems is identical. In other words it's not just the "advskew", but the system with lowest advertisement base+advertisement skew value will take the master role. That's why I have two questions:

1) Is CARP designed in a way that instead of priority values like in VRRP or HSRP, CARP preferres system which announces CARP messages with shortest interval?
2) Why is "advskew" needed if one could determine the master/backup role solely with "advbase"?
 
Back
Top