Re: 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
Reply to: