How are device names assigned to eth devices?



I have an Agere Ethernet card with the et131x driver, which works.
However I am confused as to the device naming. I had it listed as
alias eth0 eth131x
in /etc/modprobe.conf
( with also an alias eth1 ipw3945 for the wireless). The eth131x would be
loaded first as shown in dmesg. and then the ipw3945 which was assigned the
device number eth1. But eth0 did NOT correspond to the eth131x device.
I later replaced that line with
alias eth2 eth131x
with an equivalent /etc/sysconfig/network-scripts/ifcfg-eth2 file
and now loh and behold, everything worked and the ethernet et131x came up at eth2
on bootup. Why in the world did eth0 not work? How are device numbers
assigned? and why is there no eth0 anywhere?

What routine is it that determines the numbering ( and naming) of the
devices-- ie assigns eth2 say to this device?

Thanks.

.