Skip to content

dhcpcd expires lease when config file changes #482

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Sateesh-Patil opened this issue Mar 10, 2025 · 10 comments
Open

dhcpcd expires lease when config file changes #482

Sateesh-Patil opened this issue Mar 10, 2025 · 10 comments

Comments

@Sateesh-Patil
Copy link

Hi Team,

We wanted to update the configuration details to the DHCP server like, hostname and domain name during the bootup with dhcpcd rebind. So Is there any way to trigger dhcpcd rebind without releasing existing IP to just update the details to DHCP server.?

curerently rebind will trigger DEL_ADDR followed by NEW_ADDR event.

Regards,
Sateesh R Patil

@rsmarples
Copy link
Member

Huh? dhcpcd will only release on rebind when NAKed by the server.
On the happy path a rebind will not delete any IP address.

@Sateesh-Patil
Copy link
Author

dhcpcd --rebind eth0
#:dhcpcd --rebind eth0
#:sending signal HUP to pid 1457
#:[root@SampleHostName ]#
#:Deleted 2: eth0 inet6 2001::9f:5cc9:2ea:103a/128 scope global dynamic noprefixroute
#: valid_lft 3474sec preferred_lft 174sec
#:Deleted local 2001::9f:5cc9:2ea:103a dev eth0 proto kernel metric 0 pref medium
#:Deleted 2: eth0 inet 192.168.1.14/24 brd 192.168.1.255 scope global dynamic noprefixroute eth0
#: valid_lft 2861sec preferred_lft 2411sec

#:Deleted broadcast 192.168.1.255 dev eth0 table local proto kernel scope link src 192.168.1.14
#:Deleted broadcast 192.168.1.0 dev eth0 table local proto kernel scope link src 192.168.1.14
#:Deleted local 192.168.1.14 dev eth0 table local proto kernel scope host src 192.168.1.14
#:Deleted 192.168.111.122 dev eth0 scope link src 192.168.1.14 metric 1002
#:Deleted 192.168.1.0/24 dev eth0 proto dhcp scope link src 192.168.1.14 metric 1002
#:Deleted default via 192.168.111.122 dev eth0 proto dhcp src 192.168.1.14 metric 1002
#:Deleted 192.168.1.6 dev eth0 lladdr 00:0c:29:7b:5f:62 STALE
#:Deleted 192.168.1.5 dev eth0 lladdr 00:1f:29:05:5c:dc REACHABLE
#:Deleted 192.168.111.122 dev eth0 FAILED
#:Deleted 192.168.1.1 dev eth0 lladdr 24:f5:a2:27:04:c8 STALE
#:Deleted 224.0.0.252 dev eth0 lladdr 01:00:5e:00:00:fc NOARP
#:Deleted 239.255.255.250 dev eth0 lladdr 01:00:5e:7f:ff:fa NOARP
#:Deleted 224.0.0.251 dev eth0 lladdr 01:00:5e:00:00:fb NOARP
#:Deleted 224.0.0.2 dev eth0 lladdr 01:00:5e:00:00:02 NOARP
#:Deleted 192.168.1.16 dev eth0 lladdr e8:39:35:30:27:88 STALE
#:Deleted 224.0.1.60 dev eth0 lladdr 01:00:5e:00:01:3c NOARP
#:169.254.0.0/16 dev eth0 scope link metric 1001
#:2: eth0 inet6 2001::9f:5cc9:2ea:103a/128 scope global tentative dynamic noprefixroute
#: valid_lft 3600sec preferred_lft 300sec
#:2: eth0 inet6 2001::9f:5cc9:2ea:103a/128 scope global dynamic noprefixroute
#: valid_lft 3599sec preferred_lft 299sec
#:local 2001::9f:5cc9:2ea:103a dev eth0 proto kernel metric 0 pref medium
#:2: eth0 inet 192.168.1.14/24 brd 192.168.1.255 scope global dynamic noprefixroute eth0
#: valid_lft 3600sec preferred_lft 3150sec

After sending rebind command, we are getting DEL_ADDR followed by NEW_ADDR from netlink.

@Sateesh-Patil Sateesh-Patil changed the title Is there any way to trigger dhcpcd rebind without releasing existing IP. Is there any way to trigger dhcpcd rebind without releasing existing IP.[means without DEL_ADDR followed by NEW_ADDR] from netlink Mar 10, 2025
@rsmarples
Copy link
Member

How do you know dhcpcd is doing that? Can you post a debug log of dhcpcd showing what it does during a rebind please?

@Sateesh-Patil
Copy link
Author

