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

Re: laptop restart eth0 automatically on plugin or on awake like a desktop



On Thu 09 Jun 2011 at 21:24:40 -0400, Tom H wrote:

> On Thu, Jun 9, 2011 at 12:48 PM, Brian <ad44@cityscape.co.uk> wrote:
>>
> > 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".

In which case it is not working here.

   root@dektop3:~# cat /etc/network/interfaces
   auto lo
   iface lo inet loopback

   allow-hotplug eth0
   iface eth0 inet static
           address 192.168.7.30
           netmask 255.255.255.0
           network 192.168.7.0
           broadcast 192.168.7.255
           gateway 192.168.7.1

Boot with cable attached. (Although it makes no difference to the
ifconfig output if there is no cable).

   root@dektop3:~# ifconfig
   eth0      Link encap:Ethernet  HWaddr 00:0c:76:b3:b4:ca
             inet addr:192.168.7.30  Bcast:192.168.7.255  Mask:255.255.255.0
             inet6 addr: fe80::20c:76ff:feb3:b4ca/64 Scope:Link
             UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
             RX packets:71 errors:0 dropped:0 overruns:0 frame:0
             TX packets:23 errors:0 dropped:0 overruns:0 carrier:0
             collisions:0 txqueuelen:1000
             RX bytes:9601 (9.3 KiB)  TX bytes:1454 (1.4 KiB)
             Interrupt:23 Base address:0xe400

   lo        Link encap:Local Loopback
             inet addr:127.0.0.1  Mask:255.0.0.0
             inet6 addr: ::1/128 Scope:Host
             UP LOOPBACK RUNNING  MTU:16436  Metric:1
             RX packets:12 errors:0 dropped:0 overruns:0 frame:0
             TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
             collisions:0 txqueuelen:0
             RX bytes:656 (656.0 B)  TX bytes:656 (656.0 B)

Remove cable.

   root@dektop3:~# dmesg | tail -n 1
   [  158.220270] via-rhine 0000:00:12.0: eth0: link down

   root@dektop3:~# ifconfig
   eth0      Link encap:Ethernet  HWaddr 00:0c:76:b3:b4:ca
             inet addr:192.168.7.30  Bcast:192.168.7.255  Mask:255.255.255.0
             inet6 addr: fe80::20c:76ff:feb3:b4ca/64 Scope:Link
             UP BROADCAST MULTICAST  MTU:1500  Metric:1
             RX packets:92 errors:0 dropped:0 overruns:0 frame:0
             TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
             collisions:0 txqueuelen:1000
             RX bytes:12143 (11.8 KiB)  TX bytes:1538 (1.5 KiB)
             Interrupt:23 Base address:0xe400

   lo        Link encap:Local Loopback
             inet addr:127.0.0.1  Mask:255.0.0.0
             inet6 addr: ::1/128 Scope:Host
             UP LOOPBACK RUNNING  MTU:16436  Metric:1
             RX packets:12 errors:0 dropped:0 overruns:0 frame:0
             TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
             collisions:0 txqueuelen:0
             RX bytes:656 (656.0 B)  TX bytes:656 (656.0 B)

eth0 is not brought down and also retains its IP address.


Reply to: