3

I have followed the tutorial at https://www.raspberrypi.org/documentation/configuration/wireless/access-point.md and successfuly turned my pi into a standalone wireless access point to control my house's IoT devices.

One device (Philips Hue) can only connect via ethernet as it does not have a WiFi radio. I would like to use the ethernet port on the pi to be able to connect with this device. The tutorial mentions:

If you are providing DHCP services for other network devices (e.g. eth0),
you could add more sections with the appropriate interface header,
with the range of addresses you intend to provide to that interface.

so I updated my dnsmasq.conf file to:

interface=wlan0
    dhcp-range=192.168.0.2,192.168.0.20,255.255.255.0,24h
interface=eth0
    dhcp-range=192.168.0.21,192.168.0.25,255.255.255.0,24h

However upon rebooting, my pi does not assign an IP address to my ethernet connected device. Am I missing a step here?

Thanks!

0

This answer is taken from here, I have not been able to test it but it might be helpful. All the documentation for dnsmasq is available here. You should also specify the listen address for each port as shown in the example below.

You can create multiple configuration files under /etc/dnsmasq.d/, one for each interface you want to serve dhcp.

For instance if you have two wireless interfaces named wlan0 and wlan1, and you want to serve dhcp on them thanks to dnsmasq, you can create two files under /etc/dnsmasq.d/ to configure each interface:

/etc/dnsmasq.d/dnsmasq-wlan0.conf:

interface=wlan0         # Use interface wlan0
listen-address=10.0.0.1 # Explicitly specify the address to listen on
bind-interfaces         # Bind to the interface to make sure we aren't sending things elsewhere
server=8.8.8.8          # Forward DNS requests to Google DNS
domain-needed           # Don't forward short names
bogus-priv              # Never forward addresses in the non-routed address spaces.
dhcp-range=10.0.0.50,10.0.0.150,12h # Assign IP addresses between 10.0.0.50 and 10.0.0.150 with a 12 hour lease time

/etc/dnsmasq.d/dnsmasq-wlan1.conf:

interface=wlan1         # Use interface wlan0
listen-address=20.0.0.1 # Explicitly specify the address to listen on
bind-interfaces         # Bind to the interface to make sure we aren't sending things elsewhere
server=8.8.8.8          # Forward DNS requests to Google DNS
domain-needed           # Don't forward short names
bogus-priv              # Never forward addresses in the non-routed address spaces.
dhcp-range=20.0.0.50,20.0.0.150,12h # Assign IP addresses between 20.0.0.50 and 20.0.0.150 with a 12 hour lease time

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.