dhclient - Aplicando alterações de configuração sem reinicialização

dhclient - Aplicando alterações de configuração sem reinicialização

Depois de editar algumas configurações no dhclientarquivo de configuração ( /etc/dhcp/dhclient.conf), as alterações não parecem ter nenhum efeito até que eu reinicie a máquina. Como dhclientestá sendo executado em segundo plano, acredito que o processo precisa ser reiniciado para realmente ler o arquivo de configuração novamente e aplicar as alterações.

Qual seria a melhor maneira de realizá-lo?

Na dhclientpágina de manual encontrei a seguinte opção:

-r            Release the current lease and stop the running  DHCP  client  as
              previously  recorded  in  the  PID file.  When shutdown via this
              method dhclient-script will be executed with the specific reason
              for calling the script set.  The client normally doesn't release
              the current lease as this is not required by the  DHCP  protocol
              but  some  cable ISPs require their clients to notify the server
              if they wish to release an assigned IP address.

Se eu entendi direito, essa opção mataria o dhcliente assim faria com que ele liberasse o arrendamento e lesse o arquivo de configuração novamente quando fosse iniciado (o que não tenho certeza se seria tão simples quanto chamar dhclient &).

Verificando a árvore de processos, notei também dhclientque é um processo filho de network-manager. Executar sudo service network-manager restartseria uma maneira mais limpa de dhclientcomeçar novamente com as novas configurações?

Responder1

Reative a conexão.

Por exemplo, via nmcli connection up $NAMEou qualquer outro cliente do NetworkManager.

Você normalmente não reiniciaria o NetworkManager.

informação relacionada