Solved

DNS problems

Posted on 2006-06-12
8
454 Views
Last Modified: 2013-12-06
Hello,

I am using Linux Fedora core 4.
This server is DNS client, i configure /etc/resolv.conf  as follow:
 
  search ...
  nameserver   203.162.4.1
  nameserver   203.162.0.11
...................................

when execute command "host www.mydomain.com" , i get the result:
    www.mydomain.com has address 203.162.148.163
    www.mydomain.com has address 203.162.148.164
............................................................
............................................................

Then I execute command "ping www.mydomain.com" , i get the result:
    64 bytes from www.saigonbank.com.vn (203.162.148.163): icmp_seq=4 ttl=255 time=0.434 ms
    64 bytes from www.saigonbank.com.vn (203.162.148.163): icmp_seq=4 ttl=255 time=0.434 ms
   ^C
After that, I execute command "ping www.mydomain.com" again, i get another result:
    64 bytes from www.saigonbank.com.vn (203.162.148.164): icmp_seq=4 ttl=255 time=0.434 ms
    64 bytes from www.saigonbank.com.vn (203.162.148.164): icmp_seq=4 ttl=255 time=0.434 ms
   ^C
................

I mean, the first ping command , i rearch   203.162.148.163 address, the second ping command, i rearch  203.162.148.164 address,  the third ping command, i reach 203.162.148.163  again and so on,...

Can any one tell me why 2 ip address is used in shifts?

Now i want to configure to reach only to 203.162.148.163  or 203.162.148.164 when i ping to www.mydomain.com. What should we do now?

Thanks
 
0
Comment
Question by:freshrain
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 3

Expert Comment

by:papimichel
ID: 16883850
it is for load balancing purposes.

try doing it for google.com and you'll recieve similar results.
0
 
LVL 3

Expert Comment

by:papimichel
ID: 16883854
on windows machines -

ping www.google.com 
then run
ipconfig /flushdns
and then try again
ping www.google.com

you'll see different ip addresses.
0
 
LVL 2

Expert Comment

by:munk33
ID: 16886069
papimichel explains the reasoning for your query. As many company's have multiple servers for the same services clients are redirected.

If you would prefer to connect to a specific ip when using dns lookups.... Add the hostname and the ip in the /etc/hosts file on the fedora box.
0
Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

 
LVL 9

Accepted Solution

by:
jabiii earned 500 total points
ID: 16888274
nslookup www.yahoo.com as already stated
0
 

Author Comment

by:freshrain
ID: 16892185
But when the user access www.mydomain.com, this domain is always resolved by ISP first ( doesn't relate to /etc/hosts file ).
0
 
LVL 2

Expert Comment

by:munk33
ID: 16892594
The name resolution order is hosts file then dns. If an entry were in /etc/hosts it would not lookup a dns server, therefore use the ip set in the hosts file and connect to the desired ip.

I have used this myself, mainly to stop quering a dns server (for privacy reasons)

However.... maybe this is not correct in ur case??

Hope u solve ur issue :)
0
 

Author Comment

by:freshrain
ID: 16899264
Hello munk33,

203.162.148.163 & 203.162.148.164 are 2 real IP address, and my webserver' IP address is 192.168.8.3 ( local address ) . So, if internet user ( out side my network ) access my page,  then www.mydomain.com is always resolved by DNS server ( located at my ISP provider ) first. So, the /etc/hosts file only effect when we access www.mydomain.com. from webserver ifself.

VuNguyen
0
 
LVL 2

Expert Comment

by:munk33
ID: 16902323
Ah now i understand :)

From reading your question it was not clear to me that you were running a webserver. Clearly i thought you were trying to access an external site, and were trying to make your machine connect to a specific ip.

This server is DNS client
Now i want to configure to reach only to 203.162.148.163  or 203.162.148.164 when i ping to www.mydomain.com. What should we do now?

Thx for putting me straight :):)

0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question