Solved

DNS problems

Posted on 2006-06-12
8
444 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
  • 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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Additional DC vs Child Domain 12 42
Office 365 Public IP configuration on DNS ? 7 52
Help with Relays between Exchange 2003 and Exchange 2010 3 23
domian network access 5 23
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

831 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