Possible way to get hostnames from LAN static IP hosts

I am trying to capture what is connected to my OpenWRT devices via LAN. I can do this quite easily with DHCP (Dynamic) assigned Hosts, but for those that connect via a static IP I don't know of an easy way to get their Machine Names or Hostnames.

One way I'm currently solving this is paying for an API service to lookup the Vendor of their MAC address that I capture from the arp table.

Stuffing the name into the dhcp config file along with the other bits would be the norm I think.

What if these Hosts aren't using DHCP and the owner of the device is unaware of this rogue connected host? Say someone with a laptop set's their own IP statically and then plugs in an ethernet cable to the device.

Problem is extent regardless. If this a concern in your environs, then a more forceful clamp down on network infrastructure would be warranted regardless.

Oh trust me.. I completely agree and something we try and enforce. If there isn't much of a simple solution I don't mind leaving it up to my people that are installing it and making it their problem. :wink:

ip -4 neigh

ip -6 neigh

A rogue device wouldn't necessarily announce it's hostname, especially if it never uses DHCP.

3 Likes

You can obtain their IP address (if they have configured one), you can search their MAC address in a database (and guess the manufacturer), you can use nmap or similar to get a fingerprint (and guess the OS)... you cannot obtain the hostname of an uncooperative device (and it could be fake).

If you are worried about rogue devices in your wired network, perhaps it's time to think about IEEE 802.1x

3 Likes

This is actually pretty helpful compared to what I was doing with arp. Thank you.

1 Like

It may come to using 802.1x.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.