- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Find hostname with IP address
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2001 01:48 AM
тАО07-31-2001 01:48 AM
Find hostname with IP address
Is there a way to tell the hostname of a host from a given IP address? A solution that works within the LAN would be sufficient.
TIA
Ully
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2001 01:55 AM
тАО07-31-2001 01:55 AM
Re: Find hostname with IP address
This is possible when you have a IP-hostname database such as the /etc/hosts file or an DNS server. The command you can use is:
nslookup [IP or hostname]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2001 02:02 AM
тАО07-31-2001 02:02 AM
Re: Find hostname with IP address
eg #nslookup 192.1.1.1
This will check the default ip resolution table usually /etc/hosts, DNS or NIS.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2001 02:03 AM
тАО07-31-2001 02:03 AM
Re: Find hostname with IP address
point your clients (UNIX file /etc/resolv.conf, NT Network settings) to use this DNS server.
the command to ask DNS for an ip-address of a box in your network then will be nslookup (UNIX and NT)
look at the DNS cook-book at
http://www.troubleshooters.com/tpromag/9811/dns.htm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2001 02:24 AM
тАО07-31-2001 02:24 AM
Re: Find hostname with IP address
nslookup command allow you by giving it either a hostname or an IP address to give you :
hostname, ip address and aliases.
You need to set the file /etc/nsswitch.conf with the following entry :
hosts: files[NOTFOUND=continue UNAVAIL=continue] dns [NOTFOUND=return UNAVAIL=continue TRYAGAIN=return]
this scanes first /etc/hosts file and then DNS.
You may do the inverse ( dns then /etc/hosts ) by putting dns first and then hosts in the file /etc/nsswitch.conf.
Magdi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2001 03:36 AM
тАО07-31-2001 03:36 AM
Re: Find hostname with IP address
using 'nslookup' it's possible, but you need to have nis server and DNS entry for all system in your LAN. otherwise it wouldn't.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2001 06:57 PM
тАО07-31-2001 06:57 PM
Re: Find hostname with IP address
First of all you should have some data resource for resolving things, ie., either /etc/hosts file on your system or an DNS database in your network. The entry in /etc/hosts file should be like,
IP Hostname (Alias Name-if needed)
Then you have to edit the /etc/nsswitch.conf file and make required entry. If you want to resolve IP to Hostname and vice-versa you can use nslookup.
Regards,
N.Harinath.