1

I need a static IP for a linux which runs on Poky (Yocto Project Reference Distro) 1.7.3.

Everything works with DHCP. Now I try to use .network configuration for wlan0 to get static IP, but it does't work. I follow the examples here: https://wiki.archlinux.org/index.php/systemd-networkd#Wired_adapter_using_a_static_IP My wlan0.network looks like this:

[Match]
Name=wlan0

[Network]
Address=192.168.10.111
Gateway=192.168.10.1

After rebooting, I still get IP by DHCP (102.168.10.102 for example).

It does work if I do: ifconfig wlan0 192.168.10.111

What could be wrong, why it doesn't work with .network configuration file?

journalctl | grep wlan

gives:

Jul 13 13:07:33 reach kernel: vwlan gpio 96
Jul 13 13:07:33 reach kernel: vwlan: 1800 mV 
Jul 13 13:07:33 reach kernel: found wifi platform device wlan
Jul 13 13:07:34 reach kernel: Register interface [wlan0]  MAC: 00:00:00:00:00:00
Jul 13 13:07:38 reach systemd-networkd[186]:            wlan0: gained carrier
Jul 13 13:07:38 reach systemd-networkd[186]:            wlan0: could not set route: Network is unreachable
Jul 13 13:07:38 reach systemd-networkd[186]:            wlan0: link configured
Jul 13 13:07:38 reach mDNSResponder[227]: mDNSPlatformSendUDP got error 99 (Cannot assign requested address) sending packet to FF02:0000:0000:0000:0000:0000:0000:00FB on interface FE80:0000:0000:0000:92B6:86FF:FE06:D3F3/wlan0/3
Jul 13 13:07:38 reach mDNSResponder[227]: mDNSPlatformSendUDP got error 99 (Cannot assign requested address) sending packet to FF02:0000:0000:0000:0000:0000:0000:00FB on interface FE80:0000:0000:0000:92B6:86FF:FE06:D3F3/wlan0/3
Jul 13 13:07:38 reach mDNSResponder[227]: mDNSPlatformSendUDP got error 99 (Cannot assign requested address) sending packet to FF02:0000:0000:0000:0000:0000:0000:00FB on interface FE80:0000:0000:0000:92B6:86FF:FE06:D3F3/wlan0/3
Jul 13 13:07:45 reach systemd[1]: wpa_supplicant_wlan0_event.service: main process exited, code=exited, status=255/n/a
Jul 13 13:07:45 reach wpa_cli[312]: Failed to connect to non-global ctrl_ifname: wlan0  error: No such file or directory
Jul 13 13:07:45 reach systemd[1]: Unit wpa_supplicant_wlan0_event.service entered failed state.
Jul 13 13:07:46 reach systemd-networkd[186]:            wlan0: lost carrier
Jul 13 13:07:46 reach wpa_cli[317]: Failed to connect to non-global ctrl_ifname: p2p-dev-wlan0  error: No such file or directory
Jul 13 13:07:46 reach systemd[1]: wpa_supplicant_wlan0_event.service holdoff time over, scheduling restart.
Jul 13 13:07:50 reach systemd-networkd[186]:            wlan0: gained carrier
Ago
  • 111

0 Answers0