Wrong predictable network interface name in Debian
Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
My internal onboard PCI intel 7265 gets a human name wlp2s0
However I have a USB ALFA AWUS036NHA (Atheros 9271L) card that is named as wlx00c0ca97323e, instead of (e.g wlp0s20u1).
sudo udevadm test /sys/class/net/wlx00c0ca97323e 2>/dev/null |grep ID_NET_NAME_
ID_NET_NAME_MAC=wlx00c0ca97323e
ID_NET_NAME_PATH=wlp0s20u1
This is pretty inconvenient for memorization, and I have to always copy-paste. Any ideas why this happens? Is this normal?
$ uname -a
Linux red 4.15.0-2-amd64 #1 SMP Debian 4.15.11-1 (2018-03-20) x86_64 GNU/Linux
$ ifconfig -a
wlp2s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 18:5e:0f:9f:2c:61 txqueuelen 1000 (Ethernet)
RX packets 420 bytes 154184 (150.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 242 bytes 46251 (45.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlx00c0ca97323e: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.68 netmask 255.255.255.0 broadcast 192.168.1.255
ether 00:c0:ca:97:32:3e txqueuelen 1000 (Ethernet)
RX packets 46034 bytes 21218629 (20.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 47246 bytes 5743934 (5.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
I have other connectivity/driver problems with that card but I suppose that they are irrelevant with this question...
debian systemd network-interface
add a comment |Â
up vote
4
down vote
favorite
My internal onboard PCI intel 7265 gets a human name wlp2s0
However I have a USB ALFA AWUS036NHA (Atheros 9271L) card that is named as wlx00c0ca97323e, instead of (e.g wlp0s20u1).
sudo udevadm test /sys/class/net/wlx00c0ca97323e 2>/dev/null |grep ID_NET_NAME_
ID_NET_NAME_MAC=wlx00c0ca97323e
ID_NET_NAME_PATH=wlp0s20u1
This is pretty inconvenient for memorization, and I have to always copy-paste. Any ideas why this happens? Is this normal?
$ uname -a
Linux red 4.15.0-2-amd64 #1 SMP Debian 4.15.11-1 (2018-03-20) x86_64 GNU/Linux
$ ifconfig -a
wlp2s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 18:5e:0f:9f:2c:61 txqueuelen 1000 (Ethernet)
RX packets 420 bytes 154184 (150.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 242 bytes 46251 (45.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlx00c0ca97323e: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.68 netmask 255.255.255.0 broadcast 192.168.1.255
ether 00:c0:ca:97:32:3e txqueuelen 1000 (Ethernet)
RX packets 46034 bytes 21218629 (20.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 47246 bytes 5743934 (5.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
I have other connectivity/driver problems with that card but I suppose that they are irrelevant with this question...
debian systemd network-interface
1
Maybe because the USB port can have many identical hardware plugged into it and to differentiate between a serial number is used?
â jc__
Apr 11 at 13:10
1
"Normal"? Yes, it's normal. Debian community decided that they will be named USB NIC-s and created corresponding udev rules. If you don't like so long names, you can change udev rules for your needs.
â Yurij Goncharuk
Apr 11 at 13:19
Thank you all for your answers. Ok, so it is normal then. Creating udev or systemd rule to rename the interface, requires, as far as I know, to have a persistent mac address to be used as an identifier. However gnome's network-manager (if I am not mistaken) continuously changes the mac addresses. Anyway it helps to know that this is the normal behavior.
â chefarov
Apr 11 at 13:30
add a comment |Â
up vote
4
down vote
favorite
up vote
4
down vote
favorite
My internal onboard PCI intel 7265 gets a human name wlp2s0
However I have a USB ALFA AWUS036NHA (Atheros 9271L) card that is named as wlx00c0ca97323e, instead of (e.g wlp0s20u1).
sudo udevadm test /sys/class/net/wlx00c0ca97323e 2>/dev/null |grep ID_NET_NAME_
ID_NET_NAME_MAC=wlx00c0ca97323e
ID_NET_NAME_PATH=wlp0s20u1
This is pretty inconvenient for memorization, and I have to always copy-paste. Any ideas why this happens? Is this normal?
$ uname -a
Linux red 4.15.0-2-amd64 #1 SMP Debian 4.15.11-1 (2018-03-20) x86_64 GNU/Linux
$ ifconfig -a
wlp2s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 18:5e:0f:9f:2c:61 txqueuelen 1000 (Ethernet)
RX packets 420 bytes 154184 (150.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 242 bytes 46251 (45.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlx00c0ca97323e: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.68 netmask 255.255.255.0 broadcast 192.168.1.255
ether 00:c0:ca:97:32:3e txqueuelen 1000 (Ethernet)
RX packets 46034 bytes 21218629 (20.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 47246 bytes 5743934 (5.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
I have other connectivity/driver problems with that card but I suppose that they are irrelevant with this question...
debian systemd network-interface
My internal onboard PCI intel 7265 gets a human name wlp2s0
However I have a USB ALFA AWUS036NHA (Atheros 9271L) card that is named as wlx00c0ca97323e, instead of (e.g wlp0s20u1).
sudo udevadm test /sys/class/net/wlx00c0ca97323e 2>/dev/null |grep ID_NET_NAME_
ID_NET_NAME_MAC=wlx00c0ca97323e
ID_NET_NAME_PATH=wlp0s20u1
This is pretty inconvenient for memorization, and I have to always copy-paste. Any ideas why this happens? Is this normal?
$ uname -a
Linux red 4.15.0-2-amd64 #1 SMP Debian 4.15.11-1 (2018-03-20) x86_64 GNU/Linux
$ ifconfig -a
wlp2s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 18:5e:0f:9f:2c:61 txqueuelen 1000 (Ethernet)
RX packets 420 bytes 154184 (150.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 242 bytes 46251 (45.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlx00c0ca97323e: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.68 netmask 255.255.255.0 broadcast 192.168.1.255
ether 00:c0:ca:97:32:3e txqueuelen 1000 (Ethernet)
RX packets 46034 bytes 21218629 (20.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 47246 bytes 5743934 (5.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
I have other connectivity/driver problems with that card but I suppose that they are irrelevant with this question...
debian systemd network-interface
asked Apr 11 at 12:55
chefarov
1777
1777
1
Maybe because the USB port can have many identical hardware plugged into it and to differentiate between a serial number is used?
â jc__
Apr 11 at 13:10
1
"Normal"? Yes, it's normal. Debian community decided that they will be named USB NIC-s and created corresponding udev rules. If you don't like so long names, you can change udev rules for your needs.
â Yurij Goncharuk
Apr 11 at 13:19
Thank you all for your answers. Ok, so it is normal then. Creating udev or systemd rule to rename the interface, requires, as far as I know, to have a persistent mac address to be used as an identifier. However gnome's network-manager (if I am not mistaken) continuously changes the mac addresses. Anyway it helps to know that this is the normal behavior.
â chefarov
Apr 11 at 13:30
add a comment |Â
1
Maybe because the USB port can have many identical hardware plugged into it and to differentiate between a serial number is used?
â jc__
Apr 11 at 13:10
1
"Normal"? Yes, it's normal. Debian community decided that they will be named USB NIC-s and created corresponding udev rules. If you don't like so long names, you can change udev rules for your needs.
â Yurij Goncharuk
Apr 11 at 13:19
Thank you all for your answers. Ok, so it is normal then. Creating udev or systemd rule to rename the interface, requires, as far as I know, to have a persistent mac address to be used as an identifier. However gnome's network-manager (if I am not mistaken) continuously changes the mac addresses. Anyway it helps to know that this is the normal behavior.
â chefarov
Apr 11 at 13:30
1
1
Maybe because the USB port can have many identical hardware plugged into it and to differentiate between a serial number is used?
â jc__
Apr 11 at 13:10
Maybe because the USB port can have many identical hardware plugged into it and to differentiate between a serial number is used?
â jc__
Apr 11 at 13:10
1
1
"Normal"? Yes, it's normal. Debian community decided that they will be named USB NIC-s and created corresponding udev rules. If you don't like so long names, you can change udev rules for your needs.
â Yurij Goncharuk
Apr 11 at 13:19
"Normal"? Yes, it's normal. Debian community decided that they will be named USB NIC-s and created corresponding udev rules. If you don't like so long names, you can change udev rules for your needs.
â Yurij Goncharuk
Apr 11 at 13:19
Thank you all for your answers. Ok, so it is normal then. Creating udev or systemd rule to rename the interface, requires, as far as I know, to have a persistent mac address to be used as an identifier. However gnome's network-manager (if I am not mistaken) continuously changes the mac addresses. Anyway it helps to know that this is the normal behavior.
â chefarov
Apr 11 at 13:30
Thank you all for your answers. Ok, so it is normal then. Creating udev or systemd rule to rename the interface, requires, as far as I know, to have a persistent mac address to be used as an identifier. However gnome's network-manager (if I am not mistaken) continuously changes the mac addresses. Anyway it helps to know that this is the normal behavior.
â chefarov
Apr 11 at 13:30
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
Issue at Hand
Debian has moved to a newer method of outlining interface names. Your USB Wifi Adapter is being assigned its interface name based on its MAC address. Here is a link to a mail list outlining the change. I will try to help you by outlining the old method of forcing an adapter name and what could work as a new method.
1. Old Method
YOu can assign interface names using udev
. Look for a file named /etc/udev/rules.d/70-persistent-net.rules
and append the portion listing your adapter device name. It should look something like this:
SUBSYSTEM=="net", DRIVERS=="?*", ATTRaddress=="[MAC ADDRESS]", NAME="[Adapter Name]"
You can change all of your devices names here, verify first by the MAC address. Bring the interface down then run udevadm trigger --sysname [Old Interface Name]
and bring the interface back up. This should change the name as outlined in this post. However this may no longer be a valid way of managing your interfaces as of stretch.
2. Newer Method
I am including a link to the Freedesktop Wiki on predictable network interface names. I am also referencing this post concerning a similar issue. It involves Ubuntu but could still apply.
The user there suggests creating a symbolic link between /etc/udev/rules.d/80-net-setup-link.rules
and /dev/null
. First start by copying rule 80 from /lib/udev/rules.d
to /etc/udev/rules.d
. Its contents should match what is listed in the post. Then run:
sudo ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
and reboot. This should allow your USB wireless interface to have a predictable network interface name.
Conclusion
Please read through all the links I have provided first and verify that your system has udev
and the relevant files. These fixes should work, however I would always test these changes before permanently disabling certain features. If there are any misconceptions or issues with my post please do not hesitate to ask. I always appreciate corrections. Best of Luck!
2
Thank you for your detailed answer. About (1): can't be done in Debian with Gnome-shell because it needs persistent mac addresses (check my comment in the question). About (2): I don't think there is any point to copy a file to/etc/udev/rules.d/80-net-setup-link.rules
and then replace it with a link to/dev/null
. Appart of that, making the link, seems to disable predictable names and going back to old stylewlan0
,wlan1
, etc.
â chefarov
Apr 11 at 17:57
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Issue at Hand
Debian has moved to a newer method of outlining interface names. Your USB Wifi Adapter is being assigned its interface name based on its MAC address. Here is a link to a mail list outlining the change. I will try to help you by outlining the old method of forcing an adapter name and what could work as a new method.
1. Old Method
YOu can assign interface names using udev
. Look for a file named /etc/udev/rules.d/70-persistent-net.rules
and append the portion listing your adapter device name. It should look something like this:
SUBSYSTEM=="net", DRIVERS=="?*", ATTRaddress=="[MAC ADDRESS]", NAME="[Adapter Name]"
You can change all of your devices names here, verify first by the MAC address. Bring the interface down then run udevadm trigger --sysname [Old Interface Name]
and bring the interface back up. This should change the name as outlined in this post. However this may no longer be a valid way of managing your interfaces as of stretch.
2. Newer Method
I am including a link to the Freedesktop Wiki on predictable network interface names. I am also referencing this post concerning a similar issue. It involves Ubuntu but could still apply.
The user there suggests creating a symbolic link between /etc/udev/rules.d/80-net-setup-link.rules
and /dev/null
. First start by copying rule 80 from /lib/udev/rules.d
to /etc/udev/rules.d
. Its contents should match what is listed in the post. Then run:
sudo ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
and reboot. This should allow your USB wireless interface to have a predictable network interface name.
Conclusion
Please read through all the links I have provided first and verify that your system has udev
and the relevant files. These fixes should work, however I would always test these changes before permanently disabling certain features. If there are any misconceptions or issues with my post please do not hesitate to ask. I always appreciate corrections. Best of Luck!
2
Thank you for your detailed answer. About (1): can't be done in Debian with Gnome-shell because it needs persistent mac addresses (check my comment in the question). About (2): I don't think there is any point to copy a file to/etc/udev/rules.d/80-net-setup-link.rules
and then replace it with a link to/dev/null
. Appart of that, making the link, seems to disable predictable names and going back to old stylewlan0
,wlan1
, etc.
â chefarov
Apr 11 at 17:57
add a comment |Â
up vote
0
down vote
Issue at Hand
Debian has moved to a newer method of outlining interface names. Your USB Wifi Adapter is being assigned its interface name based on its MAC address. Here is a link to a mail list outlining the change. I will try to help you by outlining the old method of forcing an adapter name and what could work as a new method.
1. Old Method
YOu can assign interface names using udev
. Look for a file named /etc/udev/rules.d/70-persistent-net.rules
and append the portion listing your adapter device name. It should look something like this:
SUBSYSTEM=="net", DRIVERS=="?*", ATTRaddress=="[MAC ADDRESS]", NAME="[Adapter Name]"
You can change all of your devices names here, verify first by the MAC address. Bring the interface down then run udevadm trigger --sysname [Old Interface Name]
and bring the interface back up. This should change the name as outlined in this post. However this may no longer be a valid way of managing your interfaces as of stretch.
2. Newer Method
I am including a link to the Freedesktop Wiki on predictable network interface names. I am also referencing this post concerning a similar issue. It involves Ubuntu but could still apply.
The user there suggests creating a symbolic link between /etc/udev/rules.d/80-net-setup-link.rules
and /dev/null
. First start by copying rule 80 from /lib/udev/rules.d
to /etc/udev/rules.d
. Its contents should match what is listed in the post. Then run:
sudo ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
and reboot. This should allow your USB wireless interface to have a predictable network interface name.
Conclusion
Please read through all the links I have provided first and verify that your system has udev
and the relevant files. These fixes should work, however I would always test these changes before permanently disabling certain features. If there are any misconceptions or issues with my post please do not hesitate to ask. I always appreciate corrections. Best of Luck!
2
Thank you for your detailed answer. About (1): can't be done in Debian with Gnome-shell because it needs persistent mac addresses (check my comment in the question). About (2): I don't think there is any point to copy a file to/etc/udev/rules.d/80-net-setup-link.rules
and then replace it with a link to/dev/null
. Appart of that, making the link, seems to disable predictable names and going back to old stylewlan0
,wlan1
, etc.
â chefarov
Apr 11 at 17:57
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Issue at Hand
Debian has moved to a newer method of outlining interface names. Your USB Wifi Adapter is being assigned its interface name based on its MAC address. Here is a link to a mail list outlining the change. I will try to help you by outlining the old method of forcing an adapter name and what could work as a new method.
1. Old Method
YOu can assign interface names using udev
. Look for a file named /etc/udev/rules.d/70-persistent-net.rules
and append the portion listing your adapter device name. It should look something like this:
SUBSYSTEM=="net", DRIVERS=="?*", ATTRaddress=="[MAC ADDRESS]", NAME="[Adapter Name]"
You can change all of your devices names here, verify first by the MAC address. Bring the interface down then run udevadm trigger --sysname [Old Interface Name]
and bring the interface back up. This should change the name as outlined in this post. However this may no longer be a valid way of managing your interfaces as of stretch.
2. Newer Method
I am including a link to the Freedesktop Wiki on predictable network interface names. I am also referencing this post concerning a similar issue. It involves Ubuntu but could still apply.
The user there suggests creating a symbolic link between /etc/udev/rules.d/80-net-setup-link.rules
and /dev/null
. First start by copying rule 80 from /lib/udev/rules.d
to /etc/udev/rules.d
. Its contents should match what is listed in the post. Then run:
sudo ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
and reboot. This should allow your USB wireless interface to have a predictable network interface name.
Conclusion
Please read through all the links I have provided first and verify that your system has udev
and the relevant files. These fixes should work, however I would always test these changes before permanently disabling certain features. If there are any misconceptions or issues with my post please do not hesitate to ask. I always appreciate corrections. Best of Luck!
Issue at Hand
Debian has moved to a newer method of outlining interface names. Your USB Wifi Adapter is being assigned its interface name based on its MAC address. Here is a link to a mail list outlining the change. I will try to help you by outlining the old method of forcing an adapter name and what could work as a new method.
1. Old Method
YOu can assign interface names using udev
. Look for a file named /etc/udev/rules.d/70-persistent-net.rules
and append the portion listing your adapter device name. It should look something like this:
SUBSYSTEM=="net", DRIVERS=="?*", ATTRaddress=="[MAC ADDRESS]", NAME="[Adapter Name]"
You can change all of your devices names here, verify first by the MAC address. Bring the interface down then run udevadm trigger --sysname [Old Interface Name]
and bring the interface back up. This should change the name as outlined in this post. However this may no longer be a valid way of managing your interfaces as of stretch.
2. Newer Method
I am including a link to the Freedesktop Wiki on predictable network interface names. I am also referencing this post concerning a similar issue. It involves Ubuntu but could still apply.
The user there suggests creating a symbolic link between /etc/udev/rules.d/80-net-setup-link.rules
and /dev/null
. First start by copying rule 80 from /lib/udev/rules.d
to /etc/udev/rules.d
. Its contents should match what is listed in the post. Then run:
sudo ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
and reboot. This should allow your USB wireless interface to have a predictable network interface name.
Conclusion
Please read through all the links I have provided first and verify that your system has udev
and the relevant files. These fixes should work, however I would always test these changes before permanently disabling certain features. If there are any misconceptions or issues with my post please do not hesitate to ask. I always appreciate corrections. Best of Luck!
edited Apr 11 at 13:56
answered Apr 11 at 13:36
kemotep
1,0821516
1,0821516
2
Thank you for your detailed answer. About (1): can't be done in Debian with Gnome-shell because it needs persistent mac addresses (check my comment in the question). About (2): I don't think there is any point to copy a file to/etc/udev/rules.d/80-net-setup-link.rules
and then replace it with a link to/dev/null
. Appart of that, making the link, seems to disable predictable names and going back to old stylewlan0
,wlan1
, etc.
â chefarov
Apr 11 at 17:57
add a comment |Â
2
Thank you for your detailed answer. About (1): can't be done in Debian with Gnome-shell because it needs persistent mac addresses (check my comment in the question). About (2): I don't think there is any point to copy a file to/etc/udev/rules.d/80-net-setup-link.rules
and then replace it with a link to/dev/null
. Appart of that, making the link, seems to disable predictable names and going back to old stylewlan0
,wlan1
, etc.
â chefarov
Apr 11 at 17:57
2
2
Thank you for your detailed answer. About (1): can't be done in Debian with Gnome-shell because it needs persistent mac addresses (check my comment in the question). About (2): I don't think there is any point to copy a file to
/etc/udev/rules.d/80-net-setup-link.rules
and then replace it with a link to /dev/null
. Appart of that, making the link, seems to disable predictable names and going back to old style wlan0
, wlan1
, etc.â chefarov
Apr 11 at 17:57
Thank you for your detailed answer. About (1): can't be done in Debian with Gnome-shell because it needs persistent mac addresses (check my comment in the question). About (2): I don't think there is any point to copy a file to
/etc/udev/rules.d/80-net-setup-link.rules
and then replace it with a link to /dev/null
. Appart of that, making the link, seems to disable predictable names and going back to old style wlan0
, wlan1
, etc.â chefarov
Apr 11 at 17:57
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f437011%2fwrong-predictable-network-interface-name-in-debian%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
Maybe because the USB port can have many identical hardware plugged into it and to differentiate between a serial number is used?
â jc__
Apr 11 at 13:10
1
"Normal"? Yes, it's normal. Debian community decided that they will be named USB NIC-s and created corresponding udev rules. If you don't like so long names, you can change udev rules for your needs.
â Yurij Goncharuk
Apr 11 at 13:19
Thank you all for your answers. Ok, so it is normal then. Creating udev or systemd rule to rename the interface, requires, as far as I know, to have a persistent mac address to be used as an identifier. However gnome's network-manager (if I am not mistaken) continuously changes the mac addresses. Anyway it helps to know that this is the normal behavior.
â chefarov
Apr 11 at 13:30