Results 1 to 10 of 19
OS: SLES 10
One nic installed
# hwinfo --netcard
.
.
.
Device File: eth2
.
.
how can I change "eth2" to "eth0"
Regards
Needee...
- 04-24-2007 #1Linux Newbie
- Join Date
- Feb 2007
- Posts
- 248
how to change ethX to ethY
OS: SLES 10
One nic installed
# hwinfo --netcard
.
.
.
Device File: eth2
.
.
how can I change "eth2" to "eth0"
Regards
Needee
- 04-25-2007 #2Linux Newbie
- Join Date
- May 2006
- Location
- Kansas
- Posts
- 187
It looks like you probably have two other network adapters in your computer. Linux names them starting with eth0, then eth1, etc. as it finds the adapters. If your wireless is eth2, you can't rename it to eth0 because that already exists. The only way that I've ever been able to "rename" them, is to physically remove the first two.
- 04-26-2007 #3Linux Newbie
- Join Date
- Feb 2007
- Posts
- 248
Thanks Kahoona for help, and sorry for replying late.
>It looks like you probably have two other network adapters in your computer.
no I once had, but remove the all other NICs, else this "eth2".. so what I want is that, this eth2, becomes eth0
>The only way that I've ever been able to "rename" them, is to physically remove the first two.
i dont agree with you dear, because, as I have said that I have removed other NICs, but still this remaining, and alone NIC exist in the system as "eth2"
Anyways thanks for help/reply
Regards
Needee
- 04-26-2007 #4Linux Newbie
- Join Date
- May 2006
- Location
- Kansas
- Posts
- 187
Ahhh..... so you had other NICs that you removed. That makes it different. You need to remove all the NICs from your configuration and then reboot. The remaining NIC should be found and return as eth0. I'm not sure how to remove adapters from the configuration on Linux though.
- 04-27-2007 #5Linux Newbie
- Join Date
- Feb 2007
- Posts
- 248
kahoona ... once again thanks for the reply/help
Regards
- 04-30-2007 #6Linux Newbie
- Join Date
- Feb 2007
- Posts
- 248
say you have two nics installed on the system, eth0, and eth1.
At some times latter, you removed eth0 from the system.
Now eth1 is the only nic in your machine... and you want to rename this nic(eth1) as eth0.
following are the steps:
# rcnetwork stop
# vi /etc/udev/rules.d/30-net_persistent_names.rules
here you find a line as
SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:02:b3:22:84:f3", IMPORT="/lib/udev/rename_netiface %k eth1"
simply change eth1, as eth0,
SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:02:b3:22:84:f3", IMPORT="/lib/udev/rename_netiface %k eth0"
save and exit
Now execute the following command
# /lib/udev/rename_netiface <old> <new>
i.e
# /lib/udev/rename_netiface eth1 eth0
# rcnetwork start
DONE
even we can give any valid name to our nic, say e.g we want to name our eth0 as lan0, then
# rcnetwork stop
# vi /etc/udev/rules.d/30-net_persistent_names.rules
here you find a line as
SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:02:b3:22:84:f3", IMPORT="/lib/udev/rename_netiface %k eth0"
simply change eth1, as lan0,
SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:02:b3:22:84:f3", IMPORT="/lib/udev/rename_netiface %k lan0"
Now execute the following command
# /lib/udev/rename_netiface eth0 lan0
NOTE:
say we gave our nic a name as lanX, nicX, or intX(i.e non ethX name), and then want to change the name from lan0 to eth0, all the above steps are required, and reboot too.
Regards
Needee
- 05-06-2007 #7Just Joined!
- Join Date
- May 2007
- Posts
- 1
needee,
Thanks a lot!!!
Looking for this for hours....
- 06-20-2007 #8Just Joined!
- Join Date
- Jun 2007
- Posts
- 1
Needee,
This answer helped me a lot as well thank you very much!
Cheers,
Lucas
- 06-21-2007 #9Linux Newbie
- Join Date
- Feb 2007
- Posts
- 248
My Pleasure
- 06-29-2007 #10Linux Newbie
- Join Date
- Feb 2007
- Posts
- 248
I also have post this TIP on novell coolsolutions ....
Cool Solutions: Renaming a NIC
[ SO PLZ RATE THIS TIP .. thanx in anticipation
]
Greedee
Needee


Reply With Quote