Local dns load balance

Okay, perfect.

[quote="JapCLoN, post:20, topic:53980"] router.myroute [/quote]

Use above if thats the one returned from the dhcp-discover.

Ooops sorry, it looks like above is advertised.
So configure myroute as a DNS domain suffix.

That I have done :slight_smile:

1 Like

Seems there is still one more thing.

Could you please try to create a custom dnsmasq configuration file (e.g. /etc/dnsmasq.d/42-custom-settings.conf) with the following option?

local-ttl=30

After running pihole restartdns, do you still see same order replies?

I just went on holidays today and the next few days forward, so I don't have access to the server atm, but will try and report back as soon I'm home again.

It's the same :slight_smile:

I have a few spare Raspberry pi's, I'll try setting a fresh up later today, just to see if it does the same and therefor just some random bug or somehow wrong setup on current setup.

The devs created a special version of Pi-hole's internal FTL (dnsmasq) engine which should increase logging while shuffling entries in the cache. Please feel free to try it via

pihole checkout ftl tweak/round-robin

and see if the increased verbosity gives any new insight. Please not that version is not meant for productive use as it increases logging a lot

You can go back an track with

pihole checkout ftl master

2 Likes

Okay, thank you very much, anything special I need to look for? :slight_smile:

Look for lines around the relevant domain - gateway.hostname in your case.

Mar 12 23:31:17 dnsmasq[13145]: /etc/pihole/custom.list gateway.hostname is 10.0.0.140
Mar 12 23:31:17 dnsmasq[13145]: /etc/pihole/custom.list gateway.hostname is 10.0.0.130
Mar 12 23:31:17 dnsmasq[13145]: query[AAAA] gateway.hostname from 10.0.0.194
Mar 12 23:31:17 dnsmasq[13145]: config gateway.hostname is NODATA-IPv6

Is what I see.

Have a look in /var/log/pihole-FTL.log

Don't see anything related in there.

Logs are indeed expected in pihole-FTL.log and look like

[2022-03-18 12:46:11.861 1922811M] Reordering cache for avatars.githubusercontent.com // 0x7f375d14d2f0 -> 0x7f375d14a960
[2022-03-18 12:46:11.861 1922811M] Reordering cache for avatars.githubusercontent.com // 0x7f375d158e30 -> 0x7f375d14a960
[2022-03-18 12:46:11.862 1922811M] Reordering cache for avatars.githubusercontent.com // 0x7f375d16a0f0 -> 0x7f375d15cbe0
[2022-03-18 12:46:11.863 1922811M] Reordering cache for avatars.githubusercontent.com // 0x7f375d161f70 -> 0x7f375d15cbe0
[2022-03-18 12:46:11.863 1922811M] Reordering cache for avatars.githubusercontent.com // 0x7f375d16c150 -> 0x7f375d15cbe0

whenever shuffling happens.

Okay, thank you. Will look for them.

I do see some of those, just not for gateway.hostname, no matter what I do to force the request.

I just tried to add test.hostname with 2 IPs, those 2 gets shuffled, but not gateway.hostname :thinking:

and when looking at the logs I can also see that the cache for test.hostname has been shuffled, but again nothing about gateway.hostname

Are both defined in the same file? Is there any noteworthy difference between the two? How are they defined exactly (sorry to ask again if this has already been said in here)?

This is my current hostfile (/etc/pihole/custom.list)

10.0.0.150 grandpa.h1dden
10.0.0.120 niece.h1dden
10.0.0.15 nas.01a.h1dden
10.0.0.1 router.h1dden
10.0.0.25 2g.wifi.h1dden
10.0.0.170 mom.h1dden
10.0.0.160 dad.h1dden
10.0.0.170 database.h1dden
10.0.0.130 son.h1dden
10.0.0.110 sister.h1dden
10.0.0.160 dubl.h1dden
10.0.0.160 list.dubl.h1dden
10.0.0.140 irc.h1dden
10.0.0.130 ntp.h1dden
10.0.0.237 nvr.h1dden
10.0.0.140 music.h1dden
10.0.0.160 git.h1dden
10.0.0.140 daughter.irc.h1dden
10.0.0.130 son.irc.h1dden
10.0.0.130 irc.h1dden
10.0.0.110 services.irc.h1dden
10.0.0.200 lala.h1dden
10.0.0.201 lala.h1dden

irc.h1dden is the one I referred as gateway.hostname which doesn't work and lala.h1dden is referred as test.hostname which works.

Okay, this shows some difference, even when it isn't clear right away:

  1. The lala.h1dden which is test.hostname works as expected
    These addresses are exclusively tied to lala.h1dden:
    10.0.0.200 -> lala.h1dden
    10.0.0.201 -> lala.h1dden
  2. The irc.h1dden which is gateway.hostname doesn't work
    The addresses are shared with other host names:
    10.0.0.130 -> irc.h1dden, son.h1dden, ntp.h1dden, son.irc.h1dden
    10.0.0.140 -> irc.h1dden, music.h1dden, daughter.irc.h1dden

Is the latter (sharing of the addresses) expected and intended?