ubuntu1804 keepalived
主:
cat /etc/keepalived/keepalived.conf
! Configuration File for keepalived
global_defs {
router_id LVS_DEVEL
}
vrrp_instance VI_1 {
state MASTER
interface ens33
#garp_master_delay 10
virtual_router_id 51
priority 100
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
192.168.219.88 label ens33:1
#192.168.200.17
#192.168.200.18
# optional label. should be of the form "realdev:sometext" for
# compatibility with ifconfig.
#192.168.200.18 label eth0:1
}
}
备:
root@kb:~# cat /etc/keepalived/keepalived.conf
global_defs {
router_id LVS_DEVEL
}
vrrp_instance VI_1 {
state BACKUP
interface ens33
#garp_master_delay 10
virtual_router_id 51
priority 100
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
192.168.219.88 label ens33:1
#192.168.200.17
#192.168.200.18
# optional label. should be of the form "realdev:sometext" for
# compatibility with ifconfig.
#192.168.200.18 label eth0:1
}
}