Forum Discussion
Derek_21893
Apr 08, 2010Nimbostratus
Alok,
Well, I've already been down that road, and it may work under certain circumstances, but will not work under all circumstances. get_peer_address will give you the address of the config_sync peer, whatever that is configured to be. Many folks will use a separate VLAN for this, which is not routable, and is only for configuration synchronization between two LTMs in an HA pair, thus you could not connect via iControl to the IP address you receive from get_peer_address. Additionally, there is nothing stopping people from configuring the same config sync IP address for every HA pair they have, e.g. 192.168.0.1 and 192.168.0.2, if they use an isolated VLAN so that they are not routable. There's no real reason you couldn't do this (and I've seen it done). So in this scenario, you could end up with two different individual LTMs with the exact same failover IP address, and no real way to tell which one is the right config sync peer.
Basically, there is no current reliable way that I have found to automatically detect a failover peer. Where I left off on this issue is that I'm going to go back and try this using the ARP tables, more specifically Networking/ARP->get_dynamic_arp. Basically given an arbitrary number of LTMs in a network, figure out which two are talking to each other by looking at all of the ARP tables and then figuring out which two LTMs have each other's MAC address in their respective ARP table. I know, it's crazy but it just might work, but we shall see.
I will certainly post back to this thread if I am successful.
Thanks,
-Derek