tmesolutions
07-21-2007, 07:36 AM
Hi all,
I have got heartbeat setup on 2 servers and I want them configured with 2 internet IPs on an active/active configuration. Ie lets say they 2 ip addresses are server1 = 1.2.3.4 and server2 = 1.2.3.5. If server 1 goes down then server 2 takes 1.2.3.4 over as well until server 1 comes back online.
I have this working to a point, however Im currently configuring the ip addresses also in /etc/network/interfaces which i dont think is correct and im getting errors. The servers have a private LAN too. The problem is if i dont configure eth1 (the card with the internet ips) then heartbeat doesnt seem to know what to do with the ip addresses.
My current setup is..
/etc/network/interfaces
Server1:
# The LAN network interface
auto eth0
iface eth0 inet dhcp #note this will be 192.168.100.16
# The Internet network interface
auto eth1
iface eth1 inet static
address 1.2.3.4
netmask 255.255.0.0
network 1.2.3.0
broadcast 1.2.3.255
gateway 1.2.3.1
dns-nameservers 1.2.3.10
Server2:
Exactly the same except eth0 will be 192.168.100.17 and eth1 will be 1.2.3.5
/etc/ha.d/ha.cf
Server1 and Server2:
logfacility daemon # Log to syslog as facility "daemon"
node server1 server2 # List our cluster members
keepalive 1 # Send one heartbeat each second
deadtime 10 # Declare nodes dead after 10 seconds
ucast eth0 192.168.100.16
ucast eth0 192.168.100.17
ping 1.2.3.1 # Ping our router to monitor ethernet connectivity
auto_failback yes # Do fail back automatically
respawn hacluster /usr/lib/heartbeat/ipfail # Failover on network failures
/etc/ha.d/haresources
Server1 and Server2:
server1 1.2.3.4
server2 1.2.3.5
The only way I can think to get it to work is to get another 2 internet IPs which are set up in /etc/network/interfaces eth1 but not really used? seems a waist to me! is there not another way to do this ?! if you have read this far then thanks :D
I have got heartbeat setup on 2 servers and I want them configured with 2 internet IPs on an active/active configuration. Ie lets say they 2 ip addresses are server1 = 1.2.3.4 and server2 = 1.2.3.5. If server 1 goes down then server 2 takes 1.2.3.4 over as well until server 1 comes back online.
I have this working to a point, however Im currently configuring the ip addresses also in /etc/network/interfaces which i dont think is correct and im getting errors. The servers have a private LAN too. The problem is if i dont configure eth1 (the card with the internet ips) then heartbeat doesnt seem to know what to do with the ip addresses.
My current setup is..
/etc/network/interfaces
Server1:
# The LAN network interface
auto eth0
iface eth0 inet dhcp #note this will be 192.168.100.16
# The Internet network interface
auto eth1
iface eth1 inet static
address 1.2.3.4
netmask 255.255.0.0
network 1.2.3.0
broadcast 1.2.3.255
gateway 1.2.3.1
dns-nameservers 1.2.3.10
Server2:
Exactly the same except eth0 will be 192.168.100.17 and eth1 will be 1.2.3.5
/etc/ha.d/ha.cf
Server1 and Server2:
logfacility daemon # Log to syslog as facility "daemon"
node server1 server2 # List our cluster members
keepalive 1 # Send one heartbeat each second
deadtime 10 # Declare nodes dead after 10 seconds
ucast eth0 192.168.100.16
ucast eth0 192.168.100.17
ping 1.2.3.1 # Ping our router to monitor ethernet connectivity
auto_failback yes # Do fail back automatically
respawn hacluster /usr/lib/heartbeat/ipfail # Failover on network failures
/etc/ha.d/haresources
Server1 and Server2:
server1 1.2.3.4
server2 1.2.3.5
The only way I can think to get it to work is to get another 2 internet IPs which are set up in /etc/network/interfaces eth1 but not really used? seems a waist to me! is there not another way to do this ?! if you have read this far then thanks :D
