1> WEB1/WEB2 服务器的keepalived 正常启动后:
WEB1服务器检查:
[root@WEB1:/]# ip add
2: eth0: mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 02:0c:33:4f:da:4t brd ff:ff:ff:ff:ff:ff
inet 192.168.1.100/24 brd 192.168.1.255 scope global eth0
inet 192.168.1.201/32 scope global eth0
inet 192.168.1.203/32 scope global eth0
inet 192.168.1.205/32 scope global eth0
WEB2服务器检查:
[root@WEB2:/]# ip add
2: eth0: mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 02:0c:33:4f:ya:4t brd ff:ff:ff:ff:ff:ff
inet 192.168.1.101/24 brd 192.168.1.255 scope global eth0
inet 192.168.1.202/32 scope global eth0
inet 192.168.1.204/32 scope global eth0
inet 192.168.1.206/32 scope global eth0
2>当WEB1 keepalived 启动,而WEB2关闭后;所有的VIP 都跑在WEB1上面,反之者在WEB2上面:
WEB1服务器检查:
[root@WEB1:/]# ip add
2: eth0: mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 02:0c:33:4f:da:4t brd ff:ff:ff:ff:ff:ff
inet 192.168.1.100/24 brd 192.168.1.255 scope global eth0
inet 192.168.1.201/32 scope global eth0
inet 192.168.1.203/32 scope global eth0
inet 192.168.1.205/32 scope global eth0
inet 192.168.1.202/32 scope global eth0
inet 192.168.1.204/32 scope global eth0
inet 192.168.1.206/32 scope global eth0
WEB2服务器检查:
[root@WEB2:/]# ip add
2: eth0: mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 02:0c:e3:4f:bb:4t brd ff:ff:ff:ff:ff:ff
inet 192.168.1.101/24 brd 192.168.1.255 scope global eth0
注:如果VIP不能正常漂移请检查防火墙配置,及分析 keepalived 日志,本文暂未进行格式化日志配置.
>>>>>