How to get remote host by IP address in subnetwork

How to get remote host by IP address in subnetwork

Post by Lancel » Thu, 22 May 2003 12:44:01



I am try to get a remote host name on the sub-network. I used
gethostbyaddr function can go this, but it was according to those
three files
     /etc/hosts
     /etc/nsswitch.conf
     /etc/resolv.conf
Is there any way to get remote host name by address without modify
those three files ?
 
 
 

How to get remote host by IP address in subnetwork

Post by David Efflan » Fri, 23 May 2003 09:45:56



Quote:> I am try to get a remote host name on the sub-network. I used
> gethostbyaddr function can go this, but it was according to those
> three files
>      /etc/hosts
>      /etc/nsswitch.conf
>      /etc/resolv.conf
> Is there any way to get remote host name by address without modify
> those three files ?

If the hostname is not in /etc/hosts, and not in reverse DNS (I am not
familiar with nsswitch), then where is the hostname you are looking for
defined (or what protocol tells the network what that name is)?  You have
to tell use that before anyone can help you.

If it is a Windows machine name, you may need to so something "samba"
related instead.

--
David Efflandt - All spam ignored  http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://cgi-help.virtualave.net/  http://hammer.prohosting.com/~cgi-wiz/

 
 
 

1. Can't ping the host name or host IP address from host.

Hello there,
I have the unusual problem of not being able to ping the machines host name
or host IP address from the host.
I've checkout the network settings and I can't seem to find any problems.  I
am able to ping & telnet to the machine
from the network.  Seems quite strange.

Any help would be really appreciated.

thanks,

Owen.

Here is output from ifconfig


lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
          BROADCAST LOOPBACK  MTU:3584  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0

eth0      Link encap:Ethernet  HWaddr 00:60:08:83:28:08
          inet addr:10.0.0.100  Bcast:10.0.0.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:41411 errors:0 dropped:0 overruns:0 frame:0
          TX packets:259 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0
          Interrupt:3 Base address:0x300



PING penguin (10.0.0.100): 56 data bytes
ping: sendto: Network is unreachable
ping: wrote penguin 64 chars, ret=-1

--- penguin ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss


PING 10.0.0.100 (10.0.0.100): 56 data bytes
ping: sendto: Network is unreachable
ping: wrote 10.0.0.100 64 chars, ret=-1

--- 10.0.0.100 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss

2. sendmail dies

3. DHCP server offering an IP addresses of a wrong subnetwork

4. Price part(FC:5236)

5. getting the remote IP address in a telnet session

6. What a useful resource for MS alternatives....

7. Getting remote IP address of connected socket

8. password aging and nis

9. Getting remote IP address in Telnet

10. Getting remote Xterminal IP address

11. Getting the remote ip address

12. Help with getting remote hostname/ip address

13. getting remote host ip from telnet and rlogin?