Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-04-2010, 02:26 AM
|
#1
|
Member
Registered: Oct 2008
Posts: 48
Rep:
|
NIC Card Mapping
Hi all,
I have two NIC cards in my system. However, NIC1 is assigned to eth1 and NIC2 is assigned to eth0. Beside manually swap MAC address from /etc/udev/rules.d/70-persistent-net.rules to make it change NIC1 to eth0 and NIC2 to eth2, there is another way? When and where the system detect the nic card at boot up and assign to the port? I am running Fedora 10. Thanks in advance.
|
|
|
02-04-2010, 02:44 AM
|
#2
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
I don't know what you have against udev, but if you the two nics use different drivers, you would try modprobe'ing the drivers in the order that you want the devices named. Another option is a tool called ifrename: that is what I used to use back in the dark ages.
Evo2.
|
|
|
02-04-2010, 02:46 AM
|
#3
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
I just reread your post:
Quote:
Beside manually swap MAC address from /etc/udev/rules.d/70-persistent-net.rules
|
Using udev in this way does *not* swap your mac address.
Evo2.
|
|
|
02-04-2010, 05:42 AM
|
#4
|
Member
Registered: Oct 2009
Location: South America - Paraguay
Distribution: Debian 5 - Slackware 13.1 - Arch - Some others linuxes/*BSDs through KVM and Xen
Posts: 329
Rep:
|
The udev way is the easiest one, it can't get easier than that. Just edit a text file, and reboot (rebooting perhaps not needed?). Or you're looking for a point-and-click interface for that?
|
|
|
02-04-2010, 06:44 AM
|
#5
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
Just restarting udev should be enough.
Cheers,
Evo2
|
|
|
02-04-2010, 10:51 AM
|
#6
|
Member
Registered: Oct 2008
Posts: 48
Original Poster
Rep:
|
Quote:
Originally Posted by evo2
I just reread your post:
Using udev in this way does *not* swap your mac address.
Evo2.
|
What I am saying is modify etc/udev/rules.d/70-persistent-net.rules how it's eth order to MAC address. I also have to modify ifcfc-eth file to the right MAC address that was assign in 70-persistent-net.rules file.
|
|
|
02-04-2010, 06:30 PM
|
#7
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.x
Posts: 18,434
|
Set the MAC addresses in the eth cfg files. What distro is this?
|
|
|
02-05-2010, 02:11 AM
|
#8
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
Quote:
Originally Posted by nodopro
What I am saying is modify etc/udev/rules.d/70-persistent-net.rules how it's eth order to MAC address. I also have to modify ifcfc-eth file to the right MAC address that was assign in 70-persistent-net.rules file.
|
Sorry, I don't follow what you are talking about. What are you trying to do related to the mac address? Are you spoofing the mac address with calls like?
Code:
ifconfig eth0 hw ether 00:11:22:33:44:55
If so, this is unrelated to the udev rule which should be run before the above and use the real mac address of the device.
Evo2.
|
|
|
02-06-2010, 02:17 AM
|
#9
|
Member
Registered: Oct 2008
Posts: 48
Original Poster
Rep:
|
I finally use ifrename with specific config. The reason I like to setup this way is because I am going to setup multiple units having the same hardware. Thanks all for your comments and suggestions.
-nodopro
|
|
|
All times are GMT -5. The time now is 11:52 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|