LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   unable to ping with hostname (https://www.linuxquestions.org/questions/linux-general-1/unable-to-ping-with-hostname-739990/)

s_linux 07-14-2009 10:34 AM

unable to ping with hostname
 
i have hosts file as below

127.0.0.1 localhost

# special IPv6 addresses
::1 localhost ipv6-localhost ipv6-loopback

fe00::0 ipv6-localnet

ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
111.222.22.222 hostname.xxx.xxx.com hostname


I can able to ping with IP and also able to ping with hostname locally but not from out side. Any ideas?
Thanks

catkin 07-14-2009 10:45 AM

Hello s_linux :)

On the outside system, how should it know that hostname.xxx.xxx.com is 111.222.22.222? The outside systm needs some way to find out; maybe its own hosts file, maybe DNS.

You can test this on the outside system at the command line by
Code:

nslookup hostname.xxx.xxx.com
Best

Charles

s_linux 07-14-2009 10:50 AM

I tried that too...

it says hostname.xxx.xxx.com cant find hostname: Non Existent domain.
we have dns server setup and below is my resolve.conf

nameserver 177.122.12.12
nameserver 177.122.12.13
search xxx.xxx.com

Thanks

catkin 07-14-2009 12:07 PM

Hello s_linux :)

Do the DNS servers at 177.122.12.12 and 13 have records for hostname.xxx.xxx.com? Only then can they resolve the name to the address. If you can't add hostname.xxx.xxx.com to 177.122.12.12 and 13 then you could add hostname.xxx.xxx.com to the local hosts file. That's tedious if there are many outside systems to configure. You may also need to reconfigure the name resolution method used on the outside systems to use the local hosts file as well as DNS.

Best

Charles

s_linux 07-14-2009 12:46 PM

Hi Mark,

Thanks for your quick reply...

Do the DNS servers at 177.122.12.12 and 13 have records for hostname.xxx.xxx.com? -- i dont know how to check this.

then you could add hostname.xxx.xxx.com to the local hosts file. -- yes I did add hostname (111.222.22.222 hostname.xxx.xxx.com hostname)to /etc/hosts file. But no luck. I'm missing something else..but not sure what it is.

Thanks again.

catkin 07-15-2009 02:01 AM

Hello s_linux :)

Quote:

Originally Posted by s_linux (Post 3607431)
Do the DNS servers at 177.122.12.12 and 13 have records for hostname.xxx.xxx.com? -- i dont know how to check this.

Where did the name hostname.xxx.xxx.com come from? Do the people who configure the 177.122.12.12 and 13 DNS servers know about hostname.xxx.xxx.com and its IP address?

Quote:

Originally Posted by s_linux (Post 3607431)
I did add hostname (111.222.22.222 hostname.xxx.xxx.com hostname)to /etc/hosts file. But no luck. I'm missing something else..but not sure what it is.

Probably the name resolution method is not configured to search the hosts file. What is the operating system on this "other" system?

Best

Charles


All times are GMT -5. The time now is 01:19 PM.