LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-26-2008, 11:39 AM   #1
jantman
Member
 
Registered: Nov 2005
Location: New Jersey, USA
Distribution: SuSE
Posts: 492

Rep: Reputation: 31
Query DNS if I only know a partial hostname


I know this is an awful question, but...

I work at a university with well over 100,000 machines. Is there any way, via querying DNS, that I can find a list of hostnames containing a string?

We've got about two dozen machines start are part of group XYZ. the hostnames are all XYZ-(buildingName)-(some-random-string). Someone asked me for the IP of a certain one...... Where to go from here?

I'll admit, I don't have much experience working in a domain so large that I forget hostnames, so I'm sorta lost.
 
Old 02-27-2008, 03:50 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
not really, not if that name structure is as you listed it. if you do know all the potential parts can you not piece it together? i'm unclear here which part of the hostname is the bit you would change. i guess you could look to do a zone transfer - "dig -t AXFR domain.com" and just grepping the output for the bits of string that you know.
 
Old 02-27-2008, 04:04 AM   #3
jantman
Member
 
Registered: Nov 2005
Location: New Jersey, USA
Distribution: SuSE
Posts: 492

Original Poster
Rep: Reputation: 31
I don't think grepping a zone transfer of 100,000+ entries would go too well.

the names are a whole bunch like:
XYZ-bldg1234-room13
XYZ-4567-frontlobby
XYZ-lobby-bldg35
XYZ-rm300-2846
XYZ-rm300-bldg234
bldg234-XYZ-rm100
rm100-bldg780-XYZ

I guess grepping a zone transfer is the only way to go. Essentially what I need is full-text searching on names.
 
Old 02-27-2008, 04:57 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
not great. of course if you are running these name servers yourself then you can interrogate the DNS locally. there are many BIND based IPAM solutions with gui's which may well provide this.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Query regarding DNS saini_mw Linux - Software 4 09-14-2009 12:29 PM
DNS query bikebefast Linux - Networking 31 01-03-2008 10:38 PM
DNS query script Braynid Linux - Newbie 17 07-05-2006 05:45 AM
DNS query sanw2k Linux - Networking 1 03-11-2005 11:31 PM
DNS query chynna_v Linux - Newbie 1 09-15-2004 04:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration