Keepalived conf - goddes4/python-study-wiki GitHub Wiki

vrrp_instance 23533267-f960-4bd9-9c72-2dd18e2eca8c {
   interface eth0
 
   track_interface {
     eth0
     eth1
   }
 
   state BACKUP            # Can be the same on both instances, whichever starts first will be the master, or choose MASTER/BACKUP
   virtual_router_id 50    # Needs to be the same on both instances, and needs to be unique if using multicast, does not matter with unicast
   priority 100            # Can be the same on both instances, unless using MASTER/BACKUP then the bigger number is for the master
   nopreempt               # Don't fail back
 
   unicast_src_ip 10.188.100.20   # Unicast specific option, this is the IP of the interface keepalived listens on
   unicast_peer {                 # Unicast specific option, this is the IP of the peer instance 
     10.188.100.21
   }
 
   virtual_ipaddress {     # The VIP that keepalived will monitor
     10.188.96.53 dev eth0
   }
 }