Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting alias name 1

Status
Not open for further replies.

hok1man

Technical User
Feb 16, 2008
102
hi guys,

just wondering how to get alias name from the real hostname :
I usually use nslookup, but it just works if I do like this:
Code:
nslookup [aliasname]

yes, it will give me the alias name and the real name, but if I use the realname

Code:
nslookup [realname]

it won't give me the alias name, any idea how to get alias name guys?

Thanks,
 
I think you have to ( on AIX ) set query to type=A or type=CNAME to force one or the other.

Is that what you are after?
 
Hi dwcasey,

where to set the query type?
I am after the unix command or solution...

Thanks,
 
nslookup accepts multiple commands when run interactively (i.e. without parameters). I think that's where you set the query type; check the man page.

Annihilannic.
 
Also, consider trying the host command if it's available on your OS.

Annihilannic.
 
Hi dwcasey,

It's still doesn't work from the realname :(
 
You want the alias that points to the name. I don't believe this is possible, the cname searches look for the alias, not the target. So in other words, you need to already KNOW the alias before you ask for it! There is no user command that will back track aliases that point to a host. The reason? A cname can be used to point at a host from ANY domain, so you would have to search ALL internet dns records to get a comprehensive list (or change how the protocol works so that cnames are registered!, fat chance).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top