ifupdown change parameters dhclient
0
votes
1
answer
932
views
I have Ubuntu 20.04 where I gave all network functions to ifupdown.
1 of my interface got network parameters by dhclient:
#/etc/network/interfaces
allow-hotplug enp2s0
auto enp2s0
iface enp2s0 inet dhcp
Dhclient starts with such parameters:
#ps -Af | grep dhclient
/sbin/dhclient -1 -4 -v -i -pf /run/dhclient.enp2s0.pid -lf /var/lib/dhcp/dhclient.enp2s0.leases -I -df /var/lib/dhcp/dhclient6.enp2s0.leases enp2s0
Dhclient version:
# dhclient --version
isc-dhclient-4.4.1
Client config:
# cat /etc/dhcp/dhclient.conf
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
send host-name = gethostname();
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers,
netbios-name-servers, netbios-scope, interface-mtu,
rfc3442-classless-static-routes, ntp-servers;
timeout 60;
retry 60;
reboot 10;
reject 10.100.0.2;
Tired to google how to change parameters for dhclient start(I want to start it without -1 and in daemon mode), like this:
/sbin/dhclient -nw -4 -v -pf /run/dhclient.enp2s0.pid -lf /var/lib/dhcp/dhclient.enp2s0.leases -I -df /var/lib/dhcp/dhclient6.enp2s0.leases enp2s0
How I can do it?
Thank you!
Asked by KonstantinKuklin
(205 rep)
Apr 17, 2022, 03:49 PM
Last activity: Apr 18, 2022, 06:08 PM
Last activity: Apr 18, 2022, 06:08 PM