13 Eylül 2009 Pazar

eth0 switches to eth1

I have an nVidia Corporation MCP65 chipset ethernet card. I was having problems with Pardus's network manager.
On every boot, I had to select network profile manually. After some research, i've seen that eth0 switches to eth1 or eth1 switches to eth0 on every boot.

I decided to investigate what happens when udev initializes the ethernet card. When
dmesg | grep eth is executed on the console,

[ 10.480852] forcedeth: Reverse Engineered nForce ethernet driver. Version 0.64.
[ 10.481261] forcedeth 0000:00:06.0: PCI INT A -> Link[LMAC] -> GSI 20 (level, low) -> IRQ 20
[ 10.481267] forcedeth 0000:00:06.0: setting latency timer to 64
[ 10.481316] forcedeth 0000:00:06.0: Invalid Mac address detected: 00:00:00:00:00:00
[ 10.481319] forcedeth 0000:00:06.0: Please complain to your hardware vendor. Switching to a random MAC.
[ 10.994564] forcedeth 0000:00:06.0: ifname eth0, PHY OUI 0x732 @ 1, addr 00:00:6c:6f:b7:63
[ 10.994578] forcedeth 0000:00:06.0: highdma pwrctl mgmt gbit lnktim msi desc-v3


Hmm. After googling, i've seen that mycard has a problem with getting mac address. Here is my udev rule for the card:


# PCI device 0x10de:0x0450 (forcedeth)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1a:73:03:0f:c1", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

This rule was using card's mac address. When i restart, udev switches to a random mac address and eth0 changes depending on this.
Solution to this problem is to use the id of the card instead of mac address.


# PCI device 0x10de:0x0450 (forcedeth)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ID=="0000:00:06.0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"


And when i restart the system, problem goes away and network manager automatically connects...

Related link,
nvidia-nforce-network-adapter-has-different-mac-adress-every-boot-569576

Hiç yorum yok:

Yorum Gönder