I have followed this guide: https://cdn-learn.adafruit.com/downloads/pdf/setting-up-a-raspberry-pi-as-a-wifi-access-point.pdf to create a wireless router on my Raspberry Pi. This works perfectly. I can connect my Raspberry Pi through eth1 to the internet and I can connect to a wireless SSID created by the Raspberry Pi on my phone and access the internet.

Now my Raspberry Pi has two ethernet ports: eth0 and eth1. I need to be able to host a local webpage on my Raspberry Pi at and be able to access it through computers connected via wlan0 and eth0. This therefore requires me to assign IPs to eth0.

So I have attempted the following configuration:

In etc/network/interfaces:

allow-hotplug eth0
allow-hotplug wlan0

iface eth0 inet static

iface wlan0 inet static

In /etc/dhcp/dhcpd.conf:

subnet netmask {
  option broadcast-address;
  option routers;
  default-lease-time 600;
  max-lease-time 7200;
  option domain-name "local";
  option domain-name-servers;

In /etc/default/isc-dhcp-server:

INTERFACESv4="wlan0 eth0"

When I run isc-dhcp-server with this configuration. I am able to get IPs assigned to the device on eth0 and wlan0 however, when I start a web server on the Raspberry Pi, only the device on eth0 is able to access it even when the wlan0 device has an IP in the same subnet.

How to configure the DHCP server so that the Raspberry Pi can assign IPs to devices connected to eth0 and wlan0 at the same time?

Can anyone help me get this to work?

  • expecting anyone to download a pdf to see what you may have done is unrealistic! – Milliways Dec 19 '18 at 4:49
  • That guide is not important. What is important is how to configure the DHCP server so that the Raspberry Pi can assign IPs to devices connected to eth0 and wlan0 at the same time. – jgv115 Dec 19 '18 at 5:22
  • If you think the detail of what you did is unimportant then you don't need help. The rest of us need to know WHAT you did - sure we could ask questions but you should include detail in your question. Including WHY you didn't follow any of the answered questions on this site. – Milliways Dec 19 '18 at 5:28
  • It seems you are using only one ip address for everything: for eth0, eth1, wlan0 and the router. This cannot work because ip addresses seen on a network must be unique. I wonder that something is working at all. Do you want an answer accurate to your question? It cannot be answered because it is not a problem of the DHCP server. Or do you want an answer for a solution? But that will completely differ from your configuration. Please address me with @Ingo, otherwise I won't see your reply. – Ingo Dec 19 '18 at 10:45
  • If you've really set up the Pi as a router, then anything that connects to it as an access point is on a different network just as sure as my computer is on a different network from yours. Changing the IP addresses will not put them on the same network. If you're somehow just forwarding message through the Pi, then that's different. You'd have to tell us what you did though, which goes back to the points by @Milliways. – Brick Dec 21 '18 at 22:32

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.