IWD+ifupdown instead of wpasupplicant and systemd-resolved?
Hi, I have an old desktop machine with Debian 11, running fine, as usual.
Recently I bought a USB/Wi-Fi dongle/adapter to connect it to my home WLAN.
The chipset and correspondent firmware blob seem to be the 'MediaTek
MT7601U firmware, version 34 (mt7601u.bin)', available in the
`firmware-misc-nonfree` package.
After reading:
https://wiki.debian.org/NetworkConfiguration
https://www.debian.org/doc/manuals/debian-handbook/sect.network-config
https://www.debian.org/doc/manuals/debian-reference/ch05.en.html
https://wiki.debian.org/WiFi
https://wiki.debian.org/Firmware
https://wiki.debian.org/WiFi/HowToUse
, and some linked pages, I installed `firmware-misc-nonfree`,
rebooted, and configured the interface like this:
$ iwctl
[iwd]# station wlan4 connect "Fibertel WiFi238 2.4GHz"
Input passphrase and done. I'm connected.
[iwd]# station wlan4 show
Station: wlan4 *
--------------------------------------------------------------------------------
Settable Property Value
--------------------------------------------------------------------------------
Scanning no
State connected
Connected network Fibertel WiFi238 2.4GHz
ConnectedBss b8:66:85:fd:0a:d1
Frequency 2462
Security WPA2-Personal
RSSI -77 dBm
AverageRSSI -76 dBm
RxMode 802.11n
RxMCS 4
TxMode 802.11n
TxMCS 4
TxBitrate 43300 Kbit/s
RxBitrate 39000 Kbit/s
ExpectedThroughput 15937 Kbit/s
Then:
$ sudo nano /etc/network/interfaces
, and added:
```
allow-hotplug wlan4
iface wlan4 inet dhcp
```
And then:
$ sudo ifup wlan4
And done. Everything seems to be working perfectly. I've got this:
$ cat /etc/resolv.conf
domain fibertel.com.ar
search fibertel.com.ar
nameserver 192.168.0.1
$ ip route list
default via 192.168.0.1 dev wlan4
192.168.0.0/24 dev wlan4 proto kernel scope link src 192.168.0.168
$ ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s7: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN
mode DEFAULT group default qlen 1000
link/ether 6c:f0:49:9b:b5:13 brd ff:ff:ff:ff:ff:ff
11: wlan4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state
UP mode DORMANT group default qlen 1000
link/ether 20:e9:17:0d:5d:9e brd ff:ff:ff:ff:ff:ff
$ sudo ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 71 bytes 9188 (8.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 71 bytes 9188 (8.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan4: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.168 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::22e9:17ff:fe0d:5d9e prefixlen 64 scopeid 0x20<link>
ether 20:e9:17:0d:5d:9e txqueuelen 1000 (Ethernet)
RX packets 66525 bytes 17810025 (16.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 72346 bytes 12467100 (11.8 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
All this seems OK?
I'm asking because the Debian wiki proposes (I think) two different schemes:
- ifupdown with wpasupplicant, iw, wireless-tools, etc.
- iwd enabling `EnableNetworkConfiguration=true` in /etc/iwd/main.conf
and setting the name resolving service with `systemd-resolved`
, and I did neither:
$ systemctl status systemd-networkd.service
● systemd-networkd.service - Network Service
Loaded: loaded (/lib/systemd/system/systemd-networkd.service;
disabled; vendor>
Active: inactive (dead)
TriggeredBy: ● systemd-networkd.socket
Docs: man:systemd-networkd.service(8)
, but apparently a mix between both schemes (my "understanding" of the
situation is that iwd creates/manages the connection between the
adapter and the router, and ifupdown with /etc/network/interfaces
sets/configures the interface for the system and the DNS resolution,
because I never installed the `resolvconf` package).
Now, is this proper/right/reliable?
Should I do something different?
Is it normal/irrelevant that I receive once and again the local IP
address 192.168.0.168 (meaning, the last one of all)?
And finally: if this is another possible/simpler solution, should I
(or anyone better equipped) add it to the wiki for other people's use?
Thanks a lot in advance and I desire everybody a wonderful year's beginning!
Reply to: