Dhclient / Wpa_supplicant ne donne pas d’IPV4

Tags: #<Tag:0x00007f50b26641a8> #<Tag:0x00007f50b266e9c8>

Bonjour à tous,

Dans une debian 12 (dans un container), je n’arrive pas à me connecter à ma box en wifi. Je tourne en rond depuis ce matin. Si un lecteur a une idée, merci d’avance.

Pour info
iwconfig

lo        no wireless extensions.

wlp3s0    IEEE 802.11  ESSID:"Freebox-6896A3"  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=15 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off

ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
3: wlp3s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 5e:c6:f6:2b:d2:97 brd ff:ff:ff:ff:ff:ff permaddr 00:08:ca:f0:7a:50

Extrait des logs

Jul 17 08:07:01 lf21 NetworkManager[139]: <info>  [1689581221.3008] policy: auto-activating connection 'Freebox-6896A3' (f54f9e78-db22-4ffa-a74f-f397bb11e471)
Jul 17 08:07:01 lf21 NetworkManager[139]: <info>  [1689581221.3014] device (wlp3s0): Activation: starting connection 'Freebox-6896A3' (f54f9e78-db22-4ffa-a74f-f397bb11e471)
Jul 17 08:07:01 lf21 NetworkManager[139]: <info>  [1689581221.3015] device (wlp3s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Jul 17 08:07:01 lf21 NetworkManager[139]: <info>  [1689581221.3019] manager: NetworkManager state is now CONNECTING
Jul 17 08:07:01 lf21 systemd-networkd[159]: wlp3s0: Link DOWN
Jul 17 08:07:01 lf21 NetworkManager[139]: <info>  [1689581221.3446] device (wlp3s0): set-hw-addr: reset MAC address to 00:08:CA:F0:7A:50 (preserve)
Jul 17 08:07:01 lf21 systemd-networkd[159]: wlp3s0: Link UP
Jul 17 08:07:01 lf21 NetworkManager[139]: <info>  [1689581221.3665] device (wlp3s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jul 17 08:07:01 lf21 NetworkManager[139]: <info>  [1689581221.3670] device (wlp3s0): Activation: (wifi) access point 'Freebox-6896A3' has security, but secrets are required.
Jul 17 08:07:01 lf21 NetworkManager[139]: <info>  [1689581221.3670] device (wlp3s0): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
Jul 17 08:07:01 lf21 NetworkManager[139]: <info>  [1689581221.3673] sup-iface[8a487ef04787bf5f,0,wlp3s0]: wps: type pbc start...
Jul 17 08:07:01 lf21 NetworkManager[139]: <info>  [1689581221.3678] device (wlp3s0): supplicant interface state: inactive -> interface_disabled
Jul 17 08:07:01 lf21 NetworkManager[139]: <info>  [1689581221.3678] device (p2p-dev-wlp3s0): supplicant management interface state: inactive -> interface_disabled
Jul 17 08:07:01 lf21 NetworkManager[139]: <info>  [1689581221.3686] device (wlp3s0): supplicant interface state: interface_disabled -> inactive
Jul 17 08:07:01 lf21 NetworkManager[139]: <info>  [1689581221.3686] device (p2p-dev-wlp3s0): supplicant management interface state: interface_disabled -> inactive
Jul 17 08:07:01 lf21 NetworkManager[139]: <info>  [1689581221.3686] device (wlp3s0): state change: need-auth -> prepare (reason 'none', sys-iface-state: 'managed')
Jul 17 08:07:01 lf21 wpa_supplicant[261]: wlp3s0: WPS-PBC-ACTIVE
Jul 17 08:07:01 lf21 NetworkManager[139]: <info>  [1689581221.3689] device (wlp3s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jul 17 08:07:01 lf21 wpa_supplicant[261]: wlp3s0: WPS-CANCEL
Jul 17 08:07:01 lf21 NetworkManager[139]: <info>  [1689581221.3691] device (wlp3s0): Activation: (wifi) connection 'Freebox-6896A3' has security, and secrets exist.  No new secrets needed.
Jul 17 08:07:01 lf21 NetworkManager[139]: <info>  [1689581221.3691] Config: added 'ssid' value 'Freebox-6896A3'
Jul 17 08:07:01 lf21 NetworkManager[139]: <info>  [1689581221.3692] Config: added 'scan_ssid' value '1'
Jul 17 08:07:01 lf21 NetworkManager[139]: <info>  [1689581221.3692] Config: added 'bgscan' value 'simple:30:-70:86400'
Jul 17 08:07:01 lf21 NetworkManager[139]: <info>  [1689581221.3692] Config: added 'key_mgmt' value 'WPA-PSK WPA-PSK-SHA256 FT-PSK SAE FT-SAE'
Jul 17 08:07:01 lf21 NetworkManager[139]: <info>  [1689581221.3692] Config: added 'auth_alg' value 'OPEN'
Jul 17 08:07:01 lf21 NetworkManager[139]: <info>  [1689581221.3692] Config: added 'psk' value '<hidden>'
Jul 17 08:07:01 lf21 NetworkManager[139]: <info>  [1689581221.3702] device (wlp3s0): supplicant interface state: inactive -> scanning
Jul 17 08:07:01 lf21 NetworkManager[139]: <info>  [1689581221.3703] device (p2p-dev-wlp3s0): supplicant management interface state: inactive -> scanning
Jul 17 08:07:02 lf21 wpa_supplicant[261]: wlp3s0: SME: Trying to authenticate with dc:00:b0:c2:42:c8 (SSID='Freebox-6896A3' freq=2437 MHz)
Jul 17 08:07:02 lf21 NetworkManager[139]: <info>  [1689581222.5154] device (wlp3s0): supplicant interface state: scanning -> authenticating
Jul 17 08:07:02 lf21 NetworkManager[139]: <info>  [1689581222.5156] device (p2p-dev-wlp3s0): supplicant management interface state: scanning -> authenticating
Jul 17 08:07:02 lf21 wpa_supplicant[261]: wlp3s0: Trying to associate with dc:00:b0:c2:42:c8 (SSID='Freebox-6896A3' freq=2437 MHz)
Jul 17 08:07:02 lf21 NetworkManager[139]: <info>  [1689581222.6156] device (wlp3s0): supplicant interface state: authenticating -> associating
Jul 17 08:07:02 lf21 NetworkManager[139]: <info>  [1689581222.6157] device (p2p-dev-wlp3s0): supplicant management interface state: authenticating -> associating
Jul 17 08:07:02 lf21 wpa_supplicant[261]: wlp3s0: Associated with dc:00:b0:c2:42:c8
Jul 17 08:07:02 lf21 systemd-networkd[159]: wlp3s0: Connected WiFi access point: Freebox-6896A3 (dc:00:b0:c2:42:c8)
Jul 17 08:07:02 lf21 wpa_supplicant[261]: wlp3s0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Jul 17 08:07:02 lf21 wpa_supplicant[261]: wlp3s0: WPA: Key negotiation completed with dc:00:b0:c2:42:c8 [PTK=CCMP GTK=CCMP]
Jul 17 08:07:02 lf21 NetworkManager[139]: <info>  [1689581222.6279] device (wlp3s0): supplicant interface state: associating -> 4way_handshake
Jul 17 08:07:02 lf21 wpa_supplicant[261]: wlp3s0: CTRL-EVENT-CONNECTED - Connection to dc:00:b0:c2:42:c8 completed [id=0 id_str=]
Jul 17 08:07:02 lf21 NetworkManager[139]: <info>  [1689581222.6280] device (p2p-dev-wlp3s0): supplicant management interface state: associating -> 4way_handshake
Jul 17 08:07:02 lf21 systemd-networkd[159]: wlp3s0: Gained carrier
Jul 17 08:07:02 lf21 NetworkManager[139]: <info>  [1689581222.6341] device (wlp3s0): supplicant interface state: 4way_handshake -> completed
Jul 17 08:07:02 lf21 NetworkManager[139]: <info>  [1689581222.6342] device (wlp3s0): Activation: (wifi) Stage 2 of 5 (Device Configure) successful. Connected to wireless network "Freebox-6896A3"
Jul 17 08:07:02 lf21 NetworkManager[139]: <info>  [1689581222.6343] device (p2p-dev-wlp3s0): supplicant management interface state: 4way_handshake -> completed
Jul 17 08:07:02 lf21 NetworkManager[139]: <info>  [1689581222.6347] device (wlp3s0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Jul 17 08:07:02 lf21 NetworkManager[139]: <info>  [1689581222.6364] dhcp4 (wlp3s0): activation: beginning transaction (timeout in 45 seconds)
Jul 17 08:07:02 lf21 systemd-networkd[159]: wlp3s0: Lost carrier
Jul 17 08:07:02 lf21 systemd-networkd[159]: wlp3s0: Gained carrier
Jul 17 08:07:04 lf21 systemd-networkd[159]: wlp3s0: Gained IPv6LL

dhclient -d wlp3s0

...
Listening on LPF/wlp3s0/9e:d4:c6:e6:88:2a
Sending on   LPF/wlp3s0/9e:d4:c6:e6:88:2a
Sending on   Socket/fallback
DHCPDISCOVER on wlp3s0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on wlp3s0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlp3s0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on wlp3s0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on wlp3s0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on wlp3s0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on wlp3s0 to 255.255.255.255 port 67 interval 3
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
receive_packet failed on wlp3s0: Network is down

Complement
table arp vide et aucune requête arp envoyée!

Extrait de man lxc-create

   -n, --name=NAME
          Use container identifier NAME.  The container identifier format 
is an alphanumeric string.

Mon nom comportait un « _ » , tout fonctionne correctement maintenant après avoir supprimé ce caractère.

Trouvé, de proche en proche jusqu’au service systemd-resolved qui m’a indiqué ce problème!