Tiny Core Base > TCB Q&A Forum

unreliable ethernet setup

(1/3) > >>

medvedm:
Hi-

I've run into an interesting situation with TC and I was hoping you guys would have some idea about what is going.  I've got a system with 3 NICs, one on the main board, and two on an expansion board.  The one on the main board is the only one I care about using right now, and I want it to be a static IP (of the 192.168.100.x variety).  So I set it (both with ifconfig and the network app).  It worked fine for a couple of reboots and then it lost the IP.

Except that what happened is that it didn't actually lose the IP.  eth0 was still set as 192.168.100.10, but it suddenly couldn't ping anything any more.  So I looked around in the dmesg log and saw that eth1 was reporting it was up... which shouldn't be possible because nothing is plugged into that port.  Nevertheless, I configured eth1 to be the right IP and was now able to ping everyone.

Is there a way to hard associate an Ethernet adapter with eth0, eth1, or eth2?  That way when the system boots up the right adapter is with the right device and gets the right IP address.

Or have I totally missed something?

curaga:
udev rules. You can assign names by MAC address, for example.

danielibarnes:
Here is a link for writing udev rules for ethernet interfaces.

medvedm:
Thanks, I think this got me what I needed.

medvedm:
Yeah, except I can't seem to make this work right.

I added a file to /etc/udev/rules.d/ called 10-local-network.rules with the following lines:

KERNEL=="eth*", ATTR{address}=="00:20:9d:15:54:72", NAME="eth0"
KERNEL=="eth*", ATTR{address}=="00:d0:81:07:00:36", NAME="eth2"
KERNEL=="eth*", ATTR{address}=="00:d0:81:07:00:37", NAME="eth1"

But, it is still totally random if 72 or 36 gets eth0.  Of course, I added my file to filetool.lst so it gets backed up.

I checked the addresses using udevadm and they are right.

I'm sure I've missed something, help?

Navigation

[0] Message Index

[#] Next page

Go to full version