Just to update, I've added the following to dhclient.conf but it's still renewing every 5 minutes (approximately) and the default route is disappearing for a couple of seconds. :(
send dhcp-lease-time 86400; On Wed, May 10, 2023 at 01:00:00PM +1000, David Diggles wrote: > My ISP provides connection via DHCP. > > Every 5 minutes or so when dhcpleased is renewing the lease, > my default route disappears for a few seconds. > > Definitely I'll be looking at requesting a longer lease by > putting a setting in /etc/dhclient.conf but is there any way > I can stop the default route disappearing with each renew event? > > The route didn't disappear when I tested with NetBSD and Linux. > > This seems like I'm missing a setting in dhclient.conf to make > the default route sticky? I can't see any obvious answers in > the man page for dhclient.conf unfortunately. > > (IP fudged log snippet below) > > May 10 12:23:21 openbsd-gateway dhcpleased[77979]: deleting nameservers > x.x.x.x x.x.x.x (lease from x.x.x.1 on cnmac2) > May 10 12:23:21 openbsd-gateway dhcpleased[77979]: deleting x.x.x.30 from > cnmac2 (lease from x.x.x.1) > May 10 12:23:23 openbsd-gateway dhcpleased[77979]: adding x.x.x.30 to cnmac2 > (lease from x.x.x.1) > May 10 12:23:23 openbsd-gateway dhcpleased[77979]: adding nameservers x.x.x.x > x.x.x.x (lease from x.x.x.1 on cnmac2) > May 10 12:28:23 openbsd-gateway dhcpleased[77979]: deleting nameservers > x.x.x.x x.x.x.x (lease from x.x.x.1 on cnmac2) > May 10 12:28:23 openbsd-gateway dhcpleased[77979]: deleting x.x.x.30 from > cnmac2 (lease from x.x.x.1) > May 10 12:28:25 openbsd-gateway dhcpleased[77979]: adding x.x.x.30 to cnmac2 > (lease from x.x.x.1) > May 10 12:28:25 openbsd-gateway dhcpleased[77979]: adding nameservers x.x.x.x > x.x.x.x (lease from x.x.x.1 on cnmac2) > May 10 12:33:26 openbsd-gateway dhcpleased[77979]: deleting nameservers > x.x.x.x x.x.x.x (lease from x.x.x.1 on cnmac2) > May 10 12:33:26 openbsd-gateway dhcpleased[77979]: deleting x.x.x.30 from > cnmac2 (lease from x.x.x.1) > May 10 12:33:28 openbsd-gateway dhcpleased[77979]: adding x.x.x.30 to cnmac2 > (lease from x.x.x.1) > May 10 12:33:28 openbsd-gateway dhcpleased[77979]: adding nameservers x.x.x.x > x.x.x.x (lease from x.x.x.1 on cnmac2) > May 10 12:38:28 openbsd-gateway dhcpleased[77979]: deleting nameservers > x.x.x.x x.x.x.x (lease from x.x.x.1 on cnmac2) > May 10 12:38:28 openbsd-gateway dhcpleased[77979]: deleting x.x.x.30 from > cnmac2 (lease from x.x.x.1) > May 10 12:38:30 openbsd-gateway dhcpleased[77979]: adding x.x.x.30 to cnmac2 > (lease from x.x.x.1) > May 10 12:38:30 openbsd-gateway dhcpleased[77979]: adding nameservers x.x.x.x > x.x.x.x (lease from x.x.x.1 on cnmac2) >