LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-09-2007, 08:49 AM   #1
tekmann33
Member
 
Registered: Nov 2006
Posts: 188

Rep: Reputation: 30
Get hostname from IP address on internal network


I am a lowly Systems Tech at a company and I am assigning IP addresses to laptops to be added to the domain.

I am trying to give laptop number 33 the private IP 10.3.0.33, but it looks like another computer has that address already.

I have a Fedora 6 machine on the network and I can ping the 10.3.0.33 address, but is there a way that I can pull its hostname to figure out which one it is?
 
Old 11-09-2007, 09:10 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,689

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Try "nslookup <ip address>", and it will return a host name. This will only work, though, if that address is in DNS, or is somehow defined.
 
Old 11-09-2007, 09:23 AM   #3
tekmann33
Member
 
Registered: Nov 2006
Posts: 188

Original Poster
Rep: Reputation: 30
No, our PC's on the internal network are not defined in the DNS server.
 
Old 11-09-2007, 09:26 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,165
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Try "nslookup <ip address>", and it will return a host name. This will only work, though, if that address is in DNS, or is somehow defined.
This is a samba command and uses netbios and not dns to get names/IPs. You need samba installed in your system to use it. The correct syntax to get the computer name from the IP is
Code:
nmblookup -A xx.xx.xx.xx
 
Old 11-09-2007, 09:44 AM   #5
tekmann33
Member
 
Registered: Nov 2006
Posts: 188

Original Poster
Rep: Reputation: 30
Beautiful!

Thankyou!
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Internal network connecting to external IP address kamafeu Linux - Networking 2 01-21-2007 01:23 PM
Hostname from IP? (internal) fdr Linux - Networking 4 07-22-2005 07:06 AM
hostname to IP address bruse Linux - Networking 5 03-29-2005 11:21 PM
IP forwarding issue -- IP address of internal network menonrr Linux - Networking 4 09-14-2004 07:46 AM
Detecting the external IP address of an internal network: JohnLocke Linux - Newbie 17 07-22-2004 04:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:23 PM.

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