omshell: querying host info via ip address

Simon Hobson dhcp1 at thehobsons.co.uk
Mon Mar 5 15:13:44 UTC 2012


perl-list wrote:
>:-)  Like I said: unless it is encoded somehow
>
>I don't believe I have ever seen a hex IP before.
>
>btw - that probably means that if he wants to look up by IP, that he 
>will have to submit a hex IP for the query?

Dunno about that, but in general an IP address is simply a 32 bit (4 
byte) value - how it is used (internally by computers etc) is 
completely disconnected from how it's represented for the benefit of 
the fleshware. We use the "dotted decimal" notation simply as a 
convenient way of writing it, though I find hex is often better 
(especially when thinking in terms of ranges and masks).
IPv6 has gone to hex for standard representations as it's a lot more 
concise and allows splitting (particularly reverse DNS) at 4 bit 
boundaries (one hex digit).

But that digresses a bit.
Within ISC DHCP configs etc, you can use hex (eg ac:10:01:63), dotted 
decimal for IP addresses (eg 172.16.0.99), or even strings (eg 
"\254\020\001c" - where \nnn is Octal). I'd assume the same is likely 
to be the case with Omshell as it's from the same stable.

-- 
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.


More information about the dhcp-users mailing list