How to determine what hardware is associated with what network interface
up vote
0
down vote
favorite
I have an inbuilt network card and a Wi-Fi dongle.
I use wpa_supplicant
, hostapd
and the likes to operate them.
The trouble is that sometimes the dongle is wlan0
, and sometimes it is wlan1
(likewise for the inbuilt network card of course): so I never know whether "wlan0
" is the dongle or the inbuilt card. The association wlanX
<-> hardware appears completely random to me.
What is the command line to see, for a specific interface (wlan0
for instance), what hardware it corresponds to?
Alternatively, how to make sure a specific hardware (the dongle say) is always designated by a same interface (wlan0
say)?
Not being able to discriminate between these two hardware is a real problem because my dongle does not support the AP mode for instance.
networking command-line networkmanager hostapd
New contributor
add a comment |
up vote
0
down vote
favorite
I have an inbuilt network card and a Wi-Fi dongle.
I use wpa_supplicant
, hostapd
and the likes to operate them.
The trouble is that sometimes the dongle is wlan0
, and sometimes it is wlan1
(likewise for the inbuilt network card of course): so I never know whether "wlan0
" is the dongle or the inbuilt card. The association wlanX
<-> hardware appears completely random to me.
What is the command line to see, for a specific interface (wlan0
for instance), what hardware it corresponds to?
Alternatively, how to make sure a specific hardware (the dongle say) is always designated by a same interface (wlan0
say)?
Not being able to discriminate between these two hardware is a real problem because my dongle does not support the AP mode for instance.
networking command-line networkmanager hostapd
New contributor
This solved it for me (on Raspbian Stretch): raspberrypi.org/forums/viewtopic.php?f=36&t=198946. More tricky that it seems.
– hartmut
Dec 3 at 10:57
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have an inbuilt network card and a Wi-Fi dongle.
I use wpa_supplicant
, hostapd
and the likes to operate them.
The trouble is that sometimes the dongle is wlan0
, and sometimes it is wlan1
(likewise for the inbuilt network card of course): so I never know whether "wlan0
" is the dongle or the inbuilt card. The association wlanX
<-> hardware appears completely random to me.
What is the command line to see, for a specific interface (wlan0
for instance), what hardware it corresponds to?
Alternatively, how to make sure a specific hardware (the dongle say) is always designated by a same interface (wlan0
say)?
Not being able to discriminate between these two hardware is a real problem because my dongle does not support the AP mode for instance.
networking command-line networkmanager hostapd
New contributor
I have an inbuilt network card and a Wi-Fi dongle.
I use wpa_supplicant
, hostapd
and the likes to operate them.
The trouble is that sometimes the dongle is wlan0
, and sometimes it is wlan1
(likewise for the inbuilt network card of course): so I never know whether "wlan0
" is the dongle or the inbuilt card. The association wlanX
<-> hardware appears completely random to me.
What is the command line to see, for a specific interface (wlan0
for instance), what hardware it corresponds to?
Alternatively, how to make sure a specific hardware (the dongle say) is always designated by a same interface (wlan0
say)?
Not being able to discriminate between these two hardware is a real problem because my dongle does not support the AP mode for instance.
networking command-line networkmanager hostapd
networking command-line networkmanager hostapd
New contributor
New contributor
edited Dec 3 at 7:35
G-Man
12.4k92961
12.4k92961
New contributor
asked Dec 3 at 7:16
hartmut
101
101
New contributor
New contributor
This solved it for me (on Raspbian Stretch): raspberrypi.org/forums/viewtopic.php?f=36&t=198946. More tricky that it seems.
– hartmut
Dec 3 at 10:57
add a comment |
This solved it for me (on Raspbian Stretch): raspberrypi.org/forums/viewtopic.php?f=36&t=198946. More tricky that it seems.
– hartmut
Dec 3 at 10:57
This solved it for me (on Raspbian Stretch): raspberrypi.org/forums/viewtopic.php?f=36&t=198946. More tricky that it seems.
– hartmut
Dec 3 at 10:57
This solved it for me (on Raspbian Stretch): raspberrypi.org/forums/viewtopic.php?f=36&t=198946. More tricky that it seems.
– hartmut
Dec 3 at 10:57
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
The device names are "unstable" since the numbers are assigned on boot based on whichever device answers first during enumeration. As you observed, depending on the hardware set-up, this may be random.
You should consider enabling systemd's persistent network interfaces. Alternatively, you can manually configure udev to assign a custom device name via
70-persistent-net.rules
As for configuring the network itself, using netplan may (in case you use Ubuntu 17.04 or newer) applicable, too. The access point's interface is usually either part of a bridge (network level 2) or statically configured (network level 3, client's data needs to be routed). According to the examples, a static configuration with netplan looks like this:
network:
version: 2
renderer: networkd
wifis:
wlp2s0b1:
dhcp4: no
dhcp6: no
addresses: [192.168.1.1/24]
Thanks! Could you explicit the last paragraph please?
– hartmut
Dec 3 at 8:34
@hartmut Yes. I extended the answer. Please note that I did not test this exact configuration myself.
– Hermann
2 days ago
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
The device names are "unstable" since the numbers are assigned on boot based on whichever device answers first during enumeration. As you observed, depending on the hardware set-up, this may be random.
You should consider enabling systemd's persistent network interfaces. Alternatively, you can manually configure udev to assign a custom device name via
70-persistent-net.rules
As for configuring the network itself, using netplan may (in case you use Ubuntu 17.04 or newer) applicable, too. The access point's interface is usually either part of a bridge (network level 2) or statically configured (network level 3, client's data needs to be routed). According to the examples, a static configuration with netplan looks like this:
network:
version: 2
renderer: networkd
wifis:
wlp2s0b1:
dhcp4: no
dhcp6: no
addresses: [192.168.1.1/24]
Thanks! Could you explicit the last paragraph please?
– hartmut
Dec 3 at 8:34
@hartmut Yes. I extended the answer. Please note that I did not test this exact configuration myself.
– Hermann
2 days ago
add a comment |
up vote
1
down vote
The device names are "unstable" since the numbers are assigned on boot based on whichever device answers first during enumeration. As you observed, depending on the hardware set-up, this may be random.
You should consider enabling systemd's persistent network interfaces. Alternatively, you can manually configure udev to assign a custom device name via
70-persistent-net.rules
As for configuring the network itself, using netplan may (in case you use Ubuntu 17.04 or newer) applicable, too. The access point's interface is usually either part of a bridge (network level 2) or statically configured (network level 3, client's data needs to be routed). According to the examples, a static configuration with netplan looks like this:
network:
version: 2
renderer: networkd
wifis:
wlp2s0b1:
dhcp4: no
dhcp6: no
addresses: [192.168.1.1/24]
Thanks! Could you explicit the last paragraph please?
– hartmut
Dec 3 at 8:34
@hartmut Yes. I extended the answer. Please note that I did not test this exact configuration myself.
– Hermann
2 days ago
add a comment |
up vote
1
down vote
up vote
1
down vote
The device names are "unstable" since the numbers are assigned on boot based on whichever device answers first during enumeration. As you observed, depending on the hardware set-up, this may be random.
You should consider enabling systemd's persistent network interfaces. Alternatively, you can manually configure udev to assign a custom device name via
70-persistent-net.rules
As for configuring the network itself, using netplan may (in case you use Ubuntu 17.04 or newer) applicable, too. The access point's interface is usually either part of a bridge (network level 2) or statically configured (network level 3, client's data needs to be routed). According to the examples, a static configuration with netplan looks like this:
network:
version: 2
renderer: networkd
wifis:
wlp2s0b1:
dhcp4: no
dhcp6: no
addresses: [192.168.1.1/24]
The device names are "unstable" since the numbers are assigned on boot based on whichever device answers first during enumeration. As you observed, depending on the hardware set-up, this may be random.
You should consider enabling systemd's persistent network interfaces. Alternatively, you can manually configure udev to assign a custom device name via
70-persistent-net.rules
As for configuring the network itself, using netplan may (in case you use Ubuntu 17.04 or newer) applicable, too. The access point's interface is usually either part of a bridge (network level 2) or statically configured (network level 3, client's data needs to be routed). According to the examples, a static configuration with netplan looks like this:
network:
version: 2
renderer: networkd
wifis:
wlp2s0b1:
dhcp4: no
dhcp6: no
addresses: [192.168.1.1/24]
edited 2 days ago
answered Dec 3 at 7:31
Hermann
598313
598313
Thanks! Could you explicit the last paragraph please?
– hartmut
Dec 3 at 8:34
@hartmut Yes. I extended the answer. Please note that I did not test this exact configuration myself.
– Hermann
2 days ago
add a comment |
Thanks! Could you explicit the last paragraph please?
– hartmut
Dec 3 at 8:34
@hartmut Yes. I extended the answer. Please note that I did not test this exact configuration myself.
– Hermann
2 days ago
Thanks! Could you explicit the last paragraph please?
– hartmut
Dec 3 at 8:34
Thanks! Could you explicit the last paragraph please?
– hartmut
Dec 3 at 8:34
@hartmut Yes. I extended the answer. Please note that I did not test this exact configuration myself.
– Hermann
2 days ago
@hartmut Yes. I extended the answer. Please note that I did not test this exact configuration myself.
– Hermann
2 days ago
add a comment |
hartmut is a new contributor. Be nice, and check out our Code of Conduct.
hartmut is a new contributor. Be nice, and check out our Code of Conduct.
hartmut is a new contributor. Be nice, and check out our Code of Conduct.
hartmut is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f485619%2fhow-to-determine-what-hardware-is-associated-with-what-network-interface%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
This solved it for me (on Raspbian Stretch): raspberrypi.org/forums/viewtopic.php?f=36&t=198946. More tricky that it seems.
– hartmut
Dec 3 at 10:57