How to find all hostnames (even laptops that aren’t currently on the network) on a network

arpdomain-name-systemhostnamenetbiosnetworking

I manage a network that has a lot of laptops. The users that use the laptops are frequently traveling. When someone gets a new computer I run into a problem determining what the hostname should be. The hostname scheme is [companyname]xxx where xxx is the next available number. I usually ping starting whichever hostname I think is available and increase/decrease the number until I find an available hostname. However when a user's laptop isn't in the network this method doesn't work.

Is there a way I can check for all of the hostnames on the network, even the laptops that aren't currently connected? Or am I going about this all wrong?

Two things to note:

  • I've used the ARP cache in the past but sometimes a user's laptop is out of the office long enough that their MAC address is no longer in the ARP cache.
  • I keep fairly good documentation but sometimes a different tech will add a computer to the domain and not update the documentation.

Best Answer

I usually would just ping starting whichever hostname I think is available and increase/decrease the number until i find an open hostname.

You're doing this the hard way. It would be easier to use a spreadsheet to track the computer names you've assigned. If you have a team that is responsible for naming computers a shared Google Sheets or the equivalent would be perfect.

At places I've worked we've used this method and included in the spreadsheet helpful details like Date Created, Date Decommissioned, Assigned User and the like.

sometimes a different tech will add a computer to the domain and not update the documentation.

This problem is best addressed with a behavior solution. Attempts to solve human problems with technical solutions usually fail. If the process for identifying and assigning a new name is simple then it is not unreasonable to expect all technicians to adhere to it as an expectation of employment.