Linux - Networking This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
01-27-2003, 09:25 AM
|
#1
|
LQ Newbie
Registered: Jan 2003
Posts: 2
Rep:
|
How to get another machine's hostname?
Hi,
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.
Thanx.
- Afpe
|
|
|
01-27-2003, 10:24 AM
|
#2
|
Member
Registered: Dec 2002
Location: In front of a computer
Distribution: UPS, DHL, FedEx
Posts: 466
Rep:
|
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.
|
|
|
01-27-2003, 10:33 AM
|
#3
|
LQ Newbie
Registered: Jan 2003
Posts: 2
Original Poster
Rep:
|
Thanx for your tips.
Well, you are right about reverse lookup as most of the people do not bother to set those up! Any other idea?
- Afpe
|
|
|
01-27-2003, 10:41 AM
|
#4
|
Senior Member
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024
Rep:
|
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.
|
|
|
01-27-2003, 07:59 PM
|
#5
|
Member
Registered: Dec 2002
Location: In front of a computer
Distribution: UPS, DHL, FedEx
Posts: 466
Rep:
|
You can get *nix apps to use netbios style name lookups by installing winbindd and adding a line in /etc/nsswitch.conf
|
|
|
All times are GMT -5. The time now is 06:43 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|