Replies: 2 comments
-
The simple answer to you headline question is: No. If a VRRP instance is not receiving adverts, or it is only receiving lower priority adverts and nopreempt, and the VRRP instance is not in fault state, then that VRRP instance will unconditionally become master. In your scenario described above, one action is:
Does this mean that the tunnel is already configured on R1? If so, then the tunnel may just as well be permanently configured on R2 as well, so far as I can see. I can see two solutions managed entirely by keepalived:
An alternative approach:
Please do let us know how you get on, and provide details on your working solution. |
Beta Was this translation helpful? Give feedback.
-
Hi pqarmitage! Thanks a lot for your reply! It's a bit sad that keepalived can't run additional scripts when VRRP packets are lost :( Anyway, I’ve implemented a different solution now — I have an independent Bash script running outside of keepalived. It checks if R1 is reachable via both internal and external IPs. If the internal IP is unreachable but the external IP responds, the script starts an OpenVPN tunnel and routes 192.168.20.0/24 through it. If both IPs are unreachable, keepalived will take over the VIP from R1. I really like your suggestion about having a permanently active VPN tunnel and using unicast peers for VRRP communication. I hadn’t considered that — great idea! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone!
Is it possible to configure keepalived so that a BACKUP server does not immediately take over the virtual IP when it stops receiving VRRP packets — and instead runs an additional script to check if the MASTER is still alive?
Here's my setup:
Two Linux-based routers connected via a ~20km direct optical L2 link
Each router has its own independent internet uplink
R1 handles clients in 10.4.0.0/16 and 192.168.20.0/24
R2 handles clients in 10.3.0.0/16
The 192.168.20.0/24 subnet is shared and must be available for both sides.
My goal is:
I know how to implement this entirely with bash scripts and external monitoring, but I’m curious if it can be achieved using just keepalived mechanisms — ideally with track_script, notify_fault, or other native hooks.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions