LinuxQuestions.org
Help answer threads with 0 replies.
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, 09: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, 10:10 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,921

Rep: Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690
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, 10: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, 10:26 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,516

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
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, 10:44 AM   #5
tekmann33
Member
 
Registered: Nov 2006
Posts: 188

Original Poster
Rep: Reputation: 30
Beautiful!

Thankyou!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 02:23 PM
Hostname from IP? (internal) fdr Linux - Networking 4 07-22-2005 08:06 AM
hostname to IP address bruse Linux - Networking 5 03-30-2005 12:21 AM
IP forwarding issue -- IP address of internal network menonrr Linux - Networking 4 09-14-2004 08:46 AM
Detecting the external IP address of an internal network: JohnLocke Linux - Newbie 17 07-22-2004 05:08 PM


All times are GMT -5. The time now is 08:05 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration