Gregory Edigarov wrote:
> Hello Everybody,
> 
> Supposing I have several identical NIC's in my server, can I predict 
> which become int0, which become int1, etc?
> 
> A link to document explaining (or man something) would absolutely suffice.
> Thank you.

Not Easily, at least if you are referring to a machine you know nothing
about and haven't powered up yet.  However, it is easy to make simple
tests to find out.

Assuming PCI, they go by order of the slots in the bus, which isn't
something OpenBSD controls.  Many machines have curious orders.
For example, I have a Dell GX1 which has five PCI slots; the order
is something like:  2 3 4 0 1.  (To add insult to injury, I had four
port NICs in every slot, took a while to find dc0! :)

Now, once I know (er.. knew.  The above sequence is from non-ECC and
proven faulty memory!) the pattern of slots in a GX1, I can know which
NIC will get which identifier.

If I put int(4) NICs in slots 3 and 1, the one in slot 1 will be int0,
the one in slot 3 will be int1.  Now, if I move the NIC from slot 1
into slot 4, they will switch IDs.  If I replace the NIC in slot 3
with a NIC of the same type (driver-wise, that is), nothing will
change.  If I remove int0 and replace it with a different driver, int1
will become int0.

How did I identify the slot order in the machine?  Stuck identical NICs
in all slots.  Why did I do that?  Because I stuck three NICs in the
thing and the ordering was not obvious, so I figured I better get to
know this machine better.

In all cases, the dmesg will link your MACs to physical IDs, so stick
the MAC addr on the spine of the card.

In most cases, ifconfig will show you which NICs have link in real time,
so an easy way to identify things is drop to shell, plug in one cable,
run ifconfig and see which has link.  Label.  Move cable, repeat until
done.

None of this is applicable to ISA or USB NICs.  It may be applicable
to other buses and platforms.

Moral:
  1) Know your HW
  2) Label the MAC address on your NICs
  3) Have identical replacement HW in case a non-OpenBSD expert has to
do a swap,
  4) Know how to reconfig your system if you have to change your NICs.
  5) Practice, Practice, Practice
  6) Drop to shell before install, look around.

Nick.

Reply via email to