Sateesh-Patil commented Mar 11, 2025

I can see above DEL_ADDR followed by NEW_ADDR in ip monitor log after doing 'dhcpcd --rebind eth0' and looks like config is reloading but not sure what internally dhcpcd does.

Please find the below dhcpcd log

cat dhcpcd.log
#:cat dhcpcd.log
#:Mar 11 02:30:50 [1471]: dhcpcd-10.0.10 starting
#:Mar 11 02:30:50 [1471]: chrooting as dhcpcd to /var/lib/dhcpcd
#:Mar 11 02:30:50 [1471]: sandbox: seccomp
#:Mar 11 02:30:50 [1483]: spawned manager process on PID 1483
#:Mar 11 02:30:50 [1483]: spawned privileged proxy on PID 1485
#:Mar 11 02:30:50 [1483]: spawned network proxy on PID 1486
#:Mar 11 02:30:50 [1483]: spawned controller proxy on PID 1487
#:Mar 11 02:30:50 [1483]: DUID 00:01:00:01:2e:4f:17:b9:2c:58:b9:60:25:23
#:Mar 11 02:30:51 [1471]: forked to background
#:Mar 11 02:30:51 [1483]: eth0: executing: /usr/libexec/dhcpcd-run-hooks PREINIT
#:Mar 11 02:30:51 [1483]: eth0: executing: /usr/libexec/dhcpcd-run-hooks CARRIER
#:Mar 11 02:30:51 [1562]: dhcpcd-10.0.10 starting
#:Mar 11 02:30:51 [1562]: chrooting as dhcpcd to /var/lib/dhcpcd
#:Mar 11 02:30:51 [1562]: sandbox: seccomp
#:Mar 11 02:30:51 [1570]: spawned manager process on PID 1570
#:Mar 11 02:30:51 [1570]: spawned privileged proxy on PID 1571
#:Mar 11 02:30:51 [1570]: spawned network proxy on PID 1572
#:Mar 11 02:30:51 [1570]: spawned controller proxy on PID 1573
#:Mar 11 02:30:51 [1570]: DUID 00:01:00:01:2e:4f:17:b9:2c:58:b9:60:25:23
#:Mar 11 02:30:51 [1483]: eth0: IAID b9:60:25:24
#:Mar 11 02:30:51 [1483]: eth0: delaying DHCPv6 for LL address
#:Mar 11 02:30:51 [1483]: eth0: delaying IPv4 for 0.3 seconds
#:Mar 11 02:30:51 [1483]: eth0: using ClientID 01:2c:58:b9:60:25:24
#:Mar 11 02:30:51 [1483]: eth0: reading lease: /var/lib/dhcpcd/eth0.lease
#:Mar 11 02:30:51 [1483]: eth0: soliciting a DHCP lease
#:Mar 11 02:30:51 [1485]: eth0: spawned BPF BOOTP on PID 1618
#:Mar 11 02:30:51 [1483]: eth0: sending DISCOVER (xid 0xc4cbdbd1), next in 3.5 seconds
#:Mar 11 02:30:51 [1483]: eth0: offered 192.168.1.14 from 192.168.1.6
#:Mar 11 02:30:51 [1485]: eth0: process BPF BOOTP already started on pid 1618
#:Mar 11 02:30:51 [1483]: eth0: sending REQUEST (xid 0xc4cbdbd1), next in 3.9 seconds
#:Mar 11 02:30:51 [1483]: eth0: acknowledged 192.168.1.14 from 192.168.1.6
#:Mar 11 02:30:51 [1485]: eth0: spawned BPF ARP 192.168.1.14 on PID 1649
#:Mar 11 02:30:51 [1483]: eth0: probing address 192.168.1.14/24
#:Mar 11 02:30:51 [1483]: eth0: probing for 192.168.1.14
#:Mar 11 02:30:51 [1483]: eth0: ARP probing 192.168.1.14 (1 of 3), next in 1.1 seconds
#:Mar 11 02:30:52 [1570]: wlan0: executing: /usr/libexec/dhcpcd-run-hooks PREINIT
#:Mar 11 02:30:52 [1562]: forked to background
#:Mar 11 02:30:52 [1570]: wlan0: executing: /usr/libexec/dhcpcd-run-hooks NOCARRIER
#:Mar 11 02:30:52 [1570]: wlan0: waiting for carrier
#:Mar 11 02:30:52 [1483]: eth0: reading lease: /var/lib/dhcpcd/eth0.lease6
#:Mar 11 02:30:52 [1483]: eth0: soliciting a DHCPv6 lease
#:Mar 11 02:30:52 [1485]: eth0: spawned DHCP6 proxy fe80::2e58:b9ff:fe60:2524 on PID 1763
#:Mar 11 02:30:52 [1483]: eth0: delaying SOLICIT6 (xid 0xd9e0d8), next in 1.0 seconds
#:Mar 11 02:30:52 [1483]: eth0: ARP probing 192.168.1.14 (2 of 3), next in 1.7 seconds
#:Mar 11 02:30:53 [1483]: eth0: multicasting SOLICIT6 (xid 0xd9e0d8), next in 1.1 seconds
#:Mar 11 02:30:53 [1483]: eth0: ADV 2001::29da:538d:e79e:c526/128 from 2001::1234
#:Mar 11 02:30:54 [1483]: eth0: ARP probing 192.168.1.14 (3 of 3), next in 2.0 seconds
#:Mar 11 02:30:54 [1483]: eth0: multicasting REQUEST6 (xid 0x9b31f6), next in 1.1 seconds
#:Mar 11 02:30:54 [1483]: eth0: REPLY6 received from 2001::1234
#:Mar 11 02:30:54 [1483]: eth0: adding address 2001::29da:538d:e79e:c526/128
#:Mar 11 02:30:54 [1483]: eth0: pltime 300 seconds, vltime 3600 seconds
#:Mar 11 02:30:54 [1483]: eth0: renew in 150, rebind in 240, expire in 3600 seconds
#:Mar 11 02:30:54 [1483]: eth0: writing lease: /var/lib/dhcpcd/eth0.lease6
#:Mar 11 02:30:54 [1483]: eth0: waiting for DHCPv6 DAD to complete
#:Mar 11 02:30:54 [1485]: eth0: spawned DHCP6 proxy 2001::2e58:b9ff:fe60:2524 on PID 1777
#:Mar 11 02:30:55 [1485]: eth0: spawned DHCP6 proxy 2001::29da:538d:e79e:c526 on PID 1787
#:Mar 11 02:30:55 [1483]: eth0: DHCPv6 DAD completed
#:Mar 11 02:30:55 [1483]: eth0: executing: /usr/libexec/dhcpcd-run-hooks BOUND6
#:Mar 11 02:30:56 [1483]: eth0: DAD completed for 192.168.1.14
#:Mar 11 02:30:56 [1483]: eth0: leased 192.168.1.14 for 3600 seconds
#:Mar 11 02:30:56 [1483]: eth0: renew in 1800 seconds, rebind in 3150 seconds
#:Mar 11 02:30:56 [1483]: eth0: writing lease: /var/lib/dhcpcd/eth0.lease
#:Mar 11 02:30:56 [1483]: eth0: adding IP address 192.168.1.14/24 broadcast 192.168.1.255
#:Mar 11 02:30:56 [1483]: eth0: router 192.168.111.122 requires a host route
#:Mar 11 02:30:56 [1483]: eth0: adding route to 192.168.1.0/24
#:Mar 11 02:30:56 [1483]: eth0: adding host route to 192.168.111.122
#:Mar 11 02:30:56 [1483]: eth0: adding default route via 192.168.111.122
#:Mar 11 02:30:56 [1483]: eth0: ARP announcing 192.168.1.14 (1 of 2), next in 2.0 seconds
#:Mar 11 02:30:56 [1483]: eth0: executing: /usr/libexec/dhcpcd-run-hooks BOUND
#:Mar 11 02:30:56 [1485]: eth0: spawned BOOTP proxy 192.168.1.14 on PID 1877
#:Mar 11 02:30:56 [1485]: eth0: BPF BOOTP exited from PID 1618
#:Mar 11 02:30:58 [1483]: eth0: ARP announcing 192.168.1.14 (2 of 2)
#:Mar 11 02:30:59 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:30:59 [1570]: control command: dhcpcd -q -U wlan0
#:Mar 11 02:30:59 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:30:59 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:30:59 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:00 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:00 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:00 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:00 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:00 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:00 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:00 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:00 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:00 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:00 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:06 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:06 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:06 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:06 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:06 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:06 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:09 [2181]: sending signal HUP to pid 1483
#:Mar 11 02:31:09 [1483]: received SIGHUP, rebinding
#:Mar 11 02:31:09 [1483]: eth0: executing: /usr/libexec/dhcpcd-run-hooks RECONFIGURE
#:Mar 11 02:31:09 [2187]: sending signal HUP to pid 1570
#:Mar 11 02:31:09 [1570]: received SIGHUP, rebinding
#:Mar 11 02:31:09 [1570]: wlan0: executing: /usr/libexec/dhcpcd-run-hooks RECONFIGURE
#:Mar 11 02:31:09 [1483]: eth0: config file changed, expiring leases
#:Mar 11 02:31:09 [1483]: eth0: deleting address 2001::29da:538d:e79e:c526/128
#:Mar 11 02:31:09 [1483]: eth0: router 192.168.111.122 requires a host route
#:Mar 11 02:31:09 [1483]: eth0: executing: /usr/libexec/dhcpcd-run-hooks EXPIRE6
#:Mar 11 02:31:09 [1570]: wlan0: config file changed, expiring leases
#:Mar 11 02:31:09 [1570]: wlan0: waiting for carrier
#:Mar 11 02:31:09 [1485]: eth0: DHCP6 proxy 2001::29da:538d:e79e:c526 exited from PID 1787
#:Mar 11 02:31:09 [1483]: eth0: deleting IP address 192.168.1.14/24
#:Mar 11 02:31:09 [1483]: eth0: deleting host route to 192.168.111.122
#:Mar 11 02:31:09 [1483]: eth0: deleting route to 192.168.1.0/24
#:Mar 11 02:31:09 [1483]: eth0: deleting default route via 192.168.111.122
#:Mar 11 02:31:09 [1483]: eth0: executing: /usr/libexec/dhcpcd-run-hooks EXPIRE
#:Mar 11 02:31:09 [1485]: eth0: BPF ARP 192.168.1.14 exited from PID 1649
#:Mar 11 02:31:09 [1483]: eth0: IAID b9:60:25:24
#:Mar 11 02:31:09 [1483]: eth0: reading lease: /var/lib/dhcpcd/eth0.lease6
#:Mar 11 02:31:09 [1483]: eth0: confirming prior DHCPv6 lease
#:Mar 11 02:31:09 [1483]: eth0: delaying CONFIRM6 (xid 0x2087f2), next in 1.0 seconds
#:Mar 11 02:31:09 [1483]: eth0: delaying IPv4 for 0.8 seconds
#:Mar 11 02:31:10 [1483]: eth0: using ClientID 01:2c:58:b9:60:25:24
#:Mar 11 02:31:10 [1483]: eth0: reading lease: /var/lib/dhcpcd/eth0.lease
#:Mar 11 02:31:10 [1483]: eth0: rebinding lease of 192.168.1.14
#:Mar 11 02:31:10 [1485]: eth0: spawned BPF ARP 192.168.1.14 on PID 2321
#:Mar 11 02:31:10 [1483]: eth0: sending REQUEST (xid 0xb26bfaf8), next in 3.3 seconds
#:Mar 11 02:31:10 [1485]: eth0: spawned BPF BOOTP on PID 2322
#:Mar 11 02:31:10 [1483]: eth0: acknowledged 192.168.1.14 from 192.168.1.6
#:Mar 11 02:31:10 [1483]: eth0: probing address 192.168.1.14/24
#:Mar 11 02:31:10 [1483]: eth0: probing for 192.168.1.14
#:Mar 11 02:31:10 [1483]: eth0: ARP probing 192.168.1.14 (1 of 3), next in 1.6 seconds
#:Mar 11 02:31:10 [1483]: eth0: multicasting CONFIRM6 (xid 0x2087f2), next in 1.0 seconds
#:Mar 11 02:31:10 [1483]: eth0: REPLY6 received from 2001::1234
#:Mar 11 02:31:10 [1483]: eth0: adding address 2001::29da:538d:e79e:c526/128
#:Mar 11 02:31:10 [1483]: eth0: pltime 300 seconds, vltime 3600 seconds
#:Mar 11 02:31:10 [1483]: eth0: renew in 134, rebind in 224, expire in 3584 seconds
#:Mar 11 02:31:10 [1483]: eth0: waiting for DHCPv6 DAD to complete
#:Mar 11 02:31:10 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:10 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:12 [1483]: eth0: ARP probing 192.168.1.14 (2 of 3), next in 1.7 seconds
#:Mar 11 02:31:12 [1485]: eth0: spawned DHCP6 proxy 2001::29da:538d:e79e:c526 on PID 2331
#:Mar 11 02:31:12 [1483]: eth0: DHCPv6 DAD completed
#:Mar 11 02:31:12 [1483]: eth0: executing: /usr/libexec/dhcpcd-run-hooks REBOOT6
#:Mar 11 02:31:12 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:12 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:12 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:12 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:12 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:12 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:13 [1483]: eth0: ARP probing 192.168.1.14 (3 of 3), next in 2.0 seconds
#:Mar 11 02:31:15 [1483]: eth0: DAD completed for 192.168.1.14
#:Mar 11 02:31:15 [1483]: eth0: leased 192.168.1.14 for 3600 seconds
#:Mar 11 02:31:15 [1483]: eth0: renew in 1800 seconds, rebind in 3150 seconds
#:Mar 11 02:31:15 [1483]: eth0: writing lease: /var/lib/dhcpcd/eth0.lease
#:Mar 11 02:31:15 [1483]: eth0: adding IP address 192.168.1.14/24 broadcast 192.168.1.255
#:Mar 11 02:31:15 [1483]: eth0: router 192.168.111.122 requires a host route
#:Mar 11 02:31:15 [1483]: eth0: adding route to 192.168.1.0/24
#:Mar 11 02:31:15 [1483]: eth0: adding host route to 192.168.111.122
#:Mar 11 02:31:15 [1483]: eth0: adding default route via 192.168.111.122
#:Mar 11 02:31:15 [1483]: eth0: ARP announcing 192.168.1.14 (1 of 2), next in 2.0 seconds
#:Mar 11 02:31:15 [1483]: eth0: executing: /usr/libexec/dhcpcd-run-hooks BOUND
#:Mar 11 02:31:15 [1485]: eth0: spawned BOOTP proxy 192.168.1.14 on PID 2502
#:Mar 11 02:31:15 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:15 [1485]: eth0: BOOTP proxy 192.168.1.14 exited from PID 1877
#:Mar 11 02:31:15 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:15 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:15 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:15 [1485]: eth0: BPF BOOTP exited from PID 2322
#:Mar 11 02:31:16 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:16 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:16 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:16 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:16 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:16 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:16 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:16 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:16 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:16 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:16 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:16 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:16 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:16 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:16 [1483]: control command: dhcpcd -q -U eth0
#:Mar 11 02:31:17 [1483]: eth0: ARP announcing 192.168.1.14 (2 of 2)
#:Mar 11 02:33:24 [1483]: eth0: multicasting RENEW6 (xid 0x0196fd), next in 10.5 seconds
#:Mar 11 02:33:24 [1483]: eth0: REPLY6 received from 2001::1234
#:Mar 11 02:33:24 [1483]: eth0: adding address 2001::29da:538d:e79e:c526/128
#:Mar 11 02:33:24 [1483]: eth0: pltime 300 seconds, vltime 3600 seconds
#:Mar 11 02:33:24 [1483]: eth0: renew in 150, rebind in 240, expire in 3600 seconds
#:Mar 11 02:33:24 [1483]: eth0: writing lease: /var/lib/dhcpcd/eth0.lease6
#:Mar 11 02:33:24 [1483]: eth0: executing: /usr/libexec/dhcpcd-run-hooks RENEW6
#:Mar 11 02:33:25 [1485]: eth0: process DHCP6 proxy 2001::29da:538d:e79e:c526 already started on pid 2331
#:Mar 11 02:34:46 [1485]: eth0: process DHCP6 proxy 2001::2e58:b9ff:fe60:2524 already started on pid 1777

