主机网卡配置文件:
[root@GD_HS21_G021 network-scripts]# pwd
/etc/sysconfig/network-scripts
[root@GD_HS21_G021 network-scripts]# more ifcfg-eth0 ifcfg-eth1 ifcfg-eth1:0
::::::::::::::
ifcfg-eth0
::::::::::::::
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.80
NETMASK=255.255.255.0
::::::::::::::
ifcfg-eth1
::::::::::::::
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=static
IPADDR=221.179.0.80
NETMASK=255.255.255.224
GATEWAY=221.179.0.65
::::::::::::::
ifcfg-eth1:0
::::::::::::::
DEVICE=eth1:0
ONBOOT=yes
BOOTPROTO=static
IPADDR=221.179.0.82
NETMASK=255.255.255.224
GATEWAY=221.179.0.65
[root@GD_HS21_G021 network-scripts]#
备机网卡配置文件:
[root@GD_HS21_G022 network-scripts]# pwd
/etc/sysconfig/network-scripts
[root@GD_HS21_G022 network-scripts]# more ifcfg-eth0 ifcfg-eth1 ifcfg-eth1:0
::::::::::::::
ifcfg-eth0
::::::::::::::
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.81
NETMASK=255.255.255.0
::::::::::::::
ifcfg-eth1
::::::::::::::
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=static
IPADDR=221.179.0.81
NETMASK=255.255.255.224
GATEWAY=221.179.0.65
::::::::::::::
ifcfg-eth1:0
::::::::::::::
DEVICE=eth1:0
ONBOOT=yes
BOOTPROTO=static
IPADDR=221.179.0.82
NETMASK=255.255.255.224
GATEWAY=221.179.0.65
[root@GD_HS21_G022 network-scripts]#作者: gl00ad 时间: 2008-10-25 03:47 标题: that is the way it should be 浮动ip:分别绑定在主备机的eth1:0:221.179.0.82, but it should only active one at a time
packet-->(ethernet)-->221.179.0.82-->HWaddr 00:21:5E:2C:48:A0(80, not 81)
I just copy from redhat document
If the backup LVS router does not receive a response from the active LVS router, it initiates
failover by calling send_arp to reassign all virtual IP addresses to the NIC hardware addresses
(MAC address) of the backup LVS router, sends a command to the active LVS router via both
the public and private network interfaces to shut down the lvs daemon on the active LVS
router, and starts the lvs daemon on the backup LVS router to accept requests for the
configured virtual servers.