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

Re: persistent interface

> My problem has to do with the network interfaces. My
> /etc/network/interfaces file looks like this:
>    # The loopback interface
>    # automatically added when upgrading
>    auto lo
>    iface lo inet loopback
>    # For the built-in NIC:
>    iface eth0 inet dhcp
>    # For the wireless card
>    # 
>    iface eth1 inet dhcp
>    mapping hotplug
>    script echo

It looks as if you are under the impression that "mapping" is an
option for "iface eth1 inet dhcp".  Actually it should be a
separate stanza.  Here is your file reformatted to show the
effective structure better:

    # Physical interfaces to bring up at boot time
    auto lo
    # Mappings
    # Bring up hot plugged interfaces with logical interface name
    # the same as their physical interface name
    mapping hotplug
    script echo
    # Logical interface lo
    # The logical interface as which the loopback interface is brought up
    iface lo inet loopback
    # Logical interface eth0
    # The logical interface as which the built-in NIC eth0 is brought up
    iface eth0 inet dhcp
    # Logical interface eth1
    # The logical interface as which the Wi-Fi card is brought up
    iface eth1 inet dhcp

> I think that this should bring up only the loopback interface at
> boot-time.

Strictly speaking, this means that only the loopback interface "lo"
is brought up by /etc/rcS.d/S40networking.

Other interfaces can be brought up while the system is booting 
via the hotplug mechanism.  Your stanza

    mapping hotplug
    script echo

enables this mechanism.

> Eth1 (pcmcia wireless card) should be brought up when the
> hotplug system detects an insertion, and eth0 (associated with the
> built-in NIC) should be brought up only when ifup is executed. 
> And indeed when I do:
>    /etc/init.d/networking stop
>    /etc/init.d/networking start
> after the boot process, this is exactly what happens.


> The problem, though, is that at boot-time, the system always tries to
> bring up eth0 (which corresponds to the built-in NIC).

The kernel detects the interface and calls hotplug to notify user space
that the interface is available.

> suggests that the attempt to bring up eth0 is triggered by loading of
> the driver module (8139too), and indeed lsmod reports that this module
> is loaded by the end of the boot process.


> What I *cannot* for the life of me figure out is why this is
> happening. I've been all through the directory /etc/modprobe.d/ and
> there's no reference there to either 8139too or eth0. I've run
> update-modules to make sure that there was no ancient module
> configuration haunting the system. There is no reference to either
> 8139too or to eth0 in /lib/modules/modprobe.conf.
> Can anyone tell me where else I could look to pin this down and figure
> out why it is happening?

I don't know who is loading the module, sorry.

However, you can prevent eth0 from being ifup'ped via the hotplug
mechanism by changing the mapping stanza to this:

    mapping hotplug
    script grep
    map eth1

Then only eth1 will be brought up on hotplug.
Thomas Hood
A man does not show his greatness by being at one extremity,
but rather by touching both at once.    -- Pascal

Reply to: