You are not logged in.

#1 2020-10-19 01:59:47

floofie
Member
Registered: 2020-10-19
Posts: 6

Can't set up wireless networking on brand new install

I'm a newbie. Plenty of Linux, but never done Arch and never set up my networking by hand. Off the USB, I can set up wireless just fine with iwctl, but now I've rebooted into the barebones system and I can't get wireless up and running.

I have set up systemd-networkd:

/etc/systemd/network/25-wireless.network

[Match]
Name=wlp3s0

[Network]
DHCP=yes

networkctl  finds the interface, but lists it as "degraded" and "configuring". I found a spot in the docs where it says if I'm doing wireless with systemd-networkd, I must set up the interface myself with something like iw, so I tried that. If I do

iw dev wlp3s0 link

It says it's connected to my SSID and

ip link show wlp3s0

lists the interface in the UP state

So it's up and connected, but systemd-networkd is not happy with it. If I try to ping something, I get

ping: archlinux.org: Name or service not known

So it can't resolve DNS, but it's setup to do DHCP so it should get it that way.

I know I also need systemd-resolved, and I turned the service on, but haven't done any extra config, because docs seemed to say it would work out of the box for simple configs like mine (ISP provides a DHCP server)

What am I missing? I have tried to go through all the docs, but it's a jungle between ip and iw and iwd and iwctl and network managers and systemd... yikes

Offline

#2 2020-10-19 08:18:04

solskog
Member
Registered: 2020-09-05
Posts: 462

Re: Can't set up wireless networking on brand new install

floofie wrote:

ping: archlinux.org: Name or service not known

You don't have to enable systemd-resolved, just use /etc/resolv.conf

$ cat /etc/resolv.conf
nameserver 8.8.8.8
nameserver 1.1.1.1

Offline

#3 2020-10-19 08:29:38

progandy
Member
Registered: 2012-05-17
Posts: 5,321

Re: Can't set up wireless networking on brand new install

Do you have an unencrypted wireless network? Most wireless networks use WPA2 or WPA3 encryption. For that you'll have to install and use a wireless daemon like iwd or wpa_supplicant. systemd-networkd alone cannot do it. On the USB you have used iwd. You'll have to download the iwd package on a different computer and transfer it or boot again from the installation USB to install the additional package. (https://wiki.archlinux.org/index.php/Chroot)

https://wiki.archlinux.org/index.php/Iwd

Last edited by progandy (2020-10-19 08:32:08)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Online

#4 2020-10-19 09:13:57

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: Can't set up wireless networking on brand new install

floofie wrote:

I know I also need systemd-resolved, and I turned the service on, but haven't done any extra config, because docs seemed to say it would work out of the box for simple configs like mine (ISP provides a DHCP server)

What am I missing? I have tried to go through all the docs, but it's a jungle between ip and iw and iwd and iwctl and network managers and systemd... yikes

just enabling the service doesn't do much, you also have to set up the appropriate symlink as per the docs.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#5 2020-10-19 16:15:48

floofie
Member
Registered: 2020-10-19
Posts: 6

Re: Can't set up wireless networking on brand new install

@solskog

Do I need to know the IP address of my ISP's DNS server? Isn't that configured via DHCP automatically?

@progandy

I did that. I used iw and connected to my network, entering the password, etc. I don't know if it will survive a reboot, but that's a later question. The issue is that even though iw says everything is good, systemd-networkd is not happy

@mr.elendig

Maybe that's what I missed. I didn't see anything about systemd-resolved symlinks but I may have missed a step

Offline

#6 2020-10-20 05:00:21

solskog
Member
Registered: 2020-09-05
Posts: 462

Re: Can't set up wireless networking on brand new install

floofie wrote:

Do I need to know the IP address of my ISP's DNS server? Isn't that configured via DHCP automatically?

No, you can choose any public DNS server you like. And you don't have to relay on DHCP server to assign DNS server for you.

floofie wrote:

systemd-networkd is not happy

What is output of

# systemctl status systemd-networkd
$ ip add
$ ip route show

Last edited by solskog (2020-10-20 05:08:26)

Offline

#7 2020-10-20 14:27:48

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,701

Re: Can't set up wireless networking on brand new install

... and, as a sanity check, the output of:
uname -a
pacman -Qi linux
and
find /etc/systemd


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#8 2020-10-21 01:06:56

floofie
Member
Registered: 2020-10-19
Posts: 6

Re: Can't set up wireless networking on brand new install

solskog wrote:

What is output of

# systemctl status systemd-networkd
$ ip add
$ ip route show

systemd-networkd

● systemd-networkd.service - Network Service
     Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; disabled; vendor preset: enabled)
     Active: active (running) since Tue 2020-10-20 20:31:19 EDT; 4min 47s ago
       Docs: man:systemd-networkd.service(8)
   Main PID: 639 (systemd-network)
     Status: "Processing requests..."
      Tasks: 1 (limit: 4341)
     Memory: 2.3M
     CGroup: /system.slice/systemd-networkd.service
             └─639 /usr/lib/systemd/systemd-networkd

Oct 20 20:31:18 lenovo systemd[1]: Starting Network Service...
Oct 20 20:31:19 lenovo systemd-networkd[639]: wlan0: Gained IPv6LL
Oct 20 20:31:19 lenovo systemd-networkd[639]: Enumeration completed
Oct 20 20:31:19 lenovo systemd[1]: Started Network Service.
Oct 20 20:31:19 lenovo systemd-networkd[639]: wlan0: Connected WiFi access point: ******5 (d8:eb:97:ed:e6:1b)

