You are not logged in.
Pages: 1
I have 2 network cards and I'd like to disable one of them by its address (d4:54:8b:6a:d8:30) instead of its name (wlan1). I tried "ip link set wlan1 down" but it's up again on the next restart. Is there also any way to prevent the network cards from switching names with each other? wlan1 was wlan0 yesterday and vice versa.
Last edited by Xenfo (2023-08-14 14:15:26)
Offline
This is actually what https://wiki.archlinux.org/title/Networ … face_names is for, but it's disabled when you use iwd because that conflicts with it.
Either of
ip -o l | awk -F '[ :]' '/d4:54:8b:6a:d8:30/{print $3}'
ip -o l | sed '/d4:54:8b:6a:d8:30/!d; s/[0-9]*: \(wl[^:]*\): .*/\1/g'will extract you the device, though.
Is this an xy-problem? Are you trying to down the device to "hide" it from iwd?
Online
As for the second part: since version 197 systemd supports predictable network interface names (short intro). These names are not absolutely stable for some arbitrary definition of stability, but they are bound to logical location of the hardware, which should be good enough for your purpose.
You may also use udev to set a device name explicitly to whatever you want it to be. Either directly with the rules (matching by “address” attribute and using `NAME=` assignment) or using the systemd’s link mechanism (matching by `MACAddress`, renaming by setting `Name` in the `link` section).
Paperclips in avatars? | Sometimes I seem a bit harsh — don’t get offended too easily!
Offline
Online
This is actually what https://wiki.archlinux.org/title/Networ … face_names is for, but it's disabled when you use iwd because that conflicts with it.
Either ofip -o l | awk -F '[ :]' '/d4:54:8b:6a:d8:30/{print $3}' ip -o l | sed '/d4:54:8b:6a:d8:30/!d; s/[0-9]*: \(wl[^:]*\): .*/\1/g'will extract you the device, though.
Is this an xy-problem? Are you trying to down the device to "hide" it from iwd?
Not necessarily hide it but just disable it from being used and trying to connect to WiFi since it's no longer needed since I have the other WiFi card.
Offline
I have 2 network cards and I'd like to disable one of them by its address (d4:54:8b:6a:d8:30) instead of its name (wlan1). I tried "ip link set wlan1 down" but it's up again on the next restart. Is there also any way to prevent the network cards from switching names with each other? wlan1 was wlan0 yesterday and vice versa.
Take blacklist?
https://bbs.archlinux.org/viewtopic.php?id=220177
Last edited by growler (2023-08-13 16:23:26)
Offline
They are both Intel cards so wouldn’t that disable both of them?
Offline
They are both Intel cards so wouldn’t that disable both of them?
The kernel drivers are the same? ... lspci -k
If so, the blacklist is wrong.
Offline
You could possibly use a udev rule to rfkill it rather than bring it down and leverage the sample of the "semi-predictable" rename rule.
(But idk. how well iwd will respond to that)
Online
Not necessarily hide it but just disable it from being used and trying to connect to WiFi since it's no longer needed since I have the other WiFi card.
If the card you want to prevent being used came with the motherboard/system there may be a firmware option to disable it.
There is also the approach of binding the device to another driver for instance pci-stub.
Offline
Xenfo wrote:They are both Intel cards so wouldn’t that disable both of them?
The kernel drivers are the same? ... lspci -k
If so, the blacklist is wrong.
Yes, they both use iwlwifi since they are both Intel cards.
Xenfo wrote:Not necessarily hide it but just disable it from being used and trying to connect to WiFi since it's no longer needed since I have the other WiFi card.
If the card you want to prevent being used came with the motherboard/system there may be a firmware option to disable it.
There is also the approach of binding the device to another driver for instance pci-stub.
No firmware option to disable it (MSI being MSI) and not sure what you mean by the second part.
Offline
not sure what you mean by the second part.
You would add the following kernel parameter replacing VID:PID with the correct values
pci-stub.ids=VID:PIDOffline
bios ?
ezik
Online
bios ?
ezik
I missunderstood a previous post about disabling it with firmware but I don't think I can with iwlwifi. I do not have an option to disable it in BIOS though.
Offline
I was actually mistaken, my BIOS does support it, it was just weirdly named. Marking this as solved.
Offline
Pages: 1