Avatar of ahmad1467
ahmad1467
Flag for United States of America asked on

Setting TTL for DNS Host

I am in the process of setting up a second A record in my DNS for my domain name, my default TTL  is set for (7200) for my primary host IP but I’m trying to find a happy medium for the TTL so that it looks at the second IP before the web browser times out. As of now it reads

Primary:     www      .abc-123.com      TTL (7200)      IP (192.168.1.23)

Secondary:     www      .abc-123.com      TTL (7200)      IP (192.168.2.25)

 Any recommendations

Thanks
DNS

Avatar of undefined
Last Comment
giltjr

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
giltjr

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ahmad1467

ASKER
I'm looking to have a low TTL to allow me a backup path to access the web site if the main IP address is not available.
giltjr

O.K, as I stated in the 1st e-mail.  The only way that really works, is if you remove the "main" IP address from DNS.  As long as the IP address of the "main" server is in DNS, the server will respond with that address and the users will try to get it.

In fact there is no "main" and "secondary" addresses to DNS.  There is just a list of addresses.  The DNS server will hand it out in round robin form.  That is, 1st query get address #1, second query gets address #2, third query gets address #1, fourth query gets address #2, and so on.
ahmad1467

ASKER
I’m sorry this is all new to me; I just want to make sure we are talking about the same DNS record.Is this the DNS A record for my domain name? In my setup I have a domain name configure with two IP address from two different providers. On my firewall I have both connections coming in then in my FW rules I have two different Net Trans pointing to the same web server. Would this be the same thing?

Thanks
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
giltjr

Yes we are talking about A records.

You have a single A record with two IP addresses.  When I say "lookup hostname abc-123.com" the 1st time I will get back 192.168.1.23.  The next person will get back 192.168.2.25.  The next person will get back 192.168.1.23, and it keeps alternating.

If 192.168.1.23 goes down, the DNS server has no clue that it is down and will continue to respond with that address on every other query.  So every other person will attempt to connect to the IP address that is down.

Read on round robin dns here:

http://en.wikipedia.org/wiki/Round-robin_DNS