ip add

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
2: enp0s25: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:21:cc:cf:97:6b brd ff:ff:ff:ff:ff:ff
5: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 60:67:20:6d:15:ac brd ff:ff:ff:ff:ff:ff
    inet6 fe80::6267:20ff:fe6d:15ac/64 scope link 
       valid_lft forever preferred_lft forever

ip route show returns *nothing*

I wondered if I had to manually add a route so I did this per the docs

ip route add default via <my gateway> dev wlan0

But I get

Error: Nexthop has invalid gateway

Offline

#9 2020-10-21 01:09:12

floofie
Member
Registered: 2020-10-19
Posts: 6

Re: Can't set up wireless networking on brand new install

ewaller wrote:

... and, as a sanity check, the output of:
uname -a
pacman -Qi linux
and
find /etc/systemd

uname -a

Linux lenovo 5.9.1-arch1-1 #1 SMP PREEMPT Sat, 17 Oct 2020 13:30:37 +0000 x86_64 GNU/Linux

pacman -Qi linux

Name            : linux
Version         : 5.9.1.arch1-1
Description     : The Linux kernel and modules
Architecture    : x86_64
URL             : https://git.archlinux.org/linux.git/log/?h=v5.9.1-arch1
Licenses        : GPL2
Groups          : None
Provides        : VIRTUALBOX-GUEST-MODULES  WIREGUARD-MODULE
Depends On      : coreutils  kmod  initramfs
Optional Deps   : crda: to set the correct wireless channels of your country
                  linux-firmware: firmware images needed for some devices [installed]
Required By     : None
Optional For    : base
Conflicts With  : None
Replaces        : virtualbox-guest-modules-arch  wireguard-arch
Installed Size  : 79.03 MiB
Packager        : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date      : Sat 17 Oct 2020 09:30:37 AM EDT
Install Date    : Sun 18 Oct 2020 11:50:02 AM EDT
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

find /etc/systemd

/etc/systemd
/etc/systemd/system.conf
/etc/systemd/sleep.conf
/etc/systemd/logind.conf
/etc/systemd/journal-upload.conf
/etc/systemd/user
/etc/systemd/user/sockets.target.wants
/etc/systemd/user/sockets.target.wants/gpg-agent-extra.socket
/etc/systemd/user/sockets.target.wants/gpg-agent.socket
/etc/systemd/user/sockets.target.wants/p11-kit-server.socket
/etc/systemd/user/sockets.target.wants/gpg-agent-browser.socket
/etc/systemd/user/sockets.target.wants/gpg-agent-ssh.socket
/etc/systemd/user/sockets.target.wants/dirmngr.socket
/etc/systemd/resolved.conf
/etc/systemd/coredump.conf
/etc/systemd/journald.conf
/etc/systemd/networkd.conf
/etc/systemd/journal-remote.conf
/etc/systemd/user.conf
/etc/systemd/network
/etc/systemd/network/25-wireless.network
/etc/systemd/pstore.conf
/etc/systemd/timesyncd.conf
/etc/systemd/homed.conf
/etc/systemd/system
/etc/systemd/system/multi-user.target.wants
/etc/systemd/system/multi-user.target.wants/remote-fs.target
/etc/systemd/system/getty.target.wants
/etc/systemd/system/getty.target.wants/getty@tty1.service

Offline

#10 2020-10-21 01:38:39

solskog
Member
Registered: 2020-09-05
Posts: 462

Re: Can't set up wireless networking on brand new install

You need to provide a gateway address in this file and not from ip command line that will not remain.

$ cat /etc/systemd/network/25-wireless.network
[Match]
Name=wlp3s0
[Network]
DHCP=yes
[Route]
Gateway=X.X.X.X
GatewayOnLink=yes
Metric=200

# systemctl restart systemd-networkd
# systemctl status systemd-networkd

Last edited by solskog (2020-10-21 01:43:53)

Offline

#11 2020-10-21 13:00:10

floofie
Member
Registered: 2020-10-19
Posts: 6

Re: Can't set up wireless networking on brand new install

Got it working, but it wasn't the gateway. It was the name (wlp3s0). It had been renamed to wlan0. iwd used wlan0, and once I changed /etc/systemd/network/25-wireless.network to have it, it worked, even without the gateway being specified.

Why was it renamed? I know I didn't just make up wlp3s0, but I forgot where I saw it when I first wrote that config file.

I'm not sure where I went wrong, but I'm glad it works now

Offline

#12 2020-10-21 13:08:31

progandy
Member
Registered: 2012-05-17
Posts: 5,321

Re: Can't set up wireless networking on brand new install

iwd cannot deal with the renaming to wlp3s0 and disables it when it is installed.
https://wiki.archlinux.org/index.php/Iw … ed_by_udev


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Online

#13 2020-10-21 13:53:49

floofie
Member
Registered: 2020-10-19
Posts: 6

Re: Can't set up wireless networking on brand new install

Yup, I didn't install iwd at first, set up half of networking, realized I needed iwd, went back and installed it and then continued on. That caused the issue.

Offline

#14 2020-10-22 01:16:24

solskog
Member
Registered: 2020-09-05
Posts: 462

Re: Can't set up wireless networking on brand new install

If you only have one wireless adapter, you can also use pattern match.

$ cat /etc/systemd/network/25-wireless.network
[Match]
Name=w*
...

Offline

Board footer

Powered by FluxBB