[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dhclient.conf como usar?



Thunderblade Tempestis escreveu:
só pra constar...meu dhclient.conf, notem que tem uma linha estranha no request....isso sou eu testando e vendo no que dá.... +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Configuration file for /sbin/dhclient, which is included in Debian's
#       dhcp3-client package.
#
# This is a sample configuration file for dhclient. See dhclient.conf's
#       man page for more information about the syntax of this file
#       and a more comprehensive list of the parameters understood by
#       dhclient.
#
# Normally, if the DHCP server provides reasonable information and does
#       not leave anything out (like the domain name, for example), then
#       few changes must be made to this file, if any.
#

#send host-name "andare.fugue.com <http://andare.fugue.com>";
#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
#send dhcp-lease-time 3600;
#supersede domain-name " fugue.com <http://fugue.com> home.vix.com <http://home.vix.com>";
#prepend domain-name-servers 127.0.0.1 <http://127.0.0.1>;
request subnet-mask,
        broadcast-address,
        time-offset,
        routers,
        domain-name,
        domain-name-servers,
        host-name,
        netbios-name-servers,
        netbios-scope,
        interface-mtu;
        #option do-forward-updates false;

#require subnet-mask, domain-name-servers;
#timeout 60;
#retry 60;
#reboot 10;
#select-timeout 5;
#initial-interval 2;
#script "/etc/dhcp3/dhclient-script";
#media "-link0 -link1 -link2", "link0 link1";
#reject 192.33.137.209 <http://192.33.137.209>;

#alias {
#  interface "eth0";
#  fixed-address 192.5.5.213 <http://192.5.5.213>;
#  option subnet-mask 255.255.255.255 <http://255.255.255.255>;
#}

#lease {
#  interface "eth0";
#  fixed-address 192.33.137.200 <http://192.33.137.200>;
#  medium "link0 link1";
# option host-name " andare.swiftmedia.com <http://andare.swiftmedia.com>";
#  option subnet-mask 255.255.255.0 <http://255.255.255.0>;
#  option broadcast-address 192.33.137.255 <http://192.33.137.255>;
#  option routers 192.33.137.250 <http://192.33.137.250>;
#  option domain-name-servers 127.0.0.1 <http://127.0.0.1>;
#  renew 2 2000/1/12 00:00:01;
#  rebind 2 2000/1/12 00:00:01;
#  expire 2 2000/1/12 00:00:01;
#}

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Abraços

-Temp


Não entendi o quê você não quer sobrescrever no resolv.conf, o arquivo é sobreposto conforme uma função definida no shell script dhclient-script que por sua vez chama outros arquivos. O comportamento do dhclient é customizado pelo seu arquivo de configuração ou em último caso através da criação de "hooks" (que podem redefinir a função make_resolv_conf da maneira que você bem entender).

Se você simplesmente quer que algumas opções do arquivo resolv.conf sejam diferentes das fornecidas pelo servidor DHCP, você pode marcá-las com o modificador "supersede", como já consta no próprio arquivo de configuração comentado. Ou crie um hook e redefina a função para fazer o que você quer.


Atenciosamente.

Edmundo Valle Neto



Reply to: