For the past 1.5 years or more, I have dealt with consistent
terminations of dhcpcd(8). I "solved" this by having a ksh(1) script
that runs every 30 minutes that starts it anytime it is not running.

/var/log/daemon shows the following when it terminates:

Jan  4 11:00:37 router dhcpcd[34862]: ps_inet_dodispatch: Connection
reset by peer
Jan  4 11:00:37 router dhcpcd[34862]: control_free: No such file or
directory
Jan  4 11:00:37 router dhcpcd[34862]: ps_sendpsmmsg: Destination
address required
Jan  4 11:00:37 router dhcpcd[34862]: ps_dostop: Destination address
required

My router is connected to a cable modem. The modem's logs don't show
anything when this happens. Is this a bug in dhcpcd?

Some potentially useful information:

/etc/hostname.em0:

inet autoconf

/etc/dhcpcd.conf:

denyinterfaces !(em0)
allowinterfaces em0
script ""
interface em0
        duid
        iaid 0
        ia_na 0
        ia_pd 0/::/60
        ipv6rs
        leasetime -1
        nooption domain_name,domain_name_servers,domain_search,fqdn,host_name,
ntp_servers,time_offset,time_servers
        option rapid_commit
        persistent
        require dhcp_server_identifier
        waitip 6
        waitip 4

In addition to the above, I run dhcpcd for both DHCP and DHCPv6
(instead of running dhclient(8) for DHCP). Finally, due to the need to
have networking up and running before services like unbound(8) start,
I start dhcpcd when dhclient would otherwise start in rc(8):

...
start_daemon dhcpcd >/dev/null 2>&1

echo 'starting network'
...
(cd /var/run && { rm -rf -- !(dhcpcd); install -c -m 664 -g utmp
/dev/null utmp; })
...

Another unusual setup I have that may be relevant is I statically
assign IPv6 addresses to my other interfaces since for the several
years that I have been a customer with my ISP, my IPv4 address, IPv6
address assigned to em0, and the /60 IPv6 that is provided to me have
not changed. For example:

/etc/hostname.alc0:

inet6 2601:283:4403:ce80::1 64
inet 192.168.0.1 255.255.255.0 NONE

ifconfig em0:

em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 1c:1b:0d:e7:08:5c
        index 1 priority 0 llprio 3
        groups: egress
        media: Ethernet autoselect (1000baseT full-duplex,rxpause,txpause)
        status: active
        inet6 fe80::1e1b:dff:fee7:85c%em0 prefixlen 64 scopeid 0x1
        inet6 2001:558:6040:83:a99d:b51a:6dd1:632c prefixlen 128
        pltime 256339 vltime 256339
        inet 71.229.183.31 netmask 0xfffffc00 broadcast 71.229.183.255

ifconfig alc0:

alc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 1c:1b:0d:e7:08:5a
        index 2 priority 0 llprio 3
        media: Ethernet autoselect (1000baseT full-duplex)
        status: active
        inet6 fe80::1e1b:dff:fee7:85a%alc0 prefixlen 64 scopeid 0x2
        inet6 2601:283:4403:ce80::1 prefixlen 64
        inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255

dhcpcd -U em0:

reason=CARRIER
interface=em0
protocol=link
if_configured=true
ifcarrier=up
ifmetric=0
ifwireless=0
ifflags=34883
ifmtu=1500

reason=RENEW
interface=em0
protocol=dhcp
ip_address=71.229.183.31
subnet_cidr=22
network_number=71.229.180.0
subnet_mask=255.255.252.0
routers=71.229.180.1
broadcast_address=255.255.255.255
dhcp_lease_time=345600
dhcp_message_type=5
dhcp_server_identifier=96.113.84.152
dhcp_renewal_time=172800
dhcp_rebinding_time=302400

reason=ROUTERADVERT
interface=em0
protocol=ra
nd1_from=fe80::201:5cff:fe63:ee46
nd1_acquired=696307
nd1_now=696309
nd1_hoplimit=64
nd1_flags=MO
nd1_lifetime=1800
nd1_prefix_information1_length=64
nd1_prefix_information1_flags=
nd1_prefix_information1_vltime=604800
nd1_prefix_information1_pltime=302400
nd1_prefix_information1_prefix=2001:558:4070:83::
nd1_prefix_information2_length=64
nd1_prefix_information2_flags=
nd1_prefix_information2_vltime=604800
nd1_prefix_information2_pltime=302400
nd1_prefix_information2_prefix=2001:558:5021:32::
nd1_prefix_information3_length=64
nd1_prefix_information3_flags=
nd1_prefix_information3_vltime=604800
nd1_prefix_information3_pltime=302400
nd1_prefix_information3_prefix=2001:558:6040:83::
nd1_prefix_information4_length=64
nd1_prefix_information4_flags=
nd1_prefix_information4_vltime=604800
nd1_prefix_information4_pltime=302400
nd1_prefix_information4_prefix=2001:558:803a:47::

