vrrp mit keepalived

07 Februar 2019

Status: initial draft

keepalived Installation

sudo yum install keepalived

Setup

Master Setup

! keepalived primary system

global_defs {
                router_id dns01
                script_user root
                enable_script_security
}

vrrp_instance PIHOLE {
                state MASTER
                interface eth0                  # Interface anpassen
                virtual_router_id 51
                priority 150
                advert_int 5                    # VRRP Intervall
#               smtp_alert

                unicast_src_ip 192.168.8.2      # local
                unicast_peer {
                                192.168.8.8     # peer
                }

                authentication {
                                auth_type PASS
                                auth_pass 1234      # anpassen
                }

                virtual_ipaddress {
                                  192.168.8.10/24
                }
# Notify Skripte
#       notify_master ""
#       notify_backup ""
#       notify_fault ""
}

Backup System

! keepalived backup system

global_defs {
                router_id dns02
                script_user root
                enable_script_security
}

vrrp_instance PIHOLE {
                state BACKUP
                interface bond0         # Interface anpassen
                virtual_router_id 51
                priority 50
                advert_int 5             # VRRP Intervall
#               smtp_alert

                unicast_src_ip 192.168.8.8
                unicast_peer {
                                192.168.8.2
                }

                authentication {
                                auth_type PASS
                                auth_pass 1234      # anpassen
                }

                virtual_ipaddress {
                                  192.168.8.10/24
                }

# Notify Skripte
#       notify_master ""
#       notify_backup ""
#       notify_fault ""
}

ToDo

Virtual Server + Bild Setup mit sync & conntrackd