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

Re: LNE100TX lan card detected as eth2



[ I am putting this back on the list. If you email client does not have
  a reply-to-list function then you can use reply-to-all, delete the
  email address of the poster and shift the debian-user address from
  "Cc:" to "To:". ]

  ----- Forwarded message from Charles Roberts -----

> From: Charles Robertsd
> To: Florian Kulzer
> Subject: Re: LNE100TX lan card detected as eth2
> Date: Tue, 05 Jun 2007 14:44:33 -0400
> 
> Florian Kulzer wrote:
>> On Mon, Jun 04, 2007 at 21:14:59 -0400, Charles Roberts wrote:
>>> system: etch
>>> I installed a new lan card(Linksys model LNE100TX). The system detected 
>>> it and installed the tulip module but the network was not working. I 
>>> executed "ifconfig -a" and it showed the new lan card as eth2 ( the mac 
>>> address was the new lan card) . It should have been eth0. 
>>> /etc/udev/rules.d/z25_persistent-net.rules also showed the new lan card 
>>> as eth2 instead of eth0. By switching eth0 and eth2 around I was able to 
>>> get the network to work again.
>>>
>>> Is this a bug?
>> Do you have an eth1 device in your computer? (This can also be a
>> firewire port, for example.) If you do then it is normal for udev to
>> choose the next free device name, i.e. eth2.
>> Or do you ask this question because you expected that the new card would
>> become eth0 automatically? (In that case I am assuming that you removed
>> the old card before you put in the new one.) To me it seems more
>> sensible that udev does not mess with existing rules - after all, the
>> administrator might have customized them - but that is certainly a
>> matter of personal taste. Keep in mind, though, that changing names of
>> network interfaces have been a source of problems when the system
>> reboots during installation, therefore it is not too surprising if udev
>> first and foremost tries to maintain consistency in the assignment of
>> device names to mac addresses.
>>> Is this the correct way to get my network working again?
>> Yes, it is. If you know that you will never use the old card again then
>> you can comment out or even delete the obsolete rule. It should do no
>> harm if you leave it in the file, though.
> It will make a difference. Even though a line is commented out the crazy 
> program still computes it as an ethx. If I have 2 lines: one line for eth0 
> and one line for eth1 (both commented out) and I reboot, the program makes 
> a new line and names it eth2!
>
> Charles

  ----- End forwarded message -----

As far as I know, /etc/udev/rules.d/z45_persistent-net-generator.rules
is supposed to make sure that every network device has a naming rule in
/etc/udev/rules.d/z25_persistent-net.rules. Therefore it will continue
to add new rules if you comment out the existing ones without removing
the card(s) to which they belong. The fact that it seems to consider
device names in commented-out rules as occupied (if I understand you
correctly) might indeed be a bug or a deliberate design decision; I
simply don't know.

If you decide on your preferred numbering of the network devices and
make sure that every card has exactly one active rule in
z25_persistent-net.rules then you should have a stable situation. If
this is not the case you should probably file a bug report against udev.

-- 
Regards,            | http://users.icfo.es/Florian.Kulzer
          Florian   |



Reply to: