[CentOS] pls help about changing network card but assign to another ethx

linux-crazy hicheerup at gmail.com
Fri Feb 5 11:35:53 UTC 2010


Hi,


 Thoght of sharing this with u will be handy

I was upgrading my workstation yesterday, only the case and harddisks
remained the same. Almost everything went well, even new init ramdisk
wasn't required, but I was stuck on networking for a while. And the
problem was called "eth0_rename". After querying google it was clear
that this is the result of "network device persistency" feature and
the cause is different MAC address assigned to the new eth0 device.
Solution was easy - remove the old records from
/etc/udev/rules.d/70-persistent-net.rules




 And add some custom udev mac binding rules like below

 cat /etc/udev/rules.d/10-redhat-custom-net.rules
##Realtek
KERNEL=="eth*", SYSFS{address}=="00:16:3e:66:20:c7", NAME="eth0"
###Accton
KERNEL=="eth*", SYSFS{address}=="00:16:3e:7e:a1:9c", NAME="eth1"



http://www.gscore.org/blog/index.php/post/2008/12/16/udev-hell

Thanks

On Fri, Feb 5, 2010 at 12:51 AM, adrian kok <adriankok2000 at yahoo.com.hk> wrote:
> Hi
>
> I change eth1 from realtek to dlink but the centos is showing eth2 instead of eth1
>
> In another version of linux, I can change 70-persistent-net.rules but
>
> I check /etc/udev/rules.d/70-persistent-net.rules but it doesn't  have the file 70-persistent-net.rules
>
> please help
>
> Thank you
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>


More information about the CentOS mailing list