You are not logged in.
Hi, checking my laptop networking configuration as I have some free time atm.
I did the check up on my desktop (also on Arch) yesterday with netctl wired Static IP with success. It now runs fine with 3 netctl services/timer and network.timer (cleaned an old netcfg@eth0.timer in the process :} ).
Goals are: A proper KISS {wired,wireless} DHCP connection at home » with with wifi-menu -o when roaming » Fast boot + some progress in my understanding of netctl, systemd and network.
Laptop hardware is simple: One ISP provided Internet ADSL router, and a Dell laptop with one Ethernet device and one Wired (lcpci -k below)
Software: Arch i686 up to date, netctl, custom DNS set up via /etc/resolv.conf.{head,tail} and a broken dnsmasq/hostsblock (I'll re-setup that just after).
Here are two questions I'd like to hear your advice on, if you don't mind:
1) How would you clean the services (eg. what steps)?
2) Why is wifi-menu finding no networks?
Wired connection runs fine on boot, not the wireless.
I worked on it only to realize I did a mess Here are the network-related systemd services atm :
ifplugd@multi-user.service
systemd-networkd
└──╼ systemctl status systemd-networkd
● systemd-networkd.service - Network Service
Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled)
Active: inactive (dead) since dim. 2015-09-06 10:37:58 CEST; 7h ago
Docs: man:systemd-networkd.service(8)
Process: 500 ExecStart=/usr/lib/systemd/systemd-networkd (code=exited, status=0/SUCCESS)
Main PID: 500 (code=exited, status=0/SUCCESS)
Status: "Shutting down..."
sept. 06 10:37:26 gwenael systemd[1]: Starting Network Service...
sept. 06 10:37:26 gwenael systemd-networkd[500]: Enumeration completed
sept. 06 10:37:26 gwenael systemd[1]: Started Network Service.
sept. 06 10:37:26 gwenael systemd-networkd[500]: net0: Renamed to eth0 <-- see the udev rule below
sept. 06 10:37:26 gwenael systemd-networkd[500]: eth0: Renamed to net0
sept. 06 10:37:26 gwenael systemd-networkd[500]: wifi0: Renamed to wlan0
sept. 06 10:37:26 gwenael systemd-networkd[500]: wlan0: Renamed to wifi0
sept. 06 10:37:26 gwenael systemd-networkd[500]: net0: Configured
sept. 06 10:37:28 gwenael systemd-networkd[500]: net0: Gained carrier
systemd-networkd.socket
network.target
dhcpcd@eth0.service --> Dependency failed
system-dhcpcd.slice
sys-subsystem-net-devices-net0.device
sys-subsystem-net-devices-eth0.device --> time out (see the udev rule)
netctl list shows no active profile. Maybe for I configured a static one then before I realize going DHCP here as well would make it simplier (laptop). Can assign a static IP from the router at home.
/etc/udev/rules.d/10-network.rules as per the wiki: Network_configuration#Change_device_name
# Avoid race conditions between the kernel and udev during boot.
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:26:b9:db:d4:70", NAME="net0"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:26:4d:78:71:55", NAME="wifi0"
#wifi-menu -o
Scanning for networks... failed
No networks found
# ip link show dev wifi0
3: wifi0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 00:26:4d:78:71:55 brd ff:ff:ff:ff:ff:ff
lspci -k
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02)
Subsystem: Dell Device 041a
Kernel driver in use: r8169
Kernel modules: r8169
07:00.0 Network controller: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
Subsystem: Qualcomm Atheros Device 0204
Kernel driver in use: ath9k
Kernel modules: ath9k
lsmod |grep ath
ath9k 114919 0
ath9k_common 26370 1 ath9k
ath9k_hw 417591 2 ath9k_common,ath9k
ath 21707 3 ath9k_common,ath9k,ath9k_hw
mac80211 552984 1 ath9k
led_class 12743 2 ath9k,dell_laptop
cfg80211 404454 4 ath,ath9k_common,ath9k,mac80211
Last edited by kozaki (2015-09-06 21:25:22)
Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery ) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9
Offline
I don't understand which .services you are attempting to run.
Please post the output of:
ls -l /etc/systemd/system/multi-user.target.wants
Jin, Jîyan, Azadî
Offline
Try ip link set wifi0 up (As root)
Then wifi-menu.
Also, what is all this about
sept. 06 10:37:26 gwenael systemd-networkd[500]: wifi0: Renamed to wlan0
sept. 06 10:37:26 gwenael systemd-networkd[500]: wlan0: Renamed to wifi0
On my system, wlan0 is renamed wlo1 by the kernel
Last edited by ewaller (2015-09-06 17:37:47)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Also, what is all this about
sept. 06 10:37:26 gwenael systemd-networkd[500]: wifi0: Renamed to wlan0 sept. 06 10:37:26 gwenael systemd-networkd[500]: wlan0: Renamed to wifi0
On my system, wlan0 is renamed wlo1 by the kernel
/etc/udev/rules.d/10-network.rules as per the wiki: https://wiki.archlinux.org/index.php/Ne … evice_name
# Avoid race conditions between the kernel and udev during boot. SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:26:b9:db:d4:70", N AME="net0" SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:26:4d:78:71:55", N AME="wifi0"
Jin, Jîyan, Azadî
Offline
But, but... wifi0 gets changed to wlan0, then wlan0 immediately is changed back to wifi0. Seems, er, unnecessary
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Thank you for helping to dig in
$ ls -l /etc/systemd/system/multi-user.target.wants/
total 0
lrwxrwxrwx 1 root root 37 sept. 16 2012 acpid.service -> /usr/lib/systemd/system/acpid.service
lrwxrwxrwx 1 root root 35 sept. 2 03:52 asd.service -> /usr/lib/systemd/system/asd.service
lrwxrwxrwx 1 root root 41 mai 1 2013 autochown.service -> /usr/lib/systemd/system/autochown.service
lrwxrwxrwx 1 root root 38 sept. 16 2012 cronie.service -> /usr/lib/systemd/system/cronie.service
lrwxrwxrwx 1 root root 39 mai 15 2014 dhcpcd@eth0.service -> /usr/lib/systemd/system/dhcpcd@.service
lrwxrwxrwx 1 root root 39 avril 11 2013 dnsmasq.service -> /usr/lib/systemd/system/dnsmasq.service
lrwxrwxrwx 1 root root 39 déc. 9 2014 haveged.service -> /usr/lib/systemd/system/haveged.service
lrwxrwxrwx 1 root root 40 sept. 16 2012 ifplugd@.service -> /usr/lib/systemd/system/ifplugd@.service
lrwxrwxrwx 1 root root 37 janv. 27 2015 kwakd.service -> /usr/lib/systemd/system/kwakd.service
lrwxrwxrwx 1 root root 35 mars 17 2013 psd.service -> /usr/lib/systemd/system/psd.service
lrwxrwxrwx 1 root root 29 févr. 2 2013 psd.timer -> /etc/systemd/system/psd.timer
lrwxrwxrwx 1 root root 40 mai 2 18:25 remote-fs.target -> /usr/lib/systemd/system/remote-fs.target
lrwxrwxrwx 1 root root 39 sept. 16 2012 sensord.service -> /usr/lib/systemd/system/sensord.service
lrwxrwxrwx 1 root root 39 sept. 2 00:10 sysstat.service -> /usr/lib/systemd/system/sysstat.service
lrwxrwxrwx 1 root root 48 sept. 3 20:35 systemd-networkd.service -> /usr/lib/systemd/system/systemd-networkd.service
lrwxrwxrwx 1 root root 38 janv. 3 2013 vnstat.service -> /usr/lib/systemd/system/vnstat.service
Good idea to list them all. Note I've got all the 'statuses' ready if needed
ip link set wifi0 up
RTNETLINK answers: Operation not possible due to RF-kill
┌─[✗]─[gwenael]─[~]
└──╼ wifi-menu -o
Scanning for networks... failed
No networks found
But, but... wifi0 gets changed to wlan0, then wlan0 immediately is changed back to wifi0. Seems, er, unnecessary
+1 definitively. Now the aforementioned wiki stands clearly:
When choosing the static names it should be avoided to use names in the format of "ethX" and "wlanX", because this may lead to race conditions between the kernel and udev during boot. Instead, it is better to use interface names that are not used by the kernel as default, e.g.: net0, net1, wifi0, wifi1.
And
ls /sys/class/net/
lo@ net0@ wifi0@
Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery ) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9
Offline
lrwxrwxrwx 1 root root 39 mai 15 2014 dhcpcd@eth0.service -> /usr/lib/systemd/system/dhcpcd@.service [...] lrwxrwxrwx 1 root root 48 sept. 3 20:35 systemd-networkd.service -> /usr/lib/systemd/system/systemd-networkd.service
There may be conflict between these two, depending on how you have set up systemd-networkd
I think ifplug@.service does he same thing as dhcpcd.service (from reading the wiki; I've never used it myself); also, shouldn't there be an interface name after "@"?
You need to decide how you want to connect and stick to a single method (per interface).
ip link set wifi0 up RTNETLINK answers: Operation not possible due to RF-kill
Try this:
# rfkill unblock all
Now the aforementioned wiki stands clearly:
When choosing the static names it should be avoided to use names in the format of "ethX" and "wlanX", because this may lead to race conditions between the kernel and udev during boot. Instead, it is better to use interface names that are not used by the kernel as default, e.g.: net0, net1, wifi0, wifi1.
That's all very well but your interfaces will *not* be called "ethX" or "wlanX" under systemd
Jin, Jîyan, Azadî
Offline
kozaki wrote:lrwxrwxrwx 1 root root 39 mai 15 2014 dhcpcd@eth0.service -> /usr/lib/systemd/system/dhcpcd@.service [...] lrwxrwxrwx 1 root root 48 sept. 3 20:35 systemd-networkd.service -> /usr/lib/systemd/system/systemd-networkd.service
There may be conflict between these two, depending on how you have set up systemd-networkd
I think ifplug@.service does he same thing as dhcpcd.service (from reading the wiki; I've never used it myself); also, shouldn't there be an interface name after "@"?
You need to decide how you want to connect and stick to a single method (per interface).
dhcpcd@eth0.service was used before I w̶o̶r̶k̶e̶d̶ messed up the networking config today (use unavailable eth0 anyway). As for ifplug services, it uses %i to get the NIC; BTW two are enabled atm:
#systemctl -a|grep ifplug
ifplugd@multi-user.service loaded active running Daemon which acts upon network cable insertion/removal
system-ifplugd.slice loaded active active system-ifplugd.slice
Sure I want to use a single method (for both interfaces if possible) as well: netctl with dhcpd.
Can I get rid of ifplug* daemons now that I set up netcl ethernet-dhcp, even it's a netbook?
Try this:
# rfkill unblock all
Errr...
rfki ??
$ which rfkill
which: no rfkill in <PATHS> [WTF!?]
#pacman -S rfkill
rfkill unblock all
┌─[gwenael]─[/etc/netctl]
└──╼ ip link set wifi0 up
RTNETLINK answers: Operation not possible due to RF-kill
That's all very well but your interfaces will *not* be called "ethX" or "wlanX" under systemd
Yeap and I read the Sticky post above Note they were still called standard {eth,wlan}0 untill adding the udev rule, though.
PS: the missing rfkill package might be linked with the boot freezed on that netbook when using a kernel Linux 4x That would be a nice collateral gift from you Head_on
Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery ) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9
Offline
Can I get rid of ifplug* daemons now that I set up netcl ethernet-dhcp, even it's a netbook?
Yes, I think so.
What is the output of:
rfkill list
I scanned through your other thread and it looks like you're stuck with the LTS kernel (?regression).
Jin, Jîyan, Azadî
Offline
Thank you Head_on_a_stick. /etc/systemd/system/multi-user.target.wants/ starting to look nicer (more KISS).
rfkill list
0: compal-wifi: Wireless LAN
Soft blocked: no
Hard blocked: no
1: compal-bluetooth: Bluetooth
Soft blocked: no
Hard blocked: no
2: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
Will check after rebooting, to check kernel-4x. For Yeah, I'm stuck with kernel linux-3x (3.19.14-ck atm).
Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery ) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9
Offline
rfkill list 0: compal-wifi: Wireless LAN Soft blocked: no Hard blocked: no 1: compal-bluetooth: Bluetooth Soft blocked: no Hard blocked: no 2: phy0: Wireless LAN Soft blocked: no Hard blocked: no
You still can't bring the interface up with that `rfkill` output?
That befuddles me totally
Jin, Jîyan, Azadî
Offline
*Couldn't*, but ehy, Head_on, don't let you get beffudled as wifi-menu works back... after rebooting
So does the network with 3 services enabled: netctl.service, netctl@ethernet\\x2ddhcp.service and systemd-networkd. Head_on_a_stick thank you for your help, appreciated! Netctl ethernet-dhcp profile once needed twelve seconds to get an IP (below), and another time failed to load --with net0 (eth0) fully working. So I'll dig in the conf a bit further.
#systemctl status netctl@ethernet\\x2ddhcp.service
● netctl@ethernet\x2ddhcp.service - A basic dhcp ethernet connection
Loaded: loaded (/etc/systemd/system/netctl@ethernet\x2ddhcp.service; enabled; vendor preset: disabled)
Active: active (exited) since dim. 2015-09-06 23:10:54 CEST; 7min ago
Docs: man:netctl.profile(5)
Process: 369 ExecStart=/usr/lib/network/network start %I (code=exited, status=0/SUCCESS)
Main PID: 369 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/system-netctl.slice/netctl@ethernet\x2ddhcp.service
└─618 dhcpcd -4 -q -t 30 -L net0
sept. 06 23:10:43 gwenael systemd[1]: Starting A basic dhcp ethernet connection...
sept. 06 23:10:44 gwenael network[369]: Starting network profile 'ethernet-dhcp'...
sept. 06 23:10:52 gwenael dhcpcd[488]: DUID NNNN
sept. 06 23:10:52 gwenael dhcpcd[488]: net0: IAID NNN
sept. 06 23:10:54 gwenael systemd[1]: Started A basic dhcp ethernet connection.
sept. 06 23:10:54 gwenael network[369]: Started network profile 'ethernet-dhcp'
sept. 06 23:10:55 gwenael systemd[1]: Started A basic dhcp ethernet connection.
Last edited by kozaki (2015-09-07 09:31:53)
Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery ) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9
Offline
Update: Confirming the issue's solved (along with my understanding of basic of network configuration with systemd :}). Thank you again for your help Head_on
Boot time comparison of networkd & netctl on a small netbook (that used to take a minute to boot up!)
1) system-networkd (wired, static) only: Fast
That even works without enabling systemd-resolved.service or symlinking run/systemd/resolve/resolv.conf -> /etc/resolv.conf on my wired static connection (wiki says these are required).
Systemd-analyze && systemd-analyze blame
Startup finished in 5.022s (kernel) + 17.500s (userspace) = 22.523s
9.826s dev-sda5.device
2.323s systemd-journald.service
2.010s systemd-udevd.service
1.914s systemd-vconsole-setup.service
1.717s systemd-modules-load.service
1.536s home.mount
1.031s systemd-journal-flush.service
973ms dev-mqueue.mount
971ms sys-kernel-debug.mount
969ms dev-hugepages.mount
930ms systemd-remount-fs.service
897ms tmp.mount
894ms systemd-fsck@dev-disk-by\x2dlabel-www.service
730ms systemd-fsck@dev-disk-by\x2dlabel-data.service
693ms data.mount
682ms systemd-readahead-replay.service
573ms systemd-networkd.service «----
2) netctl (wired & wireless dhcp) only: portable
systemd-analyze && systemd-analyze blame
Startup finished in 4.943s (kernel) + 29.531s (userspace) = 34.474s
11.076s netctl@ethernet_dhcp.service «----
10.994s dev-sda5.device
5.274s systemd-fsck@dev-disk-by\x2dlabel-www.service
2.768s systemd-journald.service
2.127s systemd-vconsole-setup.service
2.099s systemd-udevd.service
2.062s sysstat.service
2.033s systemd-modules-load.service
1.622s data.mount
1.434s systemd-fsck@dev-disk-by\x2dlabel-data.service
1.264s var-www.mount
1.073s user@1000.service
950ms sysstat-collect.service
systemd-analyze critical-chain
multi-user.target @29.531s
└─netctl@ethernet_dhcp.service @18.453s +11.076s
Note: the dhcpcd part seems not to be the main culprit for the boot time:
ip link set net0 down
time -p dhcpcd net0
net0: adding address ...
...
net0: adding route to 192.168.1.0/24
net0: adding default route via 192.168.1.NN
forked to background, child pid 1209
real 2.84
user 0.16
sys 0.02
Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery ) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9
Offline