<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Andale Mono; font-size: 10pt; color: #000000'><font face="'Andale Mono'" size="2">Will,</font><div style="color: rgb(0, 0, 0); font-family: 'Andale Mono'; font-size: 10pt; "><br></div><div><font face="'Andale Mono'" size="2">See responses inline:</font><br><br><div style="color: rgb(0, 0, 0); font-family: 'Andale Mono'; font-size: 10pt; "><br></div><hr id="zwchr" style="color: rgb(0, 0, 0); font-family: 'Andale Mono'; font-size: 10pt; "><blockquote style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica, Arial, sans-serif; font-size: 12pt; "><b>From: </b>"Will Green" <inbox@flux.org.uk><br><b>To: </b>dhcp-users@lists.isc.org<br><b>Sent: </b>Sunday, March 4, 2012 9:45:18 AM<br><b>Subject: </b>omshell: querying host info via ip address<br><br>Hello,<br><br>I'm trying to manage DHCP entries with omshell, but have hit a<br>problem. I am using CentOS 6.2 with isc-dhcpd-4.1.1-P1.<br><br>My leases file contains one entry:<br><br>host foo {<br> dynamic;<br> hardware ethernet 08:00:27:2b:fc:e1;<br> fixed-address 172.16.1.99;<br>}</blockquote><br><font size="2" face="'andale mono', times">This doesn't appear to be from a leases file, but rather from dhcpd.conf</font></div><div><font face="'Andale Mono'" size="2"><br></font></div><div><font face="'Andale Mono'" size="2"><br></font><blockquote style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica, Arial, sans-serif; font-size: 12pt; "><br><br>When I try to query the server about host records I can only find the<br>host by name or hardware-address, attempts to look it up via IP<br>address fail. What am I missing? omshell output below shows what<br>happens:<br><br>$ omshell<br>> key (hidden in email)<br>> connect<br>obj: <null><br>> new host<br>obj: host<br>> set name = "foo"<br>obj: host<br>name = "foo"<br>> open<br>obj: host<br>name = "foo"<br>ip-address = ac:10:01:63</blockquote><blockquote style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica, Arial, sans-serif; font-size: 12pt; "></blockquote><div style="font-family: Helvetica, Arial, sans-serif; "><font face="Helvetica, Arial, sans-serif"><br></font></div><div><font face="'andale mono', times" size="2">Perhaps I am not familiar enough with omshell, but this doesn't look like 172.16.1.99 unless it is encoded somehow.</font></div><br><blockquote style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica, Arial, sans-serif; font-size: 12pt; ">hardware-address = 08:00:27:2b:fc:e1<br>hardware-type = 00:00:00:01<br>> close<br>obj: <null><br>> new host<br>obj: host<br>> set hardware-address = 08:00:27:2b:fc:e1<br>obj: host<br>hardware-address = 08:00:27:2b:fc:e1<br>> open<br>obj: host<br>hardware-address = 08:00:27:2b:fc:e1<br>ip-address = ac:10:01:63<br>name = "foo"<br>hardware-type = 00:00:00:01<br>> close<br>obj: <null><br>> new host<br>obj: host<br>> set ip-address = 172.16.1.99<br>obj: host<br>ip-address = ac:10:01:63<br>> open<br>can't open object: not found<br>obj: host<br>ip-address = ac:10:01:63<br><br>TIA,<br>Will<br>_______________________________________________<br>dhcp-users mailing list<br>dhcp-users@lists.isc.org<br>https://lists.isc.org/mailman/listinfo/dhcp-users<br><br></blockquote><br></div></div></body></html>