Fixed Lost Network Connection (Basic Troubleshooting)

Share your own howto's etc. Not for support questions!

Fixed Lost Network Connection (Basic Troubleshooting)

Postby LPC11 » 2016-12-31 17:52

At the risk of sounding oversimplistic, I want to share how I did troubleshooting for loss of my network connection in Debian. The reason for posting is I did not find much on this subject, other than for network loss following Debian upgrade. For my loss of network connection it was simple, but it took me a couple hours to figure this out (don't laugh!).

After verifying the loss with
Code: Select all
and getting "network unreachable" I went through through these troubleshooting steps (as root) to fix:

1. Start networking in case it was stopped:
Code: Select all
#/etc/init.d/networking start
[ ok ] Starting networking (via systemctl): networking.service.

2. Make sure your network device is being recognized:
Code: Select all
# ifconfig -a
eth0      Link encap:Ethernet  HWaddr d0:50:99:5b:c2:4a 
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback 
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:123 errors:0 dropped:0 overruns:0 frame:0
          TX packets:123 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:12291 (12.0 KiB)  TX bytes:12291 (12.0 KiB)

3. Check the status of the active networking service:
Code: Select all
# systemctl status networking.service

If that shows you do not have any failures, such as output like this:
Code: Select all
networking.service - LSB: Raise network interfaces.
   Loaded: loaded (/etc/init.d/networking)
  Drop-In: /run/systemd/generator/networking.service.d
   Active: active (exited) since Fri 2016-12-30 16:44:56 CST; 10s ago
  Process: 2116 ExecStop=/etc/init.d/networking stop (code=exited, status=0/SUCCESS)
  Process: 2059 ExecReload=/etc/init.d/networking reload (code=exited, status=0/SUCCESS)
  Process: 2401 ExecStart=/etc/init.d/networking start (code=exited, status=0/SUCCESS)

Dec 30 16:44:56 debianmain systemd[1]: Starting LSB: Raise network interfaces....
Dec 30 16:44:56 debianmain networking[2401]: Configuring network interfaces...done.
Dec 30 16:44:56 debianmain systemd[1]: Started LSB: Raise network interfaces..

4. ...then all you should need to do is execute this command to restore your connection:
Code: Select all
 $sudo dhclient eth0

...and verify restoration with:
Code: Select all
$ ping

Postscript...After this, I found the connection was still dropping upon reboot. In my case, purging and reinstalling NetworkManager fixed that:
Code: Select all
sudo apt-get purge network-manager
sudo apt-get install network-manager
sudo /etc/init.d/network-manager start
Posts: 16
Joined: 2016-10-27 20:21

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 7 guests