Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

DNS problems

Posted on 2006-06-12
8
Medium Priority
?
481 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
Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

 
LVL 9

Accepted Solution

by:
jabiii earned 1500 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

Most of the applications these days are on Cloud. Cloud is ubiquitous with many service providers in the market. Since it has many benefits such as cost reduction, software updates, remote access, disaster recovery and much more.
Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Suggested Courses

604 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