[TriLUG] reliably get network devices

Kevin Hunter hunteke at earlham.edu
Tue Jun 24 05:49:41 EDT 2008


Hello List,

I'm looking for a method or tool to give me a reliable and repeatable
view of the NICs on varying systems.  That is, I know what my NICs are
on my laptop because I individually checked out the machine when I first
installed the OS, but I no longer have the luxury of manually checking
the hardware.

With my project du-jour, I install my OS (either on boot or very
frequently) on my hardware or VMware, and need it to detect the network.
 The problem is that I do not get the same results for the NICs every
time, even on the same hardware or even across bootups of installed
instances.  For example, sometimes the mobo will have 2 NICs, and the
order in which the OS sees them is variable.  So eth0 is sometimes eth1
and vice-versa.  On another box, it'll be a similar scenario, but with
ath*, or ra*.

My current method is to grep the dmesg output, but this doesn't *feel*
like the right way and still doesn't give me a repeatable order.  (And
how I feel is very important! ;-) )  Is there a standard methodology for
this?

Thanks,

Kevin



More information about the TriLUG mailing list