[arch-general] network setup help

kqt4at5v at gmail.com kqt4at5v at gmail.com
Mon Jul 13 13:52:45 UTC 2015


I am having a bit of trouble getting my network connection working
Following "Systemd with wpa_supplicant and static IP" at 
https://wiki.archlinux.org/index.php/Wireless_network_configuration#Manual_wireless_connection_at_boot_using_systemd_and_dhcpcd

If I follow this exactly to interface will not come up
[root at grumpy10 ~]# systemctl -l status network-wireless at mlan0
* network-wireless at mlan0.service - Wireless network connectivity (mlan0)
    Loaded: loaded (/etc/systemd/system/network-wireless at .service; enabled; vendor preset: disabled)
    Active: failed (Result: exit-code) since Mon 2015-07-13 08:17:23 CDT; 6min ago
   Process: 239 ExecStart=/usr/bin/ip addr add $address/$netmask broadcast $broadcast dev %i (code=exited, status=2)
   Process: 237 ExecStart=/usr/bin/wpa_supplicant -B -i %i -c /etc/wpa_supplicant/wpa_supplicant.conf (code=exited, status=0/SUCCESS)
   Process: 235 ExecStart=/usr/bin/ip link set dev %i up (code=exited, status=0/SUCCESS)
  Main PID: 239 (code=exited, status=2)
    CGroup: /system.slice/system-network\x2dwireless.slice/network-wireless at mlan0.service

Jul 13 08:17:23 grumpy10 systemd[1]: Starting Wireless network connectivity (mlan0 $address)...
Jul 13 08:17:23 grumpy10 ip[239]: RTNETLINK answers: Invalid argument
Jul 13 08:17:23 grumpy10 systemd[1]: network-wireless at mlan0.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jul 13 08:17:23 grumpy10 systemd[1]: Failed to start Wireless network connectivity (mlan0 $address).
Jul 13 08:17:23 grumpy10 systemd[1]: network-wireless at mlan0.service: Unit entered failed state.
Jul 13 08:17:23 grumpy10 systemd[1]: network-wireless at mlan0.service: Failed with result 'exit-code'.

If I change the "ip addr add" line and change $address/$netmask to 192.168.2.110/24 the interface will come up

[root at grumpy10 ~]# cat /etc/conf.d/network-wireless-mlan0
address=192.168.2.110
netmask=24
broadcast=192.168.2.255
gateway=192.168.2.1

[root at grumpy10 ~]# cat /etc/systemd/system/network-wireless\@.service
[Unit]
Description=Wireless network connectivity (%i $address)
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device

[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/conf.d/network-wireless-%i

ExecStart=/usr/bin/ip link set dev %i up
ExecStart=/usr/bin/wpa_supplicant -B -i %i -c /etc/wpa_supplicant/wpa_supplicant.conf
ExecStart=/usr/bin/ip addr add 192.168.2.110/24 broadcast $broadcast dev %i
ExecStart=/usr/bin/ip route add default via $gateway

ExecStop=/usr/bin/ip addr flush dev %i
ExecStop=/usr/bin/ip link set dev %i down

[Install]
WantedBy=multi-user.target


Suggestion appreciated


More information about the arch-general mailing list