You are not logged in.
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=yesnetworkctl 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 linkIt says it's connected to my SSID and
ip link show wlp3s0lists 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 knownSo 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... ![]()
Offline
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
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 ' |
Offline
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...
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
@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
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.
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
... 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
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 foreverip 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 wlan0But I get
Error: Nexthop has invalid gatewayOffline
... 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/Linuxpacman -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 : Signaturefind /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.serviceOffline
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
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
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 ' |
Offline
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
If you only have one wireless adapter, you can also use pattern match.
$ cat /etc/systemd/network/25-wireless.network
[Match]
Name=w*
...
Offline