Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
This may sound like a simple question to answer, but I've googled my ass off, and I've looked through the man pages, but thus far I haven't been able to find an answer.
My question is this: how would I go about discovering hostnames for other computers on a network? NFS is what I'm worried about here, so suppose I didn't know the hostname or IP address of the NFS server. How would I query a list of computers from the network so as to find it?
Kind of what I am looking for is a smbtree for nfs, if that helps to clarify.
Thank you acid, I'll look into that, although I'm not entirely sure how that will help me in my current situation. I guess I should have described it better
I have a star topology network, with a router at the center going out to the internet from there. Then I have a whole bunch of computers branching off of that, including another router (which my computer is connected to). Is there a way to find out the names of each of the computers on the LAN itself, since I don't have my own personal DNS for it?
EDIT: and this is assuming I don't put anything in the /etc/hosts file, too. Thanks in advance.
arp can give you some information about machines you're directly connected to.
# arp -avn
Although it doesn't do hostnames. Perhaps one step closer anyway. /etc/hosts in the only way to locally apply names to IPs. Unless the connected router is in your /etc/resolv.conf and resolves the ips to names.
whois can resolve IPs to hostnames, but unless you have some sort of interception, it does it at the internet level.
The only UNIX service which actually broadcasts is CUPS. There is also Bonjour but I'm not familiar with it. You can query NFS servers with rpcinfo. Generally, the idea to advertise every service on the network belongs more to the Windows world.
Perhaps pinging every address on your network will give you an idea of the active IPs? Of course, this doesn't give you their hostnames.
I'm not sure of the ethics of this... If you're not the sys admin, perhaps there's a reason you don't know the hostnames! Couldn't you just go ask someone?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.