Discussion:
[Sisuite-devel] Regarding Ticket #10
Gaurav Chaudhary
2008-05-02 06:32:47 UTC
Permalink
Hi,

For '''Ticket #10''' we can implement the following line which can fetch us the mac address of the machine:

Command :-

$ /sbin/ifconfig -a| awk ' ($0~/Link encap:Ethernet HWaddr /){print $1"\t" $5}'

Output :-
eth0 00:XX:XX:XX:XX:3E
eth1 00:XX:XX:XX:XX:3D


We can also limit the output to eth0 only.


Thanks and Regards
Gaurav


---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
Andrea Righi
2008-05-02 10:52:38 UTC
Permalink
Post by Gaurav Chaudhary
Hi,
For '''Ticket #10''' we can implement the following line which can fetch
Command :-
$ /sbin/ifconfig -a| awk ' ($0~/Link encap:Ethernet HWaddr /){print $1"\t" $5}'
Output :-
eth0 00:XX:XX:XX:XX:3E
eth1 00:XX:XX:XX:XX:3D
We can also limit the output to eth0 only.
This is ok, but it works only for running clients (already imaged). It
would be great to have a smart way to collect mac addresses also for
fresh clients without any running OS.

Something like the OSCAR approach (see for example
http://www.linuxdevcenter.com/pub/a/linux/2005/02/03/haoscar.html?page=2),
but fully integrated with SystemImager groups, clients and entities
defined by si_clusterconfig.

See also my simple implementation:
http://download.systemimager.org/~arighi/maccollect/si_maccollect

With si_maccollect for example you have to simply poweron your
PXE-booting clients (no OS is needed) in the same order specified by
command line (--hosts) and wait to receive the opportune dhcpd.conf
entries in stdout. The approach is to listen for DHCP requests on the
image server.

Unfortunately this fails in case of hardware failures, for example when
a client doesn't boot, shifting in this way all the address of the next
booting clients.

Maybe a better approch would be to try to ssh on the clients (via
si_psh), collect the available mac addresses by ifconfig and if this
fails try with the DHCP requests listening approach. Anyway this doesn't
resolve the failures above.

Other ideas?

-Andrea

Loading...