FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 06-07-2011, 04:10 AM
Mitchell Laks
 
Default laptop restart eth0 automatically on plugin or on awake like a desktop

Hi,

The following is a problem I have on all laptops, I dont know how to configure to connect when the ethernet cable is attached.

I have an ibook laptop (it is a powerpc system running squeeze) and when i plug in the ethernet cord I find that I have to log into a terminal or console
and become superuser and

run ifdown eth0;
ifup eth0

to get connectivity to my local lan.

I have a stanza in the /etc/network/interfaces that configures the eth0.

Now I have many desktop machines and there whenever I plug in an ethernet card it automatically starts and configures eth0
without any manual intervention. "Magically" my kernel puts a message to my console
for instance

skge eth0: Link is down
or a message
skge eth0: Link is up at 100Mbps. full duplex, flow control both

Now the Laptop seems to be having assigning control of this to pm-utils on the laptop.

How to configure it to automatically connect via eth0 if i plug it in, or if it is connected and the machine is reawoken from hibernation?

This is on laptops I try that I have this problem.

Thanks
Mitchell Laks



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110607041048.GA22745@earthlink.net">http://lists.debian.org/20110607041048.GA22745@earthlink.net
 
Old 06-07-2011, 04:30 AM
William Hopkins
 
Default laptop restart eth0 automatically on plugin or on awake like a desktop

On 06/07/11 at 12:10am, Mitchell Laks wrote:
> Hi,
>
> The following is a problem I have on all laptops, I dont know how to
> configure to connect when the ethernet cable is attached.
>
> I have an ibook laptop (it is a powerpc system running squeeze) and when i
> plug in the ethernet cord I find that I have to log into a terminal or
> console and become superuser and run
>
> ifdown eth0;
> ifup eth0
>
> to get connectivity to my local lan.
>
> I have a stanza in the /etc/network/interfaces that configures the eth0.
>
> Now I have many desktop machines and there whenever I plug in an ethernet
> card it automatically starts and configures eth0 without any manual
> intervention. "Magically" my kernel puts a message to my console for instance
>
> skge eth0: Link is down
> or a message
> skge eth0: Link is up at 100Mbps. full duplex, flow control both

Are you not seeing these messages on laptops? This is the ethernet driver
reporting link status. Your ethernet is NOT configured automatically by this
(although some service may detect it and configure accordingly).

> Now the Laptop seems to be having assigning control of this to pm-utils on the laptop.

Hmm? pm-utils is for hibernating/suspending, not ethernet control.

> How to configure it to automatically connect via eth0 if i plug it in, or if
> it is connected and the machine is reawoken from hibernation?

You may need to blacklist your ethernet driver for pm-utils if it isn't coming
up properly after hibernate/suspend. Try adding
SUSPEND_MODULES="your_module_name" to a file in /etc/pm/config.d/

--
Liam
 
Old 06-07-2011, 11:39 AM
Camaleón
 
Default laptop restart eth0 automatically on plugin or on awake like a desktop

On Tue, 07 Jun 2011 00:10:48 -0400, Mitchell Laks wrote:

> The following is a problem I have on all laptops, I dont know how to
> configure to connect when the ethernet cable is attached.

(...)

Maybe you just need to tweak some options in your "interfaces" file
(e.g., "allow-hotplug"?):

http://www.debian.org/doc/manuals/reference/ch05.en.html#list-of-stanzas-in-eni

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2011.06.07.11.39.05@gmail.com">http://lists.debian.org/pan.2011.06.07.11.39.05@gmail.com
 
Old 06-07-2011, 11:03 PM
Mitchell Laks
 
Default laptop restart eth0 automatically on plugin or on awake like a desktop

On 11:39 Tue 07 Jun , Camaleón wrote:
> On Tue, 07 Jun 2011 00:10:48 -0400, Mitchell Laks wrote:
>
> > The following is a problem I have on all laptops, I dont know how to
> > configure to connect when the ethernet cable is attached.
>
> (...)
>
> Maybe you just need to tweak some options in your "interfaces" file
> (e.g., "allow-hotplug"?):

That was it! I replaced

allow-hotplug eth0

at the top of the stanza by

auto eth0

and now it works fine!
thank you very much.


(don't understand why though ...)
http://www.debian.org/doc/manuals/reference/ch05.en.html#list-of-stanzas-in-eni

refers to man 5 interfaces
which doesn't seem to explain what software is doing the work after the plugin of the ethernet cord...
and only if auto and not
allow-hotplug eth0

does anyone know?

>
> http://www.debian.org/doc/manuals/reference/ch05.en.html#list-of-stanzas-in-eni
>
> Greetings,
>
> --
> Camaleón
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: http://lists.debian.org/pan.2011.06.07.11.39.05@gmail.com
>


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110607230328.GA29340@earthlink.net">http://lists.debian.org/20110607230328.GA29340@earthlink.net
 
Old 06-08-2011, 11:58 AM
Camaleón
 
Default laptop restart eth0 automatically on plugin or on awake like a desktop

On Tue, 07 Jun 2011 19:03:28 -0400, Mitchell Laks wrote:

> On 11:39 Tue 07 Jun , Camaleón wrote:
>> On Tue, 07 Jun 2011 00:10:48 -0400, Mitchell Laks wrote:
>>
>> > The following is a problem I have on all laptops, I dont know how to
>> > configure to connect when the ethernet cable is attached.
>>
>> (...)
>>
>> Maybe you just need to tweak some options in your "interfaces" file
>> (e.g., "allow-hotplug"?):
>
> That was it! I replaced
>
> allow-hotplug eth0
>
> at the top of the stanza by
>
> auto eth0
>
> and now it works fine!
> thank you very much.

Nice :-)

