omshell: querying host info via ip address

perl-list perl-list at network1.net
Mon Mar 5 14:01:28 UTC 2012


Will, 

See responses inline: 

----- Original Message -----

> From: "Will Green" <inbox at flux.org.uk>
> To: dhcp-users at lists.isc.org
> Sent: Sunday, March 4, 2012 9:45:18 AM
> Subject: omshell: querying host info via ip address

> Hello,

> I'm trying to manage DHCP entries with omshell, but have hit a
> problem. I am using CentOS 6.2 with isc-dhcpd-4.1.1-P1.

> My leases file contains one entry:

> host foo {
> dynamic;
> hardware ethernet 08:00:27:2b:fc:e1;
> fixed-address 172.16.1.99;
> }
This doesn't appear to be from a leases file, but rather from dhcpd.conf 

> When I try to query the server about host records I can only find the
> host by name or hardware-address, attempts to look it up via IP
> address fail. What am I missing? omshell output below shows what
> happens:

> $ omshell
> > key (hidden in email)
> > connect
> obj: <null>
> > new host
> obj: host
> > set name = "foo"
> obj: host
> name = "foo"
> > open
> obj: host
> name = "foo"
> ip-address = ac:10:01:63
Perhaps I am not familiar enough with omshell, but this doesn't look like 172.16.1.99 unless it is encoded somehow. 

> hardware-address = 08:00:27:2b:fc:e1
> hardware-type = 00:00:00:01
> > close
> obj: <null>
> > new host
> obj: host
> > set hardware-address = 08:00:27:2b:fc:e1
> obj: host
> hardware-address = 08:00:27:2b:fc:e1
> > open
> obj: host
> hardware-address = 08:00:27:2b:fc:e1
> ip-address = ac:10:01:63
> name = "foo"
> hardware-type = 00:00:00:01
> > close
> obj: <null>
> > new host
> obj: host
> > set ip-address = 172.16.1.99
> obj: host
> ip-address = ac:10:01:63
> > open
> can't open object: not found
> obj: host
> ip-address = ac:10:01:63

> TIA,
> Will
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20120305/d05be2a7/attachment-0001.html>


More information about the dhcp-users mailing list