Quote:> Is there a reliable way of working out the Host ID of a Sun server from it's
> MAC address. I see that the last 3 octets in the MAC address are used for
> the last 3 octets in the Host ID, but the Host ID has a number that can
> change between different types of server. I've seen host ID's with 80 and
> 83 as the first octet.
Here's what I know about it, from the opposite perspective (trying to
figure out what the MAC address is without root privileges or looking
at the arp cache):
http://groups.google.com/groups?as_umsgid=%3Cu6nj7rmhe5l476%40corp.su...
Look near the end - if the high bit of the first byte of the hostid is off,
the first byte represents the architecture (1st nybble) and model (2nd
nybble), otherwise architecture and model are to be obtained elsewhere
(and presumably the value of the first byte of the hostid is assigned so
as to maximize the number of unique hostids available, and thus can't be
calculated unless you have a substantial table of values actually assigned,
and some other obtainable information to determine which apply).
Y'know, if you just want to be able to obtain a hostid over the network,
it's easy: pick an unassigned port number, and add an entry to
/etc/services, and another entry to /etc/inetd.conf, something like these:
/etc/services:
hostid 8887/tcp
/etc/inetd.conf:
hostid stream tcp nowait nobody /usr/bin/hostid
After that, you can use e.g. telnet or mconnect with a port argument to
to retrieve the hostid from the system you set up accordingly. Keep in
mind that you might not want the whole world to be able to retrieve your
hostid, and so your choice of a port number should be made in consultation
with whoever maintains your firewall(s).
--