Table of Contents

Linux - The DNS resolver (/etc/resolv.conf)

About

The file /etc/resolv.conf is used by the resolver.

Two Domain Name System (DNS) resolver parameters (timeout and attempts) are set by default to low values when the operating system is installed.

Typical resolve.conf file:

cat /etc/resolv.conf
; generated by /sbin/dhclient-script
search cornac.net
nameserver 192.168.2.1

where:

Check the DNS nameserver used

How to check the DNS nameserver used

Resolvectl

resolvectl status
Global
         Protocols: LLMNR=resolve -mDNS -DNSOverTLS DNSSEC=no/unsupported
  resolv.conf mode: stub

Link 2 (eth0)
    Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
         Protocols: +DefaultRoute LLMNR=resolve -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 213.186.33.99
       DNS Servers: 213.186.33.99
        DNS Domain: openstacklocal

Link 3 (wg0)
    Current Scopes: DNS
         Protocols: +DefaultRoute LLMNR=resolve -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 1.1.1.1
       DNS Servers: 1.1.1.1
        DNS Domain: ~.

systemd-resolve

systemd-resolve --status
Global
         Protocols: LLMNR=resolve -mDNS -DNSOverTLS DNSSEC=no/unsupported
  resolv.conf mode: stub

Link 2 (eth0)
    Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
         Protocols: +DefaultRoute LLMNR=resolve -mDNS -DNSOverTLS
                    DNSSEC=no/unsupported
Current DNS Server: 213.186.33.99
       DNS Servers: 213.186.33.99
        DNS Domain: openstacklocal

Link 6 (wg0)
    Current Scopes: none
         Protocols: -DefaultRoute LLMNR=resolve -mDNS -DNSOverTLS
                    DNSSEC=no/unsupported

In the case of an Oracle database installation

Options

These low values may cause attempted network connections to an Oracle database to fail. If this happens, add or update the following entries to these minimum settings in the /etc/resolv.conf file on each server node:

options attemps:5
options timeout:15

nameserver

The nameserver is used by the listener. If the value is set with a bad DNS server, it may cause very slow connection. Suppress the parameter or set a good value.