LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   upgrade kernel: no network. Solution OK? (https://www.linuxquestions.org/questions/linux-networking-3/upgrade-kernel-no-network-solution-ok-909016/)

rdozijn_2 10-19-2011 01:40 PM

upgrade kernel: no network. Solution OK?
 
hello forum,

yesterday I decided to upgrade my linux debian kernel as well as lots of other packages to the squeeze distribution.
Everything went well, until I had to restart my computer. After the computer was up again, I had no network anymore.

On another computer I did some googling because my network knowledge is not the best. With the information I gathered I did

Code:

$ sudo ifconfig
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:146 errors:0 dropped:0 overruns:0 frame:0
          TX packets:146 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:13772 (13.4 KiB)  TX bytes:13772 (13.4 KiB)

So eth0 appeared to be missing. Thanks to google I knew where to look: /etc/network/interfaces. That contained
Code:

# The loopback network interface
auto lo               
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
#NetworkManager#iface eth0 inet dhcp

Some advice said to change 'allow-hotplug' to 'auto'. After doing
Code:

$ sudo /etc/init.d/networking restart
Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces ... (warning).
Reconfiguring network interfaces...Ignoring unknown interface eth0=eth0.
done.

I decided this was a bad idea. Out of google advices I decided to experiment and to uncomment the iface eth0 line. Now it reads
Code:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
#NetworkManager#iface eth0 inet dhcp
iface eth0 inet dhcp

This didn't gave me result after the init.d/networking restart, but after a reboot, I had network again:
Code:

$ sudo ifconfig
eth0      Link encap:Ethernet  HWaddr 00:23:54:19:af:13 
          inet addr:192.168.1.6  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::223:54ff:fe19:af13/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:53797 errors:0 dropped:0 overruns:0 frame:0
          TX packets:33218 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:69976450 (66.7 MiB)  TX bytes:3530064 (3.3 MiB)
          Interrupt:27

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:167 errors:0 dropped:0 overruns:0 frame:0
          TX packets:167 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:18032 (17.6 KiB)  TX bytes:18032 (17.6 KiB)

A long introduction to my question: was uncommenting this line an acceptable solution, or should I have done something else? Can anyone explain what happens?

thanks in advance! Ruud

realbluntz 10-19-2011 02:03 PM

Yes, that starts your network.

You set it for dhcp, there are other options:

Code:

man interfaces


All times are GMT -5. The time now is 08:04 PM.