CentOS 8 clear the DNS cache

nscd (Name Service Cache Daemon) is capable cache passwd, group, hosts local cache service, corresponding to the three source /etc/passwd,/etc/hosts,/etc/resolv.conf. Its most obvious effect is to accelerate the speed of DNS resolution, frequent calls within the network environment is recommended to turn the interface.

Clear Cache command

There may nscd not installed, the following explain what, installation, startup, clear cache command

1. Install nscd

CentOS 8 clear the DNS cache

2. Check the status and startup command

CentOS 8 clear the DNS cache

# View the status systemctl start nscd

# Enable nscd

nscd service is off by default, opened by service nscd start.

CentOS 8 clear the DNS cache

3. After starting nscd service, clear cache

CentOS 8 clear the DNS cache

When you turn nscd service caches of hosts, each internal interface requests are not initiated dns resolve the request, but a direct hit nscd cache hash table, so as to obtain the corresponding server ip address, this can reduce the response time when a large number of internal interfaces of interface requests .

Guess you like

Origin www.linuxidc.com/Linux/2019-10/161220.htm