Use omshell/omapi to set hostname for ddns?

Steve van der Burg steve.vanderburg at LHSC.ON.CA
Tue May 13 19:44:24 UTC 2008


Yeah, I keep meaning to look into the perl OMAPI modules.  I've got about 10k dynamic host objects that are in each of my two dhcp servers, and the thought of how long it would take to push all of those in at once, if I lost the leases file, is pretty scary.

Thanks for the pointer.

...Steve

"Brad Dameron" <Brad.Dameron at clearwire.com> wrote:
> I have been using this little app instead of expect. A heck of a lot cleaner 
> and easier to use:
>  
> http://freshmeat.net/projects/omcmd/ 
>  
> Or if you prefer perl:
>  
> http://nickg.home.cern.ch/nickg/dhcpd/omapiperl.html 
> <http://nickg.home.cern.ch/nickg/dhcpd/omapiperl.html> 
>  
>  
> Hope this helps.
>  
> Brad
> 
> ________________________________
> 
> From: dhcp-users-bounce at isc.org on behalf of Steve van der Burg
> Sent: Tue 5/13/2008 10:06 AM
> To: dhcp-users at isc.org 
> Subject: Re: Use omshell/omapi to set hostname for ddns?
> 
> 
> 
>>>> "Steve van der Burg" <steve.vanderburg at lhsc.on.ca> wrote:
>> Hi, I'm using a failover pair of 3.0.5 servers with omshell and am trying to
>> find a way to get a printer that, for some reason, can't work with the
>> servers to do ddns.  Other hosts (PCs) on the same subnet are able to get
>> their A records published, but the printer, which is supplying a
>> client-hostname but no uid, doesn't work.
>> I have scoured the docs and the mailing list, but to no avail.  Reading the
>> server docs suggests to me that the ddns TXT and A recs are not getting
>> generated because the printer is not sending a uid, but I don't know if that
>> is correct.  So, I either need some way to generate a uid for it via server
>> config, or some way to set a name in its host container (we only allow known
>> MACs, so each machine has a host object dynamically sent to the dhcp server
>> via omshell) that will then get picked up and used for ddns.
> 
> Okay, after a lot more searching, here's the answer to my own question:
> 
> To use omshell to set ddns info (in my case, just an A record), do something 
> like this:
> 
>    $con->send("set statements=\"ddns-hostname=\\\"$hname\\\"; ".
>                                "ddns-domainname=\\\"$domain\\\";\"\n");
>    $con->expect(1,'eof');
> 
> (I'm using expect with omshell).
> 
> ...Steve
> 
> 
>  --------------------------------------------------------------------------------
> This information is directed in confidence solely to the person named above 
> and may contain confidential and/or privileged material. This information may 
> not otherwise be distributed, copied or disclosed. If you have received this 
> e-mail in error, please notify the sender immediately via a return e-mail and 
> destroy original message. Thank you for your cooperation.

 --------------------------------------------------------------------------------
This information is directed in confidence solely to the person named above and may contain confidential and/or privileged material. This information may not otherwise be distributed, copied or disclosed. If you have received this e-mail in error, please notify the sender immediately via a return e-mail and destroy original message. Thank you for your cooperation.


More information about the dhcp-users mailing list