Reg. dhcp options decode format

Dominic L.A.J.S. l.a.j.s.dominic at gmail.com
Tue Dec 27 06:10:33 UTC 2011


Hi all,
I want my dhclient to decode my dhcp option and print the value in
dhclient.leases only in HEX staring and not in ASCII.
Is it possible to do that?

I have the following in the dhclient.conf
option space DOMINIC;
option DOMINIC.DATA1 code 1 = boolean;
option DOMINIC.DATA2 code 2 = string;
option DOMINIC.DATA3 code 3 = string;
option vendor.DOMINIC code XXX = encapsulate DOMINIC;

The dhclient.lease file looks like this

lease {
  interface "eth0";
  fixed-address 192.168.101.59;
  option subnet-mask 255.255.0.0;
  option routers 192.168.101.1;
  option dhcp-lease-time 86400;
  option dhcp-message-type 5;
  option domain-name-servers 192.168.101.1,192.168.101.2,192.168.101.3;
  option dhcp-server-identifier 192.168.101.2;
  option broadcast-address 192.168.255.255;
  option DOMINIC.DATA1 true;
  option DOMINIC.DATA2 "pqrst";
  option DOMINIC.DATA3 "test";
...


I want DATA2 and DATA 3 to be decoded as HEX string and not in ASCII.

Your help is much appreciated.

Thanks and Regards,
Dominic L A J S
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20111227/b8bf7043/attachment.html>


More information about the dhcp-users mailing list