# understand the CARP "advskew" option



## m4rtin (Sep 8, 2014)

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?


----------



## phoenix (Sep 8, 2014)

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".


----------



## m4rtin (Sep 8, 2014)

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"?


----------

