From: Michael Tokarev <mjt@tls.msk.ru>
To: Jan Engelhardt <jengelh@computergmbh.de>
Cc: Herbert Rosmanith <kernel@wildsau.enemy.org>,
linux-kernel@vger.kernel.org
Subject: Re: VIA EPIA EK: strange eth dev numbering
Date: Thu, 02 Aug 2007 17:07:20 +0400 [thread overview]
Message-ID: <46B1D708.9040106@msgid.tls.msk.ru> (raw)
In-Reply-To: <Pine.LNX.4.64.0708021347270.24572@fbirervta.pbzchgretzou.qr>
Jan Engelhardt wrote:
> On Aug 2 2007 12:56, Herbert Rosmanith wrote:
>>> On Aug 2 2007 12:42, Herbert Rosmanith wrote:
>>> There never *were* days when eth0 remained eth0 across such changes.
>> but there *were* days when eth0 was eth0, if the kernel reports it as such.
>> now there is no eth0 at all. if I see an "eth0" from dmesg, I expect
>> it to be present.
>
> Wait, you forget that something may change the name. That dmesg message
> from 1 second ago does not need to be valid anymore, just as anything
> else in this world.
That was my argument - there should be no way to *change* the name, but
to give an alias(es) - entirely different thing.
Yes, if a device is replugged during that one second, it's another
at least "instance" of that device - similar to 'ifindex' field in
interface description (not shown by ifconfig but shown by `ip link'),
or to usb endpoint numbers which gets incremented each time one
plug something in.
But as long as the device is connected, it should have the same
name - that's my key point. You may change its aliases as you
wish, but not the "primary name".
[]
>> the problem with this device renaming in my case was that other software,
>> in particular dhcpcd, didnt get any lease, because (obviously?) dhcpcd
>> on the other hand _still_ seemed to look for eth0, and thus, after
>> booting, there was no network configured at all.
>
> So blame your distro for not integrating udev correctly with dhcp-client.
> I can only speak for suse, where you define BOOTPROTO=dhcp for an
> interface. Then, on /etc/init.d/network, every interface that has a
> configuration file gets run, so you never see what ethX udev picked for
> the day, but things still work. That's good^TM.
Again, this is questionable - the integration part, right way to it,
that is.
If - recalling my "naming scheme" with kernel ethX (which may change each
boot or even at runtime, OR may not change at all if I don't replug
devices), and nicN which is based on particular device's MAC address, --
I configured dhcp to listen on eth0, I assume it's the first network
card found by the system, whatever it is. In this case, if I replaced
the card (because previous one was faulty etc), it will continue to
work (provided no other renames was done) without renames done by
udev, and will break with current udev behaviour. But if I configured
dhcp to listen on *this* NIC with *this* serial number and MAC address,
current udev behaviour is right - the system just assumes that this
particular card isn't here (yet?) and hence dhcp shouldn't run on it.
You see - we again have two names - "first interface found by kernel"
and "this particular card with this serial number", and both of them
are useful.
Partially this issue can be solved by - say - kudzu asking for a
name if it finds new hardware (we'll answer it with the name our
replaced card had) - but such behaviour is out of the question
because system startup scripts should not generally ask "random
questions".
/mjt
next prev parent reply other threads:[~2007-08-02 13:07 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-02 10:20 VIA EPIA EK: strange eth dev numbering Herbert Rosmanith
2007-08-02 10:26 ` Michael Tokarev
2007-08-02 10:42 ` Herbert Rosmanith
2007-08-02 10:49 ` Jan Engelhardt
2007-08-02 10:56 ` Herbert Rosmanith
2007-08-02 11:23 ` renaming kernel devices [was: VIA EPIA EK: strange eth dev numbering] Michael Tokarev
2007-08-02 11:47 ` Jan Engelhardt
2007-08-02 12:56 ` Michael Tokarev
2007-08-02 13:30 ` Jan Engelhardt
2007-08-02 13:36 ` Michael Tokarev
2007-08-02 14:37 ` Ondrej Zajicek
2007-08-02 13:43 ` Herbert Rosmanith
2007-08-02 14:51 ` Ondrej Zajicek
2007-08-03 4:45 ` david
2007-08-03 15:12 ` Stefan Richter
2007-08-04 4:33 ` david
2007-08-04 9:16 ` Stefan Richter
2007-08-04 17:06 ` david
2007-08-02 11:47 ` VIA EPIA EK: strange eth dev numbering Jan Engelhardt
2007-08-02 12:00 ` Herbert Rosmanith
2007-08-02 12:06 ` Jan Engelhardt
2007-08-02 13:07 ` Michael Tokarev [this message]
2007-08-02 13:38 ` Jan Engelhardt
2007-08-02 18:37 ` Jan Engelhardt
2007-08-02 22:00 ` Kay Sievers
2007-08-02 22:39 ` Jan Engelhardt
2007-08-02 22:49 ` Kay Sievers
2007-08-03 7:46 ` Jan Engelhardt
2007-08-02 11:12 ` Herbert Rosmanith
2007-08-02 10:44 ` Jan Engelhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46B1D708.9040106@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=jengelh@computergmbh.de \
--cc=kernel@wildsau.enemy.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox