LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   NIC Card Mapping (https://www.linuxquestions.org/questions/linux-newbie-8/nic-card-mapping-786867/)

nodopro 02-04-2010 02:26 AM

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.

evo2 02-04-2010 02:44 AM

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.

evo2 02-04-2010 02:46 AM

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.

HasC 02-04-2010 05:42 AM

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?

evo2 02-04-2010 06:44 AM

Just restarting udev should be enough.

Cheers,

Evo2

nodopro 02-04-2010 10:51 AM

Quote:

Originally Posted by evo2 (Post 3851964)
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.

chrism01 02-04-2010 06:30 PM

Set the MAC addresses in the eth cfg files. What distro is this?

evo2 02-05-2010 02:11 AM

Quote:

Originally Posted by nodopro (Post 3852580)
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.

nodopro 02-06-2010 02:17 AM

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 07:35 AM.