How to test when ether is initialized?


How can I test for the ether driver being initialized?

On startup, I’m running:
Net &
Net.ether21x4x &
Socket …

If I immediately start pinging another machine, I notice that it can take up to 30sec before a ping will go through. However, another machine (with a different ether card) will initialize in about 2sec.

I thought about pinging another machine, and waiting for the ping to return, but I can’t guarantee that the other machine will be up when I reboot this machine.

I could just add a “sleep 45”, but I don’t want to wait if I don’t have to. I have about 400 machines that I’m responsible for, and they have different ether cards (some using other chipsets than 21x4x).


You could check the output of the following commands as they may provide an indicator of Ethernet readiness:
netinfo -l ← (Check Media Rate) (maybe it takes some time to auto detect the link speed)
ifconfig en1

From the commands you’ve posted it appears that you do not use DHCP to assign IP’s is this correct?

Thanks for the reply.

That is correct, I am not using DHCP.