2

I have a homeserver, with a built-in network card, ASRock E350M1 Motherboard. On the computer there's a Debian Jessie system on an SSD, and 4 HDDs in raid configuration for my data. I usually have access through SSH to that computer. I don't need physical access to it, unless there's a problem.

Recently I started having problems with my network. Sometimes the computer boots, but I can't have SSH access to it. It takes a VERY long time to connect to my network. This doesn't happen always though! Yesterday I spend over 2 hours trying to get it to connect to my network, but it wouldn't work! pinging my router gave network is unreachable. Then suddenly it worked again!

So, I hooked my screen and keyboard there, and started investigating. While the network fails:

  • My network hardware (eth0) uses hotplug and DHCP to find my network. This is default Debian behavior.

  • The command cat /etc/resolv.conf returns the IP of my router (192.168.1.1).

  • The command ifconfig -a, returns only IPv6 IPs. No IPv4!

  • The command route -n, returns a wrong IP address that has nothing to do with my subnet (169.254.0.0)

  • Trying to add my router gateway (sudo route add default gw 192.168.1.1) fails with "SIOCADDRT: Network is unreachable".

  • No firewall is set at all!

  • Network card information; the command lspci | grep -i eth returns: 09:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd, RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)

  • Non-free firmware is already installed.

This thing is driving me crazy! What would you do? How can I know whether it's a hardware or software issue?

  • where is your DHCP server? your router/modem? is it configured correctly? on another tack, what kind of network card is in your linux PC? show output of lspci | grep -i eth. Does it require non-free firmware? if so, do you have it installed? (e.g. many Realtek NICs require the firmware-realtek package to be installed) – cas Oct 25 '15 at 21:58
  • 2
    btw, the 169.254 address is a Link-Local Address. It's not a problem in itself, it just indicates that the interface is not properly configured yet (e.g. hasn't yet received and accepted a DHCP offer). See en.wikipedia.org/wiki/Link-local_address – cas Oct 25 '15 at 22:00
  • @cas Thanks for the info. The DHCP server is in my router and it doesn't have a problem as I have 5 other computers and smartphones at home that don't have a problem. The non-free firmware is already installed. I'll print the lspci output in the question now. – The Quantum Physicist Oct 25 '15 at 22:20
  • Are the IPv6 addresses you see global unicast, link-local, or something else? – kasperd Oct 25 '15 at 22:53
  • 1
    Try using the static ip for a while, if you can, and if the random problem does not seem to occur, then I would suggest uninstalling and purging the dchp client software and reconfiguring it from scratch. – simpleuser Oct 26 '15 at 16:15
2

Look at the output of dmesg if there is a hardware/driver/frimware issue you should find some hints (wanings/errors) there.

And you could try booting from a live-CD (or USB) like https://www.debian.org/CD/live/.
If that works fine ist a configuration issue.

1

Use mii-tool or ethtool on the interface to see whether Linux can tell that the ethernet card is working, and how that card is connected (speed, full or half-duplex, etc). Also, check the cabling. (re)Seat all plugs. Look at the connection lights on router and the ethernet cards. They the cable on another computer if you can.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.