3 votes

resolv.conf vs fichier de base

Voici mon fichier de base

root@iracavcsdbc03:~# cat /etc/resolvconf/resolv.conf.d/base
nameserver 1.1.1.1
nameserver 2.2.2.2
nameserver 3.3.3.3
nameserver 4.4.4.4

Après avoir exécuté resolvconf -u pourquoi la nouvelle génération resolv.conf ne montre que 3 IPs et non les 4 comme mentionné dans le fichier de base ?

root@iracavcsdbc03:~# cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
#
# Modify /etc/resolvconf/resolv.conf.d/base to make changes permanent!
#
nameserver 1.1.1.1
nameserver 2.2.2.2
nameserver 3.3.3.3
search infra.aic.att.net
options attempts:2
options timeout:3

3voto

La mise à jour script pour resolvconf écrit jusqu'à trois lignes de serveur de noms dans resolv.conf.

Si vous accédez aux pages de manuel de resolvconf vous pouvez trouver cette information :

$ man resolvconf

Passez à la ligne 47, ou libc sous-section de CONSOMMATEURS D'INFORMATIONS SUR LES SERVEURS DE NOMS et surveillez les numéro 1 article :

   libc
       The most important software package that  subscribes  to  the  notification  service  is  the  GNU  C  Library
       resolver(3).   This  library  is used by many applications that need to resolve domain names.  When nameserver
       information is updated, the script /etc/resolvconf/update.d/libc generates a new version of the resolver  con
       figuration file, /run/resolvconf/resolv.conf, as described below.  If the new version of the file differs from
       the previously generated one then the hook scripts found in /etc/resolvconf/update-libc.d/ are executed.

       The dynamically generated resolver  configuration  file  always  starts  with  the  contents  of  /etc/resolv
       conf/resolv.conf.d/head  and  ends  with the contents of /etc/resolvconf/resolv.conf.d/tail.  Between head and
       tail the libc script inserts dynamic nameserver information compiled from,  first,  information  provided  for
       configured  interfaces;  second, static information from /etc/resolvconf/resolv.conf.d/base.  Specifically, it
       writes:

         1) up to three nameserver lines, ordered according to /etc/resolvconf/interface-order, possibly fewer if one
            of  the  addresses is a loopback address and the TRUNCATE_NAMESERVER_LIST_AFTER_LOOPBACK_ADDRESS environ
            ment variable is affirmatively set, as discussed in the ENVIRONMENT VARIABLES section;

         2) up to one search line containing the combined domain search list from all  "domain"  and  "search"  input
            lines, also ordered according to interface-order(5);

         3) all other non-comment input lines.

SistemesEz.com

SystemesEZ est une communauté de sysadmins où vous pouvez résoudre vos problèmes et vos doutes. Vous pouvez consulter les questions des autres sysadmins, poser vos propres questions ou résoudre celles des autres.

Powered by:

X