You are not logged in.
Pages: 1
When I first installed arch, I connected my laptop to the router with an ethernet cable. The live linux environment automatically found an internet connection.
During the installation, I installed systemd and iwd. I booted into the installed environment. The ethernet connection didn't work. However, I was very easily able to get wifi working with iwctl. So that is how I left it - wifi has been working perfectly for months, ethernet worked automatically from the live linux installer but never on the installed system.
Now I would like to get the network connection working with the physical cable and I would be grateful for some help. I did:
sudo ip link set enp2s0f1 up
[erik@laptop1 ethernet]$ ip link show enp2s0f1
2: enp2s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 80:fa:5b:63:a9:89 brd ff:ff:ff:ff:ff:ff
altname enx80fa5b63a989If I turn off the wifi interface and do "ping archlinux.org", it does not work. How do I troubleshoot this? I am googling and searching the forum, I would be grateful for some help. Right after I set enp2s0f1 down and then back up again, the output of "sudo journalctl -b" is:
Apr 27 12:00:12 laptop1 kernel: [UFW BLOCK] IN=wlan0 OUT= MAC=01:00:5e:00:00:01:34:5d:9e:cf:c3:8b:08:00 SRC=192.168.1.1 DST=224.0.0.1 LEN=32 TOS=0x00 PREC=0x00 TTL=1 ID=0 DF PROTO=2
Apr 27 12:03:37 laptop1 sudo[490657]: erik : TTY=pts/7 ; PWD=/home/erik/data3/erik/arch/ethernet ; USER=root ; COMMAND=/usr/bin/ip link set enp2s0f1 down
Apr 27 12:03:37 laptop1 kernel: r8169 0000:02:00.1 enp2s0f1: Link is Down
Apr 27 12:03:37 laptop1 systemd-networkd[440]: enp2s0f1: Link DOWN
Apr 27 12:03:37 laptop1 sudo[490657]: pam_unix(sudo:session): session opened for user root(uid=0) by erik(uid=1000)
Apr 27 12:03:37 laptop1 systemd-networkd[440]: enp2s0f1: Lost carrier
Apr 27 12:03:37 laptop1 sudo[490657]: pam_unix(sudo:session): session closed for user root
Apr 27 12:03:42 laptop1 sudo[490672]: erik : TTY=pts/7 ; PWD=/home/erik/data3/erik/arch/ethernet ; USER=root ; COMMAND=/usr/bin/ip link set enp2s0f1 up
Apr 27 12:03:42 laptop1 sudo[490672]: pam_unix(sudo:session): session opened for user root(uid=0) by erik(uid=1000)
Apr 27 12:03:42 laptop1 kernel: Generic FE-GE Realtek PHY r8169-0-201:00: attached PHY driver (mii_bus:phy_addr=r8169-0-201:00, irq=MAC)
Apr 27 12:03:43 laptop1 systemd-networkd[440]: enp2s0f1: Link UP
Apr 27 12:03:43 laptop1 kernel: r8169 0000:02:00.1 enp2s0f1: Link is Down
Apr 27 12:03:43 laptop1 sudo[490672]: pam_unix(sudo:session): session closed for user root
Apr 27 12:03:45 laptop1 kernel: r8169 0000:02:00.1 enp2s0f1: Link is Up - 1Gbps/Full - flow control rx/tx
Apr 27 12:03:45 laptop1 systemd-networkd[440]: enp2s0f1: Gained carrier
Apr 27 12:03:47 laptop1 systemd-networkd[440]: enp2s0f1: Gained IPv6LL
Apr 27 12:03:47 laptop1 kernel: [UFW BLOCK] IN=enp2s0f1 OUT= MAC= SRC=fe80:0000:0000:0000:82fa:5bff:fe63:a989 DST=ff02:0000:0000:0000:0000:0000:0001:0003 LEN=73 TC=0 HOPLIMIT=255 FLOWLBL=844361 PROTO=UDP SPT=5355 DPT=5355 LEN=33
Apr 27 12:03:47 laptop1 kernel: [UFW BLOCK] IN=enp2s0f1 OUT= MAC= SRC=fe80:0000:0000:0000:82fa:5bff:fe63:a989 DST=ff02:0000:0000:0000:0000:0000:0001:0003 LEN=73 TC=0 HOPLIMIT=255 FLOWLBL=844361 PROTO=UDP SPT=5355 DPT=5355 LEN=33
Apr 27 12:03:47 laptop1 kernel: [UFW BLOCK] IN=enp2s0f1 OUT= MAC= SRC=fe80:0000:0000:0000:82fa:5bff:fe63:a989 DST=ff02:0000:0000:0000:0000:0000:0001:0003 LEN=73 TC=0 HOPLIMIT=255 FLOWLBL=844361 PROTO=UDP SPT=5355 DPT=5355 LEN=33
Apr 27 12:03:47 laptop1 kernel: [UFW BLOCK] IN=wlan0 OUT= MAC=33:33:00:01:00:03:80:fa:5b:63:a9:89:86:dd SRC=fe80:0000:0000:0000:82fa:5bff:fe63:a989 DST=ff02:0000:0000:0000:0000:0000:0001:0003 LEN=73 TC=0 HOPLIMIT=255 FLOWLBL=844361 PROTO=UDP SPT=5355 DPT=5355 LEN=33
Apr 27 12:03:57 laptop1 sudo[490690]: erik : TTY=pts/7 ; PWD=/home/erik/data3/erik/arch/ethernet ; USER=root ; COMMAND=/usr/bin/journalctl -b
Apr 27 12:03:57 laptop1 sudo[490690]: pam_unix(sudo:session): session opened for user root(uid=0) by erik(uid=1000)
Apr 27 12:03:57 laptop1 sudo[490690]: pam_unix(sudo:session): session closed for user rootEdit: I seem to have gotten it to work with:
sudo pacman -S dhcpcd
systemctl enable dhcpcd.service
systemctl start dhcpcd.serviceI am deeply confused. I attempted to follow the instructions in the arch wiki. At this link...
https://wiki.archlinux.org/title/Networ … k_managers
...it is not at all clear to me that systemd-networkd requires dhcpcd.
And in the documentation for systemd-networkd...
https://wiki.archlinux.org/title/Systemd-networkd
...it says:
Note: Each network interface should be managed by only one DHCP client or network manager, ...
But it does not say whether systemd-networkd itself functions as a DHCP client, or whether I need to install something extra.
Last edited by erik_123 (2025-04-27 15:25:03)
Offline
https://wiki.archlinux.org/title/System … using_DHCP
wifi has likely worked by https://wiki.archlinux.org/title/Iwd#En … figuration
Make sure you're not running any concurrent network services, you proabaly want to disable systemd-networkd at this point and the generic dhcpcd.service will try to configure your wifi as well, so in that case disable the feature in iwd.
In doubt please post the output of
find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -fOffline
Many thanks for getting back to me. I just did an experiment:
- I power down the machine
- I disconnect the ethernet cable
- I start the machine. I confirm that I have an internet connection, it could only be wifi
- I disable wifi with "sudo ip link set wlan0 down"
- I confirm that there is no internet connection
- I connect the ethernet cable, I get an internet connection
So it seems that the machine is switching back and forth between wifi and ethernet exactly as I would hope.
I do not have file /etc/iwd/main.conf. I do not believe that I ever did any kind of configuration, all I ever did was install packages and run them with their default settings.
So, yes, I am in doubt, I am not sure how this is working, or if I am running incompatible processes. Here is the requested output:
[erik@laptop1 ~]$ find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f
dbus-org.freedesktop.network1.service | system
dbus-org.freedesktop.resolve1.service | system
dhcpcd.service | multi-user.target.wants
display-manager.service | system
getty@tty1.service | getty.target.wants
iwd.service | multi-user.target.wants
p11-kit-server.socket | sockets.target.wants
pipewire-pulse.socket | sockets.target.wants
pipewire-session-manager.service | user
pipewire.socket | sockets.target.wants
remote-fs.target | multi-user.target.wants
systemd-networkd.service | multi-user.target.wants
systemd-networkd.socket | sockets.target.wants
systemd-networkd-wait-online.service | network-online.target.wants
systemd-network-generator.service | sysinit.target.wants
systemd-resolved.service | sysinit.target.wants
systemd-userdbd.socket | sockets.target.wants
ufw.service | multi-user.target.wants
wireplumber.service | pipewire.service.wantsOffline
networkd will pick up the wifi (you likely have a config there) or you (have) been running wifi on IPv6 only
stopping/disabling systemd-networkd* should™ be fine, iwd will provide the wifi carrier, dhcpcd will configure every NIC w/ a carrier ("cable")
Offline
I did "systemctl disable systemd-networkd.service". Then I rebooted. It seems that I am still able to switch back and forth between ethernet and wifi as I would like. So it seems that it is working, thank you.
My previous configuration, that I have been using up until today, was based on this post:
https://bbs.archlinux.org/viewtopic.php … 7#p2220447
If you're using systemd-networkd, you don't need any of the other networking services. Only IWD is necessary for the connection, then systemd-network takes over.
Add this file to
/etc/systemd/network/10-wifi.network[Match] Name=wl* [Network] Description=All wifi connections DHCP=yesand restart systemd-network.
Then, use iwd to connect to the wifi (iwgtk works fine as GUI).
Disable (or remove) dhcpd, NetworkManager, or any other network managers.
Also, revert your changes from the
/etc/iwd/main.conffile.
I do have file /etc/systemd/network/10-wifi.network. So I was mistaken earlier when I said that I never changed any default configurations. That original setup worked for wifi but not for ethernet.
Offline
Pages: 1