eth0 / eth1 : how is it decided?
I installed linux on a computer then put the hard drive on another computer that should be exactly the same. However the interface was changed from eth0 to eth1.
1) can I make them eth0 on both? because I would like to be able to switch... 2) I want the interface to be 172.16.0.1. Can I configure both eth0 and eth1 in /etc/network/interfaces to be this static IP or will it conflict? Actually this one is more important than previous question? |
hi
1) Was there another NIC on that other computer (IE integrated)? 2) I would say no. You could do this but they would have to be connected to two physically different networks, but if they are connected to the same one then no, it will cause a conflict |
1) What do you mean by "another NIC"? Another brand? The computers are the same. Probably the only difference at that point is the serial number of the parts, and the MAC address of the cards. Can it be that since eth0 was assigned to the interface with MAC address MAC1, so when it encountered the interface on the other computer with MAC address MAC2 it assigned it eth1?
2) Since the 2 computers don't co-exist it will not conflict on the network side. I am worried about the system complaining that 2 interfaces have the same address... But this I can simply try... |
eth0/eth1, decided by udev
Quote:
Hello I had a similar problem , when re installing my debian lenny . I do not remember the exact name of the file , but i guess the solution, is in the udev configuration rules files .(i think it's /etc/udev/rules/ I found a file which associate the interface name (eth0 eth1 etc..) with the mac address . to find this file a grep -R eth0 /etc/udev/* should do the trick . |
My guess is that HAL and UDEV saved information on eth0 including the MAC address (persistant network device naming). The MAC differs on the second host so the system created a new ifcfg-<dev> for it. This comes in handy if you have a pcmcia NIC device. You could plug in one card for work and another one for home and you don't need to reconfigure the network setup, just change NIC cards.
Also check for these files: /etc/udev/rules.d/70-persistent-net.rules /etc/udev/rules.d/75-persistent-net-generator.rules Code:
# This file was automatically generated by the /lib/udev/write_net_rules The easiest way to deal with it may be to run your network configuration program and delete the interfaces and start over. Make sure you change the hostname so that it is unique. If you have static IPs, the two hosts must have different IPs as well. |
All times are GMT -5. The time now is 10:40 PM. |