Reputation: 406
Is there any way in keepalived to enter in Fault/Backup state only when 2 interfaces goes down?
In documentation, i found that track_interface can be used to enter the Fault state if one or more interfaces goes down, but what i'm trying to achieve is to go in Backup mode only if BOTH of them are down, not only one. Thank you.
Upvotes: 0
Views: 2261
Reputation: 406
Responding to myself.
I was able to achieve that by setting different priorities on the interfaces:
track_interface {
p1p1 weight -15
p1p2 weight -15
}
What means to decrease the priority by 15 in case of the interface goes down. So, having the priority 100 on the first router and 80 on the Backup - if one interface on the master will go down - the priority on the master router will be 85 which is higher than on the Backup router, but if both of them will go down - then on the Master router priority will be 70, which is lower and Backup router will become Master.
Upvotes: 1