3

I'm attempting to set up a Pi as a DHCP server for a private network of ~10 machines. The pi will be connected to a network switch.

So far I've been following this well written guide:

https://www.raspberrypi.org/learning/networking-lessons/lesson-3/plan/

However, it starts talking about dnsmasq, which doesn't appear in my Raspbian version.

Reading around some other questions, I get the feeling that there was a change in configuration method with the Jessie release.

I have the following in /etc/network/interfaces

#iface eth0 inet dhcp
auto eth0
iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0

What do I need to do, if anything, with dhcpcd.conf?

What is best practice for setting up a DHCP server on a Pi v3B with Raspbian Jessie?

EDIT - in writing this question I realised that I had scrolled past some vital the install dnsmasq pre-requisite. It worked well. I've decided to post anyway to see if there are other viewpoints on this.

  • Why do you want t setup DHCP server? What is wrong with the one in your network switch? Have you disabled dhcpcd? The tutorial tells you to install dnsmasq. – Milliways Feb 24 '17 at 23:03
  • @Milliways the network switch doesn't have one. Also, later, I'll want the pi to run a script in relation to the ip addresses it dishes out. And you're right the answer to my question is to follow the tutorial - however maybe there are some alternatives with advantages (e.g. not requiring prior internet connection) so worth leaving the question here imho. – atomh33ls Feb 25 '17 at 15:10

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.