0

Attempting to connect from a PC to an OpenWRT device over Ethernet is giving "no route to host". I'm working on an OpenWRT port for a new device, so it's possible something isn't configured correctly on that side. What steps can I take to debug this?

The PC is configured with static IP 192.168.1.100 for subnet 192.168.1.1/24, which should match the default OpenWRT settings. When I connect Ethernet, I see LED activity on the device.

From the PC:

$ ifconfig
eth2 Link encap:Ethernet HWaddr ec:a8:6b:35:5f:59
  inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
  inet6 addr: fe80::eea8:6bff:fe35:5f59/64 Scope:Link
  UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
  RX packets:706 errors:0 dropped:0 overruns:0 frame:0
  TX packets:3094 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:1000
  RX bytes:241452 (241.4 KB) TX bytes:214343 (214.3 KB)

$ ip route show
169.254.0.0/16 dev eth2 scope link metric 1000
192.168.1.0/24 dev eth2 proto kernel scope link src 192.168.1.100 metric 100

$ arp -i eth2
Address HWtype HWaddress Flags Mask Iface
192.168.1.96 (incomplete) eth2
192.168.1.1 (incomplete) eth2

What's the (incomplete) HWaddress about -- does that mean something's wrong with the device's MAC address?

3
  • Try arping -I eth2 192.168.1.1 [source] Jul 23 '16 at 21:20
  • Sent 103 probes, no responses.
    – Kris Braun
    Jul 23 '16 at 21:59
  • "What's the (incomplete) HWaddress about " it means an arp probe has been sent in an attempt to resolve the IP address to a MAC address but no response has yet been received. Feb 21 '17 at 15:27
2

You asked

What steps can I take to debug this?

You seem to want to access the OpenWRT without going through its console (because you write "should match the default OpenWRT settings").

There can be several causes for your problem.

  • Your layer 1 may not be OK at all (you say you see LED activity but still)
  • The OpenWRT may have an address you don't expect, or may be looking for a DHCP server on the interface you're connected to
  • The OpenWRT may have a firewall configured
  • There's a bug or incompatibility between your device and OpenWRT

You have two main options:

  • Debug from the PC. First, connect your PC directly to your OpenWRT with a crossover cable and make sure your port is up (ethtool eth2 should say Link detected: yes). Start tcpdump -n eth2. Reboot your OpenWRT. Look at the output to see if it sends anything at all to the network which can help you guess its address. If it sends out packets sourced as 192.168.1.1 but doesn't reply to arping -I eth2 192.168.1.1 then I'd say there's a bug in its Ethernet driver.

  • Use console access to log in and debug from there...

4
  • Thanks. ethtool eth2 shows Link detected: yes. tcpdump -n shows only traffic from the PC, nothing from 192.168.1.1. The strange thing is that the device LED blinks only when Ethernet is attached, and it blinks quickly and erratically as if driven by traffic.
    – Kris Braun
    Jul 24 '16 at 4:35
  • In that case I think you'll have to do your debugging from the OpenWRT console!
    – Law29
    Jul 24 '16 at 9:25
  • Your first cause was correct, layer 1 was not OK. The single port was actually assigned to eth1 instead of eth0 inside OpenWRT, so until config was changed to reflect that, the port was not configured properly for a LAN connection.
    – Kris Braun
    Jul 27 '16 at 1:36
  • Happy to have helped, and good luck with your port!
    – Law29
    Jul 27 '16 at 9:22
0

The ICMP message, "no route to host," means that ARP cannot find the layer-2 address for the destination host. Usually, this means that that the host with that IP address is not online or responding.

If, instead, you get a timeout, it means that you already have the layer-2 address for the host (in the ARP cache), but the host is not responding. It may not be online, or it may have a firewall blocking whichever protocol you are using, e.g. ICMP for ping.

In any case, you seem to have an ARP problem. You could try to use static ARP cache entries for address resolution.

2
  • Thanks. Since arp isn't show a MAC address for the device, I'm guessing that's the issue. To add a static ARP entry, I would need the MAC address. I'm thinking maybe the firmware isn't setting the MAC on eth0 properly, maybe all zeros because it's getting it from the wrong location.
    – Kris Braun
    Jul 23 '16 at 19:00
  • Maybe, but questions about consumer-grade devices are explicitly off-topic here. You can ask questions here about the protocols, but not the consumer-grade device or host configurations. You can try to ask questions about consumer-grade devices and host configurations on Super User.
    – Ron Maupin
    Jul 23 '16 at 19:03
0

arp (incomplete) mean host still not get reply on arp request and unable to determine MAC address.

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