10

Our home router is terrible at remembering configured static IPs, I'd like to use my RasPi instead. Is there anything particular I need to consider when setting it up?

  • Please can you include the distro you are using. The answer will vary per distro – Jivings Jun 14 '12 at 13:02
  • @Jivings None yet, what would be a good one to use? – Tom Medley Jun 14 '12 at 13:03
  • Related: unix.stackexchange.com/questions/16754/… – finnw Jun 14 '12 at 13:04
  • 1
    I shall give my answer for Arch Linux and Debian then. – Jivings Jun 14 '12 at 13:04
  • Interesting idea, are you planning to implement internal throttling? – ian.shaun.thomas Jun 14 '12 at 13:24
8

On your Raspberry Pi, all you would need to do is install the dhcp package.

Arch:

sudo pacman -S dhcp

Debian:

apt-get install isc-dhcp-server

You then edit the configuration file at /etc/conf.d/dhcp which tells the dhcp server which interface on which to listen with this line:

DHCP4_ARGS="... eth0"

You then start the server daemon with:

sudo /etc/rc.d/dhcp4 start

Now any clients that broadcast for an IP connected to eth0 will be managed by the dhcp server.

  • Why do I need two network interfaces? I'm not routing traffic through the Pi (we have an all-in-one wireless router/modem, so that's not possible anyway), just using it to assign addresses. – Tom Medley Jun 14 '12 at 13:49
  • @TomMedley Ignore that part then. The rest still applies. – Jivings Jun 14 '12 at 13:55
  • Is this meta answer incorrect when it says that sudo isn't installed on Arch by default? If so, might this answer be a little confusing to newcomers? – Mark Booth Jun 14 '12 at 14:19
  • 1
    @MarkBooth I forgot about that. I think we have to make some assumptions occasionally. Such as that any user who wants to set up a dhcp server already knows what sudo is. If not, they can ask in a comment. – Jivings Jun 14 '12 at 14:21

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.