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.
cat /etc/resolv.confreturns the IP of my router (192.168.1.1).
ifconfig -a, returns only IPv6 IPs. No IPv4!
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 ethreturns:
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?