@rsmarples rsmarples changed the title Is there any way to trigger dhcpcd rebind without releasing existing IP.[means without DEL_ADDR followed by NEW_ADDR] from netlink dhcpcd expires lease when config file changes Mar 11, 2025
@rsmarples
Copy link
Member

From your log: eth0: config file changed, expiring leases

So now the question - why are you changing the config file?

@Sateesh-Patil
Copy link
Author

Sateesh-Patil commented Mar 11, 2025

We do update user/admin configuration like hostname, domain name, and FQDN configurations in the dhcpcd.conf file, and to update the DHCP server for these updates, we triggering 'dhcpcd rebind' as this will reload the configuration and send update to dhcp server.

@Sateesh-Patil
Copy link
Author

Any option to trigger rebind without loosing ip address?

@rsmarples
Copy link
Member

The only option right now is to not change the config file.
We do this so we can remove static config which is no longer set and this would need to be addressed at a minimum before looking at changing this behavior.

@Sateesh-Patil
Copy link
Author

Currently, we do need to update in the conf file for manual configuration hostname/domain name and send updates to dhcp server, so rebind only the option. If not we will end up with not updating the current configuration to dhcp server and device will not have proper sync with server its connected.

@rsmarples
Copy link
Member

Why can't you set the hostname using the hostname command?
If dhcpcd has the hostname option set without a string afterwards it will send the hostname as set, including any domain.
You shouldn't need to keep changing dhcpcd.conf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants