I am running Buster on a RP3B+. It is configured as a stand-alone wifi access point running dnsmasq. No bridging to the eth0 / Internet. It also has a wired eth0 interface. Everything is working correctly.

I want to allow a user to set a static IP on the eth0. I also want to have a default IP that they can use if the mess up setting their own IP.

Traditionally this has been done with a small switch that resets the device to factory defaults. I don't want to do that.

I want to have a fixed static default IP plus a user set static IP running on eth0.

I understand that I do have the option of allowing a user to connect through the Wifi to set the IP. I will probably do that as well.

There are answers to this question out there but it appears many are out of date. I specifically want a solution that is compatible with Raspbian Buster (released only a few days ago at the time of writing) configured as a simple Access Point with wired ethernet.

I have mentioned the wifi AP setup only because it is not standard and may affect the setup of the eth0 interface. That includes installing dnsmasq. I just want to have 2x static IP addresses assigned to the eth0 interface.


  • This question makes no sense. If you are setting up an AP this normally involves implementing a DHCP server (which requires a fixed ip address). There is nothing to stop users setting a compatible static address (although why they would want to do this eludes me). PS the Raspbian Buster networking is the same as Stretch. – Milliways Jul 10 '19 at 9:48
  • The wlan0 has a single static address. dnsmasq provides dynamic IPs to connected wifi devices. No changes needed to the wlan0 interface. I want to add a 2nd fixed and static IP to eth0. The 1st IP will be user set for eth0 only. Buster networking is probably not the same as Stretch. I have been trying for months to get an AP running on Stretch without success. The same instructions/setup worked first time on Buster. – dazz Jul 10 '19 at 9:56
  • You could go for ethernet over USB : amazon.de/… – clockw0rk Jul 10 '19 at 12:11
  • Traditionally this has been done with software proxy servers, there was never a built-in way to have 2 IPs at once. I believe what you want is to have a shellscript that checks if eth0 is up and has internet connection, and if not, "sudo ifconfig eth0 down" , set up a dynamic ip, and up again. Then would be my question, why have the user decide about his IP in the first place? – clockw0rk Jul 10 '19 at 12:14
  • I don't think the OP wants two addresses at once - he wants DHCP to be able to allocate to the device connected to eth0 either a fixed IP address that he will define at development time, or a dynamic one. Is that the correct interpretation, @dazz? – Mark Smith Jul 11 '19 at 8:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.