Closed liang-hiwin closed 1 year ago
Thanks for the post. This task is to be done by the authoritative name server and not the recursive resolver. In simple terms, this is done by the owner of the domain name on their DNS server when they respond to requests. When you are running a local DNS server, there is nothing you can do.
May I ask how the cache of DnsServer responds to ecs through the subnet IP of the client?
May I ask how the cache of DnsServer responds to ecs through the subnet IP of the client?
Thanks for asking. The DNS cache keeps records separate for each client subnet. When query is received, the matching records from cache are returned.
In order to improve the accuracy of ecs, I have an idea. When the client attaches the ecs subnet to request domain name resolution, the dnsserver program first reads the real ip of the client, and then the dnsserver program analyzes the requested domain name. The ip data is compared with the client subnet ip, and when the parsed ip and the client subnet ip are in the same place, it will directly respond to the customer. But the idea is to need a more accurate city ip database.