> (don't understand why though ...)
> http://www.debian.org/doc/manuals/reference/ch05.en.html#list-of-stanzas-in-eni
>
> refers to man 5 interfaces
> which doesn't seem to explain what software is doing the work after the
> plugin of the ethernet cord... and only if auto and not
> allow-hotplug eth0
>
> does anyone know?

Well, "man 5 interfaces" is mentioned here so that the user can know what
options can be used in this file, not just the "stanzas".

In regards with the software behind "auto" and "allow-hotplug" I'm afraid
is the same beast (udev) but it has a different behaviour. AFAIK, "auto"
configures the interface at booting while "allow-hotplug" sets the
interface as soon as it receives a kernel event like "ifupdown", that is,
forced by the user. I can see its use for laptops or devices with
multiple interfaces where you only want one of them (wifi) is up by
default (at boot) and the rest (eth0, ppp0...) remain deactivated unless
the user manually starts them.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2011.06.08.11.58.42@gmail.com">http://lists.debian.org/pan.2011.06.08.11.58.42@gmail.com
 
Old 06-09-2011, 11:25 PM
Nico Kadel-Garcia
 
Default laptop restart eth0 automatically on plugin or on awake like a desktop

On Tue, Jun 7, 2011 at 7:03 PM, Mitchell Laks <mlaks@post.harvard.edu> wrote:
> On 11:39 Tue 07 Jun * * , Camaleón wrote:
>> On Tue, 07 Jun 2011 00:10:48 -0400, Mitchell Laks wrote:
>>
>> > The following is a problem I have on all laptops, I dont know how to
>> > configure to connect when the ethernet cable is attached.
>>
>> (...)
>>
>> Maybe you just need to tweak some options in your "interfaces" file
>> (e.g., "allow-hotplug"?):
>
> That was it! I replaced
>
> allow-hotplug eth0
>
> at the top of the stanza by
>
> auto eth0
>
> and now it works fine!
> thank you very much.

allow-hotplug is supposed to allow plugging, and auto-activating,
network devices. It's potentially useful for laptops that will be
moved around and reconnected, but in most uses, it's inappropriate and
undesirable.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BANLkTim9ZBUj3OLamRVQ=5zYJKFvrvg1-g@mail.gmail.com">http://lists.debian.org/BANLkTim9ZBUj3OLamRVQ=5zYJKFvrvg1-g@mail.gmail.com
 
Old 06-10-2011, 01:24 AM
Tom H
 
Default laptop restart eth0 automatically on plugin or on awake like a desktop

On Thu, Jun 9, 2011 at 12:48 PM, Brian <ad44@cityscape.co.uk> wrote:
> On Wed 08 Jun 2011 at 19:02:43 +0000, Camaleón wrote:
>>
>> Hum... I don't rebember nothing about dhcp or static addressing but
>> something about plugging/unplugging the ethernet cable and after that no
>> interface coming up.
>
> Why would plugging or unplugging the ethernet cable be expected to
> bring the interface up or down?

That's the whole point of "allow-hotplug".


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BANLkTik4vcha-X0PO_CO9-54QJEQs2YitA@mail.gmail.com">http://lists.debian.org/BANLkTik4vcha-X0PO_CO9-54QJEQs2YitA@mail.gmail.com
 
Old 06-10-2011, 02:55 AM
Mitchell Laks
 
Default laptop restart eth0 automatically on plugin or on awake like a desktop

I hope that

you all realize I am not replying to this correspondent, but rather following up the thread.

I am __not__ using dhcp. This is not a dhcp problem.

I use static IP addresses on all of my ethernet cabled networks.

I have approximately 100 different debian machines in multiple locations. They all have
auto etho in them. I usually install from an old script that writes /etc/network/interfaces.

Just this laptop still had allow-hotplug in it since it was a recent reinstall...

There would something wrong with allow-hotplug if it requires you to manually intervene to bring down and then up an interface
after you plug in and you are already configured for a static address (or dhcp for that matter) in /etc/network/interfaces. Or
after a reawaken from hibernation.

I notice that I must do
ifdown eth0
then
ifup eth0

ifup eth0 alone will not work. (weird?).

I now seem to recall having a problem (perhaps this?) with allow-hotplug many years ago and I switched to auto eth0 at that time.

I have to say that I dont know (and sadly no one here has told us) how this affects the system in /etc/network/interfaces.
And what really differentiates the different directives.

What program brings up eth0 after I plug in with the auto eth0 directive.

For those who still want the information:

Here is a typical appearance of a /etc/network/interfaces file.

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
#mapping eth0
# script grep
# map eth0

# The primary network interface
#allow-hotplug eth0
auto eth1
iface eth1 inet static
address 192.168.10.151
netmask 255.255.255.0
network 192.168.10.0
broadcast 192.168.10.255
gateway 192.168.10.2



Mitchell


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110610025537.GA4522@earthlink.net">http://lists.debian.org/20110610025537.GA4522@earthlink.net
 

Thread Tools




All times are GMT. The time now is 11:59 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org