1

I have a Raspberry Pi 3 and the on-board WiFi isn't strong enough for my needs. Thus, I have an USB WiFi that is plugged in there. I set its static IP address using wlan1 and I thought that would be the end of it.

Alas, it wasn't. On some boots wlan0 is on-board & wlan1 is off-board, on other boots it's the opposite.

How can I make sure my static IP address is set to my USB WiFi dongle using its MAC Address or some other method besides interface name?

Alternatively: Can I disable the on-board WiFi in a way that it will guarantee that wlan0 will be allocated to my off-board WiFi?

3
  • I could ask how (and why) did you assign static IP address, but that does not seem to be your question. You can write custom udev rules (not a trivial exercise). Googling "predictable network Interface names" will give you a lot about how this is implemented in systemd, although Raspbian does not seem to have implemented this feature (yet).
    – Milliways
    Commented Jun 2, 2017 at 5:32
  • if wlan0 and wlan1 have different mac addresses simply add a dhcp reservation using the mac address of the usb wifi.
    – paj
    Commented Jun 2, 2017 at 18:43
  • I used /etc/network/interfaces. I want a static IP address because it's a huge inconvenience when the IP changes; and yes, it does. I do not have access to the DHCP server, but I'm allowed to use addresses off of its allocation range.
    – Liz
    Commented Jun 3, 2017 at 1:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.