reason=REBIND6
interface=em0
protocol=dhcp6
dhcp6_client_id=00041c021b030d04e70508065c0700080009
dhcp6_server_id=000100011caae03b40a8f02e8ef4
dhcp6_ia_na1_iaid=00000000
dhcp6_ia_na1_t1=114184
dhcp6_ia_na1_t2=217864
dhcp6_ia_na1_ia_addr1=2001:558:6040:83:a99d:b51a:6dd1:632c
dhcp6_ia_na1_ia_addr1_pltime=286984
dhcp6_ia_na1_ia_addr1_vltime=286984
dhcp6_ia_pd1_iaid=00000000
dhcp6_ia_pd1_t1=114184
dhcp6_ia_pd1_t2=217864
dhcp6_ia_pd1_prefix1_pltime=286984
dhcp6_ia_pd1_prefix1_vltime=286984
dhcp6_ia_pd1_prefix1_length=60
dhcp6_ia_pd1_prefix1=2601:283:4403:ce80::

When dhcpcd starts, /var/log/daemon shows:

Jan  4 11:13:01 router dhcpcd[68876]: dhcpcd-9.4.1 starting
Jan  4 11:13:01 router dhcpcd[73253]: DUID
00:04:1c:02:1b:03:0d:04:e7:05:08:06:5c:07:00:08:00:09
Jan  4 11:13:01 router dhcpcd[73253]: em0: IAID 00:00:00:00
Jan  4 11:13:02 router dhcpcd[73253]: em0: soliciting an IPv6 router
Jan  4 11:13:02 router dhcpcd[73253]: em0: rebinding prior DHCPv6 lease
Jan  4 11:13:03 router dhcpcd[73253]: em0: rebinding lease of
71.229.183.31
Jan  4 11:13:03 router dhcpcd[73253]: em0: probing address
71.229.183.31/22
Jan  4 11:13:04 router dhcpcd[73253]: em0: REPLY6 received from
fe80::201:5cff:fe63:ee46
Jan  4 11:13:04 router dhcpcd[73253]: em0: adding address
2001:558:6040:83:a99d:b51a:6dd1:632c/128
Jan  4 11:13:04 router dhcpcd[73253]: em0: renew in 114184, rebind in
217864, expire in 286984 seconds
Jan  4 11:13:04 router dhcpcd[73253]: lo0: adding reject route to
2601:283:4403:ce80::/60 via ::1
Jan  4 11:13:04 router dhcpcd[73253]: em0: delegated prefix
2601:283:4403:ce80::/60
Jan  4 11:13:04 router dhcpcd[73253]: em0: Router Advertisement from
fe80::201:5cff:fe63:ee46
Jan  4 11:13:04 router dhcpcd[73253]: em0: adding route to
2001:558:4070:83::/64 via fe80::201:5cff:fe63:ee46
Jan  4 11:13:04 router dhcpcd[73253]: em0: adding route to
2001:558:5021:32::/64 via fe80::201:5cff:fe63:ee46
Jan  4 11:13:04 router dhcpcd[73253]: em0: adding route to
2001:558:6040:83::/64 via fe80::201:5cff:fe63:ee46
Jan  4 11:13:04 router dhcpcd[73253]: em0: adding route to
2001:558:803a:47::/64 via fe80::201:5cff:fe63:ee46
Jan  4 11:13:04 router dhcpcd[73253]: em0: adding default route via
fe80::201:5cff:fe63:ee46
Jan  4 11:13:09 router dhcpcd[73253]: em0: leased 71.229.183.31 for
197324 seconds
Jan  4 11:13:09 router dhcpcd[73253]: em0: adding route to
71.229.180.0/22
Jan  4 11:13:09 router dhcpcd[73253]: em0: adding default route via
71.229.180.1

Reply via email to