Network Binding - Ping

Can the network binding be setup to ping a web address? for Example www.google.com?

So far I’ve tried and can’t get it working.
When i put a “fake” one into a thing, it reports back as “online”
network:pingdevice:testpingdevice [ hostname=“www.thisisfakeaddressmilty.com”, port=80, retry=1, timeout=5000, refreshInterval=1800000 ]

You are hosted which openHAB version on which OS? If I recall, Windows ping could lie.

EDIT this is the issue I remembered, but it should be fixed in any recent release.

Yeah I have 2.5.11 installd; so from what i read there it “should be” fixed in that version and the binding that came with that version(since it seems like the fix happened 2-3 years ago)

Just to be clear, the Switch Item that is linked to that Channel is showing OFF? Or the Thing is showing as ONLINE? If the former we have a problem and the ping isn’t working. If the latter, all that the ONLINE status of the Thing indicates is that the Thing is functioning properly. It does not show the status of the actual network device (or web address in this case).

The “Switch” item that is linked to the thing is showing as On

Installing arping now(ubuntu) but can’t find where it got installed to check permissions; its not under /usr/sbin/arping

And are we talking Windows?

LInux(Ubuntu 20.04.01)

2.5.11 on ubuntu 20.04.01

interestingly enough, when i arping that false web address in the terminal windows, its my router that is returning a response…holy hell im confused

1 Like

That’s how ARP works. ARP stands for Address Resolution Protocol and as a protocol it lives low level of the network stack. It provides a mapping between a MAC address and an IP address.

In plain language an ARP request goes something like this:

Requestor: “Hey everyone! Who has IP address 172.217.2.110?”

Everyone on the local area network: “Hmmmm, is that my address? Nope. Am I router? Nope, so I won’t respond.”

The Router: “That’s not my address but I’m a router. Maybe I’m connected to a network that has that address. Yep, that address is on my WAN port.”

The Router: “That’s me! Use my MAC address for packets that need to be sent to 172.217.2.110. I’ll forward them to where it needs to go.”

All of this communication is taking place at the Link layer of the TCP/IP networking stack and it basically helps the hardware on the LAN understand when a packet is destined for that device and to know which device to send packets to. This traffic never leaves the local network, and in some cases it’s even more constrained.

So of course an ARP for Google’s IP address is going to give you the MAC address of your gateway router.