LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-18-2009, 05:37 AM   #1
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Rep: Reputation: 30
Inquiry:Network Element IP Address


Dear All
Can you please do me favor and let me know if there is an utility on the Linux server that enables me to obtain the IP address of the other connected node that is an the same subnet ? (I mean my server is @172.16.17.159 and the other node is @172.16.17.XX and I want to obtain the other node IP address automatically) ?
Regards
H.Motamedi
 
Old 08-18-2009, 05:41 AM   #2
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
Inquiry: Network Element IP Address

Dear All
Can you please do me favor and let me know if there is an utility on the Linux server that enables me to obtain the other network element IP address automatically ? I mean my server is @172.16.17.159 and the other network element is @172.16.17.XX and I want to obtain its IP address automatically .
Regards
H.Motamedi
 
Old 08-18-2009, 05:47 AM   #3
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by hadimotamedi View Post
Dear All
Can you please do me favor and let me know if there is an utility on the Linux server that enables me to obtain the IP address of the other connected node that is an the same subnet ? (I mean my server is @172.16.17.159 and the other node is @172.16.17.XX and I want to obtain the other node IP address automatically) ?
Regards
H.Motamedi
a bit long winded, but you can use nmap or netcat to scan the subnet.
or you can use any such network discovery tool.
there are loads - 2 of such are fing and cheops
 
Old 08-18-2009, 05:51 AM   #4
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
forgot to add link to fing

Code:
freshmeat.net/projects/fing
 
Old 08-18-2009, 06:16 AM   #5
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
This any use?
 
Old 08-18-2009, 06:28 AM   #6
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

Some clarification is needed in my opinion. You have your first server (@172.16.17.159) on which you work and do stuff. You also have a second server of which you don't always know the IP address since it's configured to use DHCP. Is this correct?

If so, do you have a DNS server running? If yes then you can just do a ping to the hostname to get the IP.

If not, do you have access to the second server/workstation? If yes, get the MAC address.

If you run
Code:
arp -a
on your first server, you get a list of all connections in the ARP table which also lists your other machine. Find the line with the MAC address of your second machine and you get the IP.

Code:
man arp
will give you a lot more useful options.

Kind regards,

Eric
 
Old 08-18-2009, 02:15 PM   #7
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
i think nmap, netstat, ethereal mite help.
 
Old 08-18-2009, 11:32 PM   #8
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by EricTRA View Post
Hello,

Some clarification is needed in my opinion. You have your first server (@172.16.17.159) on which you work and do stuff. You also have a second server of which you don't always know the IP address since it's configured to use DHCP. Is this correct?

If so, do you have a DNS server running? If yes then you can just do a ping to the hostname to get the IP.

If not, do you have access to the second server/workstation? If yes, get the MAC address.

If you run
Code:
arp -a
on your first server, you get a list of all connections in the ARP table which also lists your other machine. Find the line with the MAC address of your second machine and you get the IP.

Code:
man arp
will give you a lot more useful options.

Kind regards,

Eric
Thank you for your reply . Please be informed that my Linux server is at@172.16.17.159 and the other server on the Net has static ip address assigned in the range of@172.16.17.XX but I don't have its @ip exactly . Do you mind to let me know how can I obtain its IP address remotely as I have valid id/pwd to be able to log in ?
Regards
H.Motamedi
 
Old 08-18-2009, 11:37 PM   #9
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Login as use

ifconfig

as root, or

/sbin/ifconfig

if not root user.
Feel free to post the results here.
Alternately, ping and/or nslookup the machine name, should return the IP.
 
Old 08-19-2009, 12:46 AM   #10
settntrenz
Member
 
Registered: Aug 2009
Location: Orlando, Florida
Distribution: RHEL, Ubuntu
Posts: 49

Rep: Reputation: 19
Assuming nmap is not prohibited on your network,

One solution would be to use a process of elimination.

Is the target machine running an ssh server? If so

Code:
nmap -sV -p22 172.16.17.1-254
Look to see which systems report that SSH is open and listening.

man nmap for further documentation.
 
Old 08-22-2009, 09:01 AM   #11
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
I have merged your duplicate threads. In the future please have only on thread on a particular question.
 
  


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
Changing Network Address of Network Printer MTUser2007 Linux - Newbie 3 10-15-2008 08:52 AM
Squid inquiry ImAnEwBiE Linux - Newbie 1 10-26-2006 04:19 AM
FC4 I get IP address (on any network) but I can't access to outside the network bodhisattva Fedora 10 02-07-2006 06:58 AM
What is Gateway address and what is Network address? abefroman Linux - Networking 1 03-17-2004 08:25 PM
question about network address and broadcast address yuzuohong Linux - Networking 1 09-18-2002 11:47 AM

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

All times are GMT -5. The time now is 10:56 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