dhcpleasectl -l cnmac2
cnmac2 [Bound]
inet x.x.x.x netmask x.x.x.x
default gateway x.x.x.1
nameservers x.x.x.x x.x.x.x
lease 6 minutes
dhcp server x.x.x.1
I've gone on to try isc-dhcp-client from ports and it gets exactly the same
problem.
It's almost as though I have an arch issue - I've tried on another identical
device
with identical install - same problem.
I've tried plugging in with Apple Airport Extreme (NetBSD 4.0 ARM) does not
have the problem.
I've tried plugging in with Linux/NetworkManger - does not have the problem.
I might try swapping the egress interface from cnmac2 to cnmac1,cnmac0 and try
my luck there.
[ using 762392 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
Copyright (c) 1995-2023 OpenBSD. All rights reserved. https://www.OpenBSD.org
OpenBSD 7.3 (GENERIC.MP) #1242: Sat Mar 25 18:04:31 MDT 2023
[email protected]:/usr/src/sys/arch/octeon/compile/GENERIC.MP
real mem = 536870912 (512MB)
avail mem = 521093120 (496MB)
random: good seed from bootblocks
mainbus0 at root: board 20002 rev 2.12, model CN3xxx/CN5xxx
cpu0 at mainbus0: CN50xx CPU rev 0.1 500 MHz, Software FP emulation
cpu0: cache L1-I 32KB 4 way D 16KB 64 way, L2 128KB 8 way
cpu1 at mainbus0: CN50xx CPU rev 0.1 500 MHz, Software FP emulation
cpu1: cache L1-I 32KB 4 way D 16KB 64 way, L2 128KB 8 way
clock0 at mainbus0: int 5
octcrypto0 at mainbus0
iobus0 at mainbus0
simplebus0 at iobus0: "soc"
octciu0 at simplebus0
octsmi0 at simplebus0
octpip0 at simplebus0
octgmx0 at octpip0 interface 0
cnmac0 at octgmx0: port 0 RGMII, address dc:9f:db:28:14:bd
atphy0 at cnmac0 phy 7: AR8035 10/100/1000 PHY, rev. 2
cnmac1 at octgmx0: port 1 RGMII, address dc:9f:db:28:14:be
atphy1 at cnmac1 phy 6: AR8035 10/100/1000 PHY, rev. 2
cnmac2 at octgmx0: port 2 RGMII, address dc:9f:db:28:14:bf
atphy2 at cnmac2 phy 5: AR8035 10/100/1000 PHY, rev. 2
com0 at simplebus0: ns16550a, 64 byte fifo
com0: console
dwctwo0 at iobus0 base 0x1180068000000 irq 56
usb0 at dwctwo0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Octeon DWC2 root hub" rev 2.00/1.00
addr 1
octrng0 at iobus0 base 0x1400000000000 irq 0
umass0 at uhub0 port 1 configuration 1 interface 0 "Imation Atom USB Device"
rev 2.00/1.00 addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <Imation, Atom USB Device, PMAP> removable
serial.071805340503380BB56D
sd0: 7644MB, 512 bytes/sector, 15654912 sectors
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
root on sd0a (1e748e9c1a25cfa3.a) swap on sd0b dump on sd0b
On Wed, May 10, 2023 at 08:09:17AM +0200, Mike Fischer wrote:
> What does `# dhcpleasectl -l cnmac2` output on the machine you are using?
>
> Mine (OpenBSD 7.3 amd64 vm on the LAN) looks like this (anonymised):
> root@vm2:~# dhcpleasectl -l vio0
> vio0 [Bound]
> inet 192.168.x.220 netmask 255.255.255.0
> default gateway 192.168.x.1
> nameservers 192.168.x.1
> lease 24 hours <==== what is your lease time?
> dhcp server 192.168.x.1
> root@vm2:~#
>
> I suspect your lease time is much higher than 5 min. An ISP issuing leases as
> short as 5 min. would be highly unusual.
>
> You could try running dhcpleased manually like this to see details about what
> is going on:
> # dhcpleased -vv -d
>
> (But you???d need to stop the processes started by rc(8) first. E.g.: `#
> rcctl stop dhcpleased`. Don???t forget to `# rcctl start dhcpleased` when you
> are done with the testing.)
>
>
> Does the interface go down and up for some reason every 5 minutes? That might
> cause dhcpleased(8) to renew the lease.
>
>
> HTH
> Mike
>
> > Am 10.05.2023 um 07:28 schrieb Otto Moerbeek <[email protected]>:
> >
> > On Wed, May 10, 2023 at 01:17:05PM +1000, David Diggles wrote:
> >
> >>
> >> 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;
> >
> > dhcpleased does not use dhclient.conf, it used dhcpleased.conf, which
> > does not have a way to influence the lease time requested (if that is a
> > thing).
> >
> > -Otto
> >>
> >> 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)
> >>>
> >>
>
> --
> Mike Fischer
> [email protected]
>