Rede Ethernet não inicia no raspberrypi: CLIENTE DHCP6: Falha ao definir DUID: Nenhuma mídia encontrada

Rede Ethernet não inicia no raspberrypi: CLIENTE DHCP6: Falha ao definir DUID: Nenhuma mídia encontrada

Eu estava tentando configurar um ip estático via systemd-networkd e tudo funcionou, depois de remover meu arquivo personalizado e reiniciar o dispositivo, eth0 e wlan0 não iniciam. Eu esperava que eles obtivessem o endereço do DHCP novamente, verificando os logs de depuração que vejo:

Dec 16 17:27:56 raspberrypi4 systemd-networkd[339]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_33 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=12 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Dec 16 17:27:56 raspberrypi4 systemd-networkd[339]: Got message type=method_return sender=org.freedesktop.DBus destination=:1.10 path=n/a interface=n/a member=n/a cookie=1 reply_cookie=1 signature=s error-name=n/a error-message=n/a
Dec 16 17:27:56 raspberrypi4 systemd-networkd[339]: Bus bus-api-network: changing state HELLO → RUNNING
Dec 16 17:27:56 raspberrypi4 systemd-networkd[339]: Got message type=signal sender=org.freedesktop.DBus.Local destination=n/a path=/org/freedesktop/DBus/Local interface=org.freedesktop.DBus.Local member=Connected cookie=4294967295 reply_cookie=0 signature=n/a error-name=n/a error-message=n/a
Dec 16 17:27:56 raspberrypi4 systemd-networkd[339]: Got message type=signal sender=org.freedesktop.DBus destination=:1.10 path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=NameAcquired cookie=2 reply_cookie=0 signature=s error-name=n/a error-message=n/a
Dec 16 17:27:56 raspberrypi4 systemd-networkd[339]: Got message type=signal sender=org.freedesktop.DBus destination=:1.10 path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=NameAcquired cookie=3 reply_cookie=0 signature=s error-name=n/a error-message=n/a
Dec 16 17:27:56 raspberrypi4 systemd-networkd[339]: Got message type=method_return sender=org.freedesktop.DBus destination=:1.10 path=n/a interface=n/a member=n/a cookie=4 reply_cookie=2 signature=u error-name=n/a error-message=n/a
Dec 16 17:27:56 raspberrypi4 systemd-networkd[339]: Successfully acquired requested service name.
Dec 16 17:27:56 raspberrypi4 systemd-networkd[339]: Got message type=method_return sender=org.freedesktop.DBus destination=:1.10 path=n/a interface=n/a member=n/a cookie=5 reply_cookie=3 signature=n/a error-name=n/a error-message=n/a
Dec 16 17:27:56 raspberrypi4 systemd-networkd[339]: Match type='signal',sender='org.freedesktop.login1',path='/org/freedesktop/login1',interface='org.freedesktop.login1.Manager',member='PrepareForSleep' successfully installed.
Dec 16 17:27:56 raspberrypi4 systemd-networkd[339]: eth0: Link state is up-to-date
Dec 16 17:27:56 raspberrypi4 systemd-networkd[339]: eth0: found matching network '/lib/systemd/network/80-wired.network'
Dec 16 17:27:56 raspberrypi4 systemd-networkd[339]: Setting '/proc/sys/net/ipv6/conf/eth0/disable_ipv6' to '0'
Dec 16 17:27:56 raspberrypi4 systemd-networkd[339]: eth0: IPv6 successfully enabled
Dec 16 17:27:56 raspberrypi4 systemd-networkd[339]: Setting '/proc/sys/net/ipv6/conf/eth0/proxy_ndp' to '0'
Dec 16 17:27:56 raspberrypi4 systemd-networkd[339]: Setting '/proc/sys/net/ipv6/conf/eth0/use_tempaddr' to '0'
Dec 16 17:27:56 raspberrypi4 systemd-networkd[339]: Setting '/proc/sys/net/ipv6/conf/eth0/accept_ra' to '0'
Dec 16 17:27:56 raspberrypi4 systemd-networkd[339]: DHCPv6 CLIENT: Failed to set DUID-EN: No medium found
Dec 16 17:27:56 raspberrypi4 systemd-networkd[339]: eth0: DHCP6 CLIENT: Failed to set DUID: No medium found
Dec 16 17:27:56 raspberrypi4 systemd-networkd[339]: eth0: Failed
Dec 16 17:27:56 raspberrypi4 systemd-networkd[339]: eth0: State changed: initialized -> failed
Dec 16 17:27:56 raspberrypi4 systemd-networkd[339]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_32 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=13 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Dec 16 17:27:56 raspberrypi4 systemd-networkd[339]: DHCP CLIENT (0x0): STOPPED

entretanto, no passado, o endereço IPv6 foi atribuído com sucesso. Não consegui encontrar nenhuma referência ao Failed to set DUID: No medium founderro

Responder1

O problema é que estamos usando um overlayfs em /etc, que estava sobrescrevendo o systemd gerado /etc/machine-idcom o arquivo vazio padrão enquanto o tmpfs montado pelo systemd /ets/machine-idestava sendo reescrito.

Por esse motivo o cliente DHCP6 não conseguiu definir o DUID porque /etc/machine-idestava vazio. Eu consertei copiando /etc/machine-id para a partição de sobreposição, se não existir, tornando-o persistente durante as reinicializações.

informação relacionada