how to query state of failover protocol

Glenn Satchell Glenn.Satchell at uniq.com.au
Thu Jun 8 16:26:52 UTC 2006


>X-Original-To: dhcp-users at webster.isc.org
>From: "Gordon A. Lang" <glang at goalex.com>
>To: <dhcp-users at isc.org>
>Subject: how to query state of failover protocol
>Date: Thu, 8 Jun 2006 11:42:30 -0400
>X-MailScanner-Information: Please contact the ISP for more information
>X-MailScanner: Found to be clean
>X-archive-position: 887
>X-ecartis-version: Ecartis v1.0.0
>X-original-sender: glang at goalex.com
>List-software: Ecartis version 1.0.0
>X-List-ID: <dhcp-users.isc.org>
>X-list: dhcp-users
>
>Besides browsing the log files, how can a get the failover protocol state from 
the command line?
>(ver 3.0.4 on Solaris 10)
>
>--
>Gordon A. Lang
>
Hi Gordon,

You can do this using omshell. Here's the interactive version, it's
easy enough to put this in a shell script.

omshell
> server <hostname>   
> port 7911
> key <keyname> <secret> 
> connect
obj: <null>
> new failover-state
obj: failover-state
> set name = "<failovername>"
obj: failover-state
name = "foo"
> open
...
partner-state = 00:00:00:02
local-state = 00:00:00:02
...
>

The failover states are defined in includes/failover.h, 2 = normal.

/* A failover peer. */
enum failover_state {
        unknown_state,
        partner_down,
        normal,
        communications_interrupted,
        resolution_interrupted,
        potential_conflict,
        recover,
        recover_done,
        shut_down,
        paused,
        startup,
        recover_wait
};


You also need to enable omapi in dhcpd.conf. See dhcpd.conf man page
for details on creating secrets.

# OMAPI
omapi-port 7911;
key <keyname> {
  algorithm hmac-md5;
  secret <secret>
}
omapi-key <keynmae>;

regards,
-glenn



More information about the dhcp-users mailing list