keepalived ipv6
时间: 2023-09-04 19:13:46 浏览: 215
keepalived 权威指南
要在keepalived中添加IPv6地址类型的虚拟IP(VIP),你需要进行以下步骤:
1. 在host1上修改keepalived.conf文件,使用vim编辑器打开该文件:`vim /etc/keepalived/keepalived.conf`
2. 在vrrp_instance部分添加以下配置:
```
vrrp_instance VI_1 {
state MASTER
interface eth0
virtual_router_id 51
priority 101
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
2001:fecc:0:622::a/64 #添加IPv6地址
}
}
```
3. 保存并关闭文件。
接下来,在host2上进行以下配置:
1. 使用vim编辑器打开keepalived.conf文件:`vim /etc/keepalived/keepalived.conf`
2. 在vrrp_instance部分添加以下配置:
```
vrrp_instance VI_1 {
state MASTER
interface eth0
virtual_router_id 51
priority 99
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
172.28.23.100 #保留原有的IPv4地址
}
}
```
3. 保存并关闭文件。
这样,你就成功地在keepalived中添加了IPv6地址类型的虚拟IP(VIP)。
#### 引用[.reference_title]
- *1* *2* *3* [keepalived配置VIP(虚拟IP)](https://blog.csdn.net/ichen820/article/details/108273729)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文