Wednesday, April 1, 2020

Compare system hostnames with dns records

Does someone know if there's a script/tool/suite which is able to compare system hostnames (read out via snmp preferably) with the reverse DNS entry of it's IP address?

For instance: On the dns side you have 4 records: switch1 A 10.0.0.1 switch2 A 10.0.0.2 switch3 A 10.0.0.3 switch4 A 10.0.0.4

But on the device hostname side it looks something like this: switch1 10.0.0.1 switch2 10.0.0.15 switch3 10.0.0.3 switch4 10.0.0.28

So I want the script to scan a subnet, find out it's reverse DNS entries and then compares the reverse DNS entries to the real hostname of the device. In my example I want the script to tell me that there are differences between DNS Names and real systemnames at switch2 and switch4.

Or does someone have a better approach to cleaning up a shitton of old DNS records?



No comments:

Post a Comment