-1

Given one or more embedded devices of the same type with some unknown IPv4 addresses or maybe no IPv4 addresses set at all: is there any Ethernet based network protocol to ”find“ those devices in the local net (LAN) from remote (PC) and get their IPv4 settings?

What not works for me:

  • ARP: IP address must be known or only finds device I communicated with before (or ugly ARP floods …)
  • LLDP: point to point only (?), so I would only see the switch between device and me. Also, just announces, no response on request (because there are no requests). Further: asking the switch (which supports LLDP) through SNMP is no option when using dumb switches
  • IP based protocols: I played with UDP and broadcasts (both as request and response), but that does not work reliably if device and me are on different subnets, and it does not work at all if device has no IPv4 set.
  • DHCP: does not work in networks without DHCP server, maybe no DHCP client on the embedded device

I assume others had the same problem before, take manufactures of network equipment like access points which should be configured remotely, powerline adapters, switches … all those where the vendor gives you some proprietary tool, the device shows up like magic in a list and you can assign some IPv4 then.

Of course the device must have some daemon listening and responding to certain requests, but what would be a standard protocol for such a task? Or do I have to make up some new protocol for that? May some of the above mentioned is possible, but I overlooked something?

LeSpocky
  • 489
  • 1
  • 6
  • 16
  • There is the [Discovery and Configuration Protocol](https://en.wikipedia.org/wiki/Discovery_and_Configuration_Protocol) from the PROFINET protocol suite. Any other known alternatives? – LeSpocky May 06 '22 at 11:13

1 Answers1

1

Ethernet only provides a layer 2 connection, so anything Ethernet-based can't ever work across a router (ARP, LLDP - LLDP doesn't even cross a decent switch as it's link layer only).

Depending on the network, routed multicasts or directed broadcasts could work - normally they don't. All vendor tools I've seen just use (Ethernet) broadcasts and don't work across routers.

Most often, simple DNS is used for this purpose - the device registers with the DNS server or is preregistered and you just resolve the name.

Edit: without the router problem, the simplest way is to use a UDP broadcast to some unused port. With DHCP unavailable, the device could fall back to zeroconf (169.254.0.0/16) and broadcast from there.

Without IP, you'd need a "raw" Ethernet socket and use an Ethertype that doesn't interfere with normal network operations.

Zac67
  • 2,761
  • 1
  • 10
  • 21
  • It's not necessary to work across routers, I clearified the question. DNS is no option, a DNS server is not required in such a network and would not work without IP anyway (?). – LeSpocky Apr 13 '18 at 17:47
  • Without a router in the way you can simple use broadcasting - the easiest way is a UDP broadcast to a port you've selected. – Zac67 Apr 13 '18 at 17:58
  • As mentioned in the question itself from start: I want to move away from UDP broadcasts, because: - responses by the device to the global broadcast address are often filtered by firewalls on the PC - responses to a local broadcast or unicast address won't reach the PC, if that is on the same layer 2 domain, but in another subnet (embedded device won't change its IP address by itself) - embedded device may have no IP address at all (UDP does not work without) – LeSpocky Apr 13 '18 at 18:11