From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96206706808811.tru64-unix-managers.marc@archive.invalid> From: "Tran, Hung" Date: Tue, 27 Jun 2000 00:48:47 +0000 To: tru64-unix-managers Subject: SUMMARY 2: Main & Standby Servers Sharing Single IP Address X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96206706808811 Hi all, Due to popular demands for the detailed solution, ie. a summary is no longer a summary, I am sending you the messages I received from people in group 2 who favour the use of IP alias. Regards, Hung Tran RLM Systems Australia Ardizzoni Enrico I think you may use "ip alias" (see 'man ifconfig'): . Server A primary ---(IP 192.168.1.1)-+ eth Server B secondary -(IP 192.168.1.2)-+ eth When Server A goes DOWN, you run on Server B: ifconfig tu0 alias 192.168.1.1 when Server A goes UP, you run on server B: ifconfig tu0 -alias 192.168.1.1 Jonathan Burelbach Can you have multiple addresses active at once? You might try using an IP alias for the one known address then if the main system goes down just ifconfig the alias up on the secondary. Normal state Failover Main system: Main system: IP addr for tu0 dead IP alias secondary secondary: IP addr for tu0 IP addr for tu0 IP alias check man ifconfig for the options but it should be something like: ifconfig tu0 alias 10.1.1.50 if you want to remove the alias type: ifconfig tu0 -alias 10.1.1.50 You'd probably want to add the alias to /etc/inet.local on the primary. Bochnik, William J another option would be to have 2 nics in the backup machine, one active with one address, and one with the same address as the other machine, but the interface down. Upping the interface could be done via a very simple command or script. Dennis Breeden I have not tried this but here is an idea based on some system I use to administer. This will require the installation of an additional card in both systems. The new card it is to communicate between the systems, each determining who is live and who is in hotbackup. You will need to write some sort of arbitration application/script. When the live system fails/commanded/etc., the hotbackup system enables the card automatically with the ifconfig up function. The primary card on boot is "down" on booting. John P Speno It's not a problem to do what you want. We do it here at UPenn on our systems. When system1 fails, system2 adds system1's IP address to its interface. System1, if it can still run, deletes the system1 IP address and switches to a different IP address. Very simple. I can provide more details if you require them. There are some tricks you can use to make this work better. ====================================================================== Until they "fix" something in the networking/routing code, I think you are better off doing this: First, do all of your INET setups in /etc/inet.local as it's much easier to work with than /etc/rc.config. (NOTE: You must set NUM_NETCONFIG=1 in /etc/rc.config, or else /sbin/init.d/{inet,route} won't work). Then, when you configure your interfaces, always use the 'alias' command in ifconfig. I've found that this will allow you to delete your first address w/o a routing side effect. When we want to bring a machine out of service, we delete its service IP addres and assign it a non-service address. It looks like this: ifconfig tu0 -alias XXX.XXX.XXX.XXX ifconfig tu0 alias YYY.YYY.YYY.YYY up I'll forward you some email about this and talks with a Compaq person. It may shed more light on the use of the 'alias' thing. =========================================================================== Regarding the email conversation with "a Compaq person", I am not sure if I should forward to the list the whole conversation without John's permission. So here is my summary: It relates to the difference between ifconfig delete and ifconfig -alias. Although they are meant to do the same thing but they do not. The delete option will affect the default route whereas -alias will not. The advice is to use ifconfig alias or -alias when adding or removing IP addresses to an interface. If you need more information, I suggest you contact John directly speno@isc.upenn.edu Lars Bro First of all, I truly believe that if you want something that WORKS, use option 1. What you should do is the following: The two servers must not contain internal disks. You should use some disks on a shared fast+wide+diff. bus. Then both machines could boot and run from these disks (They must NEVER EVER run at the same time). Now, have some electrician make a relay that is connected to the serial port of each machine, the DTR connector. Like this: If DTR drops on server A, switch power from server A to server B. No problem, a 5 volt signal controls the relay. In the server, you have a process that opens "/dev/tty00" and then performs whatever monitoring you like. If anything happens, that process simply exits, the port is closed and DTR will drop and power is automatically switched to the other host which boots and runs exactly the same system. The failed host can be dismounted for repair without further problems. This will WORK and cost you no TruCluster license. If you use AdvFS, you are down to a few minutes switch time). Secondly, the network interface supports aliases, meaning that the network interface might answer to other adresses than the primary. For example, two hosts might run an NFS service. The clients mount the NFS server which is this pseudo adress. The host actually running the NFS service makes the alias. The other does not. This is what you get when you buy TruCluster pre-5.0. In truCluster pre-5.0, there is a risk that two different members (by mistake) mount the same file system. This will wreck that filesystem totally. I have been told that newer versions of TruCluster dont do this any more (or, the risk is less) In my proposed solution above there is NO risk since a relay will run only machine A OR machine B. But you can easily do the network interface trick yourself. * set alias # ifconfig tu0 alias xxx.xxx.xxx.xxx * remove alias # ifconfig tu0 -alias xxx.xxx.xxx.xxx