In article <a5vjjf$8eg$1@newstoo.ericsson.se>,
"Hank Kingsley" <_roblinux@btinternet.com> writes:
> 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.supernews.com%3E&hl=en
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).
--
mailto:rlhamil@mindwarp.smart.net http://www.smart.net/~rlhamil
This only works for E10K's...
E10K mac addresses all start with 0:0:be
E10K hostid's all start with 0x80 to represent the machine type.
For an E10K domain to be created you need to get a license. That license
gives you the serial number for the domain. (BTW the domain is just a host
running on an E10K). This serial number is in hex and is 24 bits long. The
last 24 bits of the hostid are the same as the serial number and the last 3
octets (24 bits) of the mac id, are the same as the serial number...
Scott
Hank Kingsley <_roblinux@btinternet.com> wrote:
> 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.
> --
> NOSPAM: remove _ to email me.
In article <Xns91B4D49E7502Avshafirattbroadbandc@24.91.0.74>,
Vlad <vshafir@attbroadband.com> writes:
> "Volker A. Brandt" <Volker.Brandt@dregis.com> wrote in
> news:3B4C238C.625F5EDC@dregis.com:
>
>>> Is there a way of finding out the ethernet mac address of an
>>> ethernet interface without having to look at arp caches??
>>
>> ifconfig *as root*
>
> i wonder it could be done by going into the eeprom and typing 'banner'
> that should spit out a few statistics about the machine arch., amount of
> ram, and I think mac address too. I may be wrong, by you can try it...
Given
$ prtconf -pv|grep idprom:
idprom: 01830003.ba04ae0e.000003ba.04ae0e82.00000000.00000000.00000000.00000000
MAC address 0:3:ba:4:ae:e, hostid, 8304ae0e, Sun Blade 100
(note the parts of the idprom string that contains the MAC address and
hostid)
01830003.ba04ae0e.000003ba.04ae0e82.00000000.00000000.00000000.00000000
m5m4 m3m2m1m0 m5m4m3 m2m1m0
h3 h2h1h0 h2h1h0
and on another system,
MAC address 8:0:20:a:25:32, hostid 52002976, SPARCstation IPC
01520800.200a2532.26c47775.002976d9.00000000.00000000.a5a5a5a5.a5a5a5a5
m5m4 m3m2m1m0
h3 h2h1h0
and another,
MAC address 8:0:20:11:fb:29, hostid 72601d31, SPARCstation 10
01720800.2011fb29.2abe0691.601d31d7.55555555.55555555.55010055.55555555
m5m4 m3m2m1m0
h3 h2h1h0
and another,
MAC address 8:0:20:1c:2f:df, hostid 8070ace6, SPARCstation Voyager
01800800.201c2fdf.2db54231.70ace694.55555555.55555555.55555555.55555555
m5m4 m3m2m1m0
h3 h2h1h0
one might just begin to suspect a pattern here...
Of course, I have no idea whether anything similar would hold for x86
(which has no IDPROM, after all), and I suppose it might not hold on
some present or future models even on SPARC, but it is something.
Or one could scrounge for a program that does some DLPI stuff, but that
would have to be setuid to access the device file for the interface to be
able to get the MAC address. (check the news archives, I know such
programs are out there)
Or one could have lots of money and lobby for the SIOCGENADDR ioctl to be
implemented, but I wouldn't hold my breath.
BTW, if the top bit of the hostid is not on, the top nybble encodes the
architecture and the entire top byte encodes the model (see sys/cpu.h on
Solaris 7 or earlier; if the top bit _is_ on, that info is to be obtained
elsewhere (and that information apparently wasn't something you were
supposed to depend on anyway, so it's gone in Solaris 8, but probably at
least mentioned in the NVRAM/hostid FAQ, since if restoring the hostid,
you need to get that byte right for sure).
This whole stinkin' subject needs to be a FAQ if it isn't already, it
certainly comes up often enough...
--
mailto:rlhamil@mindwarp.smart.net http://www.smart.net/~rlhamil