[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SOLVED] nic issue on Debian Lenny



On Mon, 29 Mar 2010 08:17:53 -0400 (EDT), Roman Gelfand wrote:
> On Fri, Mar 26, 2010 at 10:55 AM, Stephen Powell wrote:
>> On Thu, 25 Mar 2010 23:16:59 -0400 (EDT), Roman Gelfand wrote:
>>>
>>> My server has two onboard nics.  I am using etho.  For the longest
>>> time it was working no problem.  Then it just lost network
>>> connectivity.    When running ifconfig I get RX packets:0.
>>>
>>> Would any one know a way to fix it?  I had similar problem with
>>> centos.  The solution there was to assign eth1 device to alias eth0.
>>
>> Each network adapter (I assume they are both ethernet) has a
>> MAC (Media Access Control) address built-in to it.  This MAC
>> address is assigned by the manufacturer when the board is made, and
>> is unique to that physical board.  Another board of that same identical
>> make and model will have a different MAC address.  Linux uses this MAC
>> address to uniquely identify Ethernet adapters.  udev creates rules to
>> determine which MAC address to assign to eth0, which MAC address to assign
>> to eth1, etc.  These rules are stored in directory /etc/udev/rules.d.
>> The exact name of the file to look at is dependent on the machine
>> architecture and which release of udev you have, but
>> "persistent-net" is the key phrase to look for.  On my Debian Lenny
>> machine for the i386 architecture, the file is called
>> 70-persistent-net.rules.
>>
>> Typically, this type of problem happens
>> when one of the ethernet adapters is replaced.  In the case of an
>> ethernet adapter built-in to the motherboard, that would mean
>> that the motherboard gets replaced.  Or sometimes it happens
>> as the result of moving a hard drive from one computer to another,
>> which, as viewed by the operating system stored on that hard drive,
>> means that the NICs changed.  In the case of a stand-alone NIC
>> you can move the old NIC to the new machine, but in the case of
>> a NIC built-in to the motherboard, you would need to swap motherboards
>> to keep the MAC address the same, and most people don't do that.
>>
>> In any event, the solution is to edit that file
>> (/etc/udev/rules.d/70-persistent-net.rules) and change the MAC
>> addresses in that file according to which one you want to be eth0
>> and which one you want to be eth1.  In the case of a computer
>> with only one network connection, I usually advise people to erase
>> that file, it which case it will be regenerated at the next boot
>> with eth0 assigned to the one and only MAC address.  But in the
>> case of multiple adapters, I advise people to edit the file.
>>
>>   ifconfig -a
>>
>> will show you the MAC addresses of the cards currently present
>> in the machine (look for "HWaddr").  Compare that to the MAC
>> addresses in /etc/udev/rules.d/70-persistent-net.rules.  From
>> that you should be able to figure out which MAC address belongs
>> to the old card that is no longer installed and which "device"
>> it used to be.  Change the entry for the new card to match that
>> device name and delete the entry for the old MAC address.  Then,
>> shutdown and reboot.
>>
> 
> Thanks you.  That has worked great for me.

You're welcome.  I'm glad you got it working.

-- 
  .''`.     Stephen Powell    <zlinuxman@wowway.com>
 : :'  :
 `. `'`
   `-


Reply to: