🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
[TOC] 假设一批主机有两个网卡:ens33和ens37,现在需要在这两个网卡上分别绑VIP。 这里我们使用Backup-Backup模式,那么每台主机的`keepalived.conf`文件内容是一样的,配置如下(已验证可以): 下面的配置中,两个`virtual_route_id`都是一样的:`200` ``` global_defs { notification_email { acassen@firewall.loc failover@firewall.loc sysadmin@firewall.loc } notification_email_from Alexandre.Cassen@firewall.loc smtp_server 127.0.0.1 smtp_connect_timeout 30 router_id LVS_DEVEL } vrrp_instance VI_1 { state BACKUP interface ens33 virtual_router_id 200 priority 100 advert_int 1 authentication { auth_type PASS auth_pass 1111 } virtual_ipaddress { 192.168.2.200/24 dev ens33 label ens33:200 } } vrrp_instance VI_2 { state BACKUP interface ens37 virtual_router_id 200 priority 100 advert_int 1 preempt authentication { auth_type PASS auth_pass 1111 } virtual_ipaddress { 192.168.9.200/24 dev ens37 label ens37:200 } } ```