[opensuse] ping and telnet solves hostname to different IP addresses?
Using Linux for 7 years this is the first time I see such thing happening, the same host name resolve to different IP address almost at the same time, one by ping the other by telnet. How could this happen? Ariel@Jamaica:~> ping svn.realss.com PING svn.realss.com (221.219.118.212) 56(84) bytes of data. 64 bytes from 221.219.118.212: icmp_seq=1 ttl=255 time=3.15 ms ^C --- svn.realss.com ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 3.156/3.156/3.156/0.000 ms Ariel@Jamaica:~> telnet svn.realss.com svn Trying 202.106.199.36... ^C Ariel@Jamaica:~> ping svn.realss.com PING svn.realss.com (221.219.118.212) 56(84) bytes of data. 64 bytes from 221.219.118.212: icmp_seq=1 ttl=255 time=3.29 ms 64 bytes from 221.219.118.212: icmp_seq=2 ttl=255 time=2.47 ms ^C --- svn.realss.com ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1002ms rtt min/avg/max/mdev = 2.476/2.886/3.297/0.414 ms Ariel@Jamaica:~> telnet svn.realss.com svn Trying 202.106.199.36... ^C I did not put this host to /etc/hosts so I guess I can limit the problem to DNS. By the way, 221.219.118.212 is the correct IP address of the host. 202.106.199.36 is the server of our ICP used to display advertisement. In our network 1/10 dns solving points to 202.106.199.36 so we Internet browsers see one advertisement per 10 pages. I know about opendns, I just curious how this behavior (telnet / ping behave differently) could happen. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sunday 12 July 2009 17:30:47 Zhang Weiwu wrote:
By the way, 221.219.118.212 is the correct IP address of the host. 202.106.199.36 is the server of our ICP used to display advertisement. In our network 1/10 dns solving points to 202.106.199.36 so we Internet browsers see one advertisement per 10 pages. I know about opendns, I just curious how this behavior (telnet / ping behave differently) could happen.
Sounds like a coincidence. I bet if you were to do host svn.realss.com a bunch of times, you would get the 202.106.199.36 a few times, just as you say your network is configured to do. The fact that it happened just as you switched to telnet must have been a coincidence. They both use the normal glibc lookup functions to convert a host name to IP address Anders -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Anders Johansson wrote:
Sounds like a coincidence. I bet if you were to do host svn.realss.com
a bunch of times, you would get the 202.106.199.36 a few times, just as you say your network is configured to do. The fact that it happened just as you switched to telnet must have been a coincidence. They both use the normal glibc lookup functions to convert a host name to IP address
Not so sure. After I posted the message I edited /etc/hosts to add a line specify 221.219.118.212 as svn.realss.com and re-run two commands, the output stays the same, so telnet ignored /etc/hosts setting (???) . -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sunday 12 July 2009 18:00:20 Zhang Weiwu wrote:
Anders Johansson wrote:
Sounds like a coincidence. I bet if you were to do host svn.realss.com
a bunch of times, you would get the 202.106.199.36 a few times, just as you say your network is configured to do. The fact that it happened just as you switched to telnet must have been a coincidence. They both use the normal glibc lookup functions to convert a host name to IP address
Not so sure. After I posted the message I edited /etc/hosts to add a line specify
221.219.118.212 as svn.realss.com and re-run two commands, the output stays the same, so telnet ignored /etc/hosts setting (???) .
Try restarting nscd (and possibly deleting its cache) - or simply stopping it with "rcnscd stop". If the DNS server responded with a TTL for that IP address, then nscd will not refresh its cache until the TTL expires. Anders -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sun, 12 Jul 2009, Anders Johansson wrote:
Try restarting nscd (and possibly deleting its cache) - or simply stopping it with "rcnscd stop". If the DNS server responded with a TTL for that IP address, then nscd will not refresh its cache until the TTL expires.
Oh, that opens a door to new knowledge. I guess I simple use this oppotunity to learn about rcnscd. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (2)
-
Anders Johansson
-
Zhang Weiwu