Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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
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
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.