1

I've worked on this for a whole day. I have 2 Manjaro/Arch computers - an older workstation A and a laptop B. A work will be without regular network connectivity and I will weekly connect via crossover with my laptop to offload data. A has static IP 192.168.0.1/24 set via netctl and B has IP 192.168.0.10/24 set via a NetworkManager profile in GUI. For A the mobo ethernet port did not seem to work and I installed a PCI NIC whihc has a link light. I tried connect A and B them with a crossover cable. The cable worked successfully at home with the same laptop and a RaspberryPi. I also cable-tested the crossover it is all correct. But at work neither computer can ping each other and the error is:

# ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
From 192.168.0.10 icmp_seq=1 Destination Host Unreachable
From 192.168.0.10 icmp_seq=2 Destination Host Unreachable

Laptop has a manually set IP:

 enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.10  netmask 255.255.255.0  broadcast 192.168.0.255
        ether f0:76:1c:b9:b8:e6  txqueuelen 1000  (Ethernet)
        RX packets 853896  bytes 917175985 (874.6 MiB)
        RX errors 0  dropped 65  overruns 0  frame 0
        TX packets 378812  bytes 51523006 (49.1 MiB)
        TX errors 8  dropped 47 overruns 0  carrier 0  collisions 0

and so has the workstation A except the address is 192.168.0.1; netmask is the same. Link light is on for the network card on workstation A; ethtool output on A shows the link is detected. Yet there is no ping/connectivity and on B link is not detected (message from NetworkManager, ethtool and mii-tool outputs. What on earth could be wrong?

Updates according to comments: Netmask is same on both A and B. I checked interfaces with: lshw -class network -businfo - I have configured the correct interface on A - the one which belongs to the installed Realtek PCI card. Both addresses are static with the same netmask 255.255.255.0. Cards are 10/100 standard, which is confirmed by ethtool and mii-tool.

IP route show output on B

[root@zeniba ~]# ip route show
default via 192.168.0.1 dev enp3s0 proto static metric 100 
192.168.0.0/24 dev enp3s0 proto kernel scope link src 192.168.0.10 metric 100 

and similar on A, except the address is different.

arp in non-connected state shows no hw address for the other machine, which makes sense, I guess, if at least one machine thinks there is no link.

Next update: Almost solution: I subsequently found that on computer A NetworkManager was still running, despite me having disabled it previously. I read up on this and set both NetworkManager and NetworkManager-dispatcher services to masked - which should totally prevent NM from loading. Upon next reboot everything was working absolutely fine; there was immediate connection via crossover and I could get data as expected and this survived 5 reboots. I breathed a sigh of relief and put computer A on the production-testing site. However later during the day when I tried to connect to it with laptop B I got the same problem again. On A ethernet link light is on, but B shows no link/cable disconnected message. I will try to see if in some odd way NetworkManager has come to life again, but maybe this is hardware fault? Or any other network service that is interfering with netctl?

And thanks very much for all the comments and suggestions. They helped me to get on the right track. I will be posting the answer I came to.

  • 2
    Some checks: First, does the workstation have a netmask 255.255.255.0? Second, does either computer have two Ethernet ports (maybe you enabled the wrong device)? Third, can each computer ping itself? Finally, is there any chance you have a software firewall (likely iptables) enabled on either computer? – Steven Apr 4 '17 at 17:19
  • 3
    Please post the routing tables of both pcs, ip route show. – MariusMatutiae Apr 4 '17 at 17:20
  • The two computers need to have static IP addresses. – harrymc Apr 4 '17 at 18:12
  • Is this Gigabit Ethernet? What does ethtool eth0 show on both ends? – grawity Apr 4 '17 at 19:15
  • 1
    definitely check netmask. Ping requires that an ARP conversation happens first. ARP requires that both machines be in the same network, which is defined by netmask. If you're getting Host Unreachable it is likely that the ARP conversation is failing. Check ARP table for the other machine's IP and see if there is an entry. – MaQleod Apr 5 '17 at 1:10
1

I had 2 main problems.

1) The major problem was that network manager was not completely disabled - this really messed up my configuration on A. Until I got this sorted there was no connectivity whatsoever. As soon as I disabled with mask (read about three levels of switching-off systemd) I got the connection. Both Arch and Manjaro pages about setting up static IP with netctl mention that you need to disable NetworkManager, but they don't quite say that some services may still bring NM up even though I disabled it at the 2nd level initially. Commands are:

 systemctl mask NetworkManager
 systemctl mask NetworkManager-dispatcher

2) Then I got the problem that sometimes this configuration would mysteriously stop working - i.e. plugging in the cable and setting laptop B NetworkManager profile to the static IP would give no results. Strangely the workstation A card link light is still on. Since at home with RaspberryPis this always works, I think this is some old hardware problems for the workstation. The best way to deal with this I found was to use mii-tool -w enp3s0 on the laptop. It means to watch your particular ethernet interface (enp3s0 in my case) for hardware level link. It changes instantly as you plug / disconnect your cable. ethtool seems more powerful but I did not find such convenient monitoring of the link for ethtool. So if mii-tool show the link, you look if your laptop interface is associated with the correct profile and then you can check with ping.

3) Hardware related problems - hence as an amateur I have many things to doubt, which makes the process more complicated. For that reason I will put some more bits here that I found particularly helpful:

One is lshw -class network -businfo - it gives you PCI address, device name and description. So on a machine with several interfaces you can make sure that your netctl or other CLI configuration is referring to the right card.

About IP v4 configuration. As you are setting up just 2 computers on the same subnet you do not need to set gateway. However NetworkManager GUI would not allow you to make a profile without a GW. You can just put the address of the other computer there or you can put 0.0.0.0 as GW.

Problem with the ethernet card - weird MAC address

I do not know how, but part of the problem was with the Realtek ethernet card I had. For some unknowable reason the computer was booting each time with slightly different MAC address and most of it was fff - like ff:ff:ff:7f:ff:ff. It was frustrating as hell as I saw in logs that IP address assigning fails. I could not solve it by trying to assign a different MAC address to it at boot. This problem was solved buying another cheap used ethernet card that seemed to come up with proper MAC address every time.

Problem on laptop end - no interface after disconnect

I found that sometimes my manjaro laptop could not see the network interface after cable was unplugged and then plugged in again. So the command mii-tool -w enp3s0 would complain that there was no such interface. However that was easy to solve by putting laptop to sleep and then waking it up again. mii-tool would report link and then ping would work as expected.

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.