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.
I would like to know is there any way to retrieve another machine's hostname by that machine's IP4/IP6 address? For instance, how can a router acting linux machine gets the 'hostname' from any of its client by using that client's IP address?
If you know please help me with any/multi solutions.
if the reverse lookup has been setup on that machine just use "host x.x.x.x"
The results aren't always correct, if the host name changed without the reverse lookup changing then you could have something incorrect and alot of pepole don't bother setting up their reverse lookups. Also anyone can fake a reverse lookup to any hostname they want to.
I'd suggest traceroute but that just does a reverse lookup (but at least it works in m$ land where there is no host command.) Another suggestion would be to sniff the network but that's sort of like using a shotgun to hunt a fly. Also in windows land all the computers broadcast their names or register with a wins server but I haven't found a way to get native *nix apps besides samba to use netbios style name resolution yet.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.