【keepalive】配置文件修改方式,主要用于起浮动地址

配置文件名:/etc/keepalived/keepalived.conf

参数:priority    根据优先级不同,浮动地址会飘到不同主机,

 

配置文件格式如下:

! Configuration File for keepalived

global_defs {
router_id lb
}

 

vrrp_instance vnf{
state BACKUP
interface eth2
virtual_router_id 30
priority 50            //
advert_int 1
authentication {
auth_type PASS
auth_pass passwd2
}

virtual_ipaddress {
10.68.78.83/26
2409:805b:5005:0158::041e:13/116
}
}


vrrp_instance mano{
state BACKUP
interface eth0
virtual_router_id 31
priority 50
advert_int 1
authentication {
auth_type PASS
auth_pass passwd3
}

virtual_ipaddress {
192.168.200.19/24
2409:8086:8616:3c00::13/64
}
}

 

主备KEEP配置对比如下:

 

 

浮动地址查看方式:  ip  a

 

 

 

posted @ 2022-02-14 17:36  新茶煮酒  阅读(287)  评论(0编辑  收藏  举报