13

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?

berry120
  • 10,924
  • 10
  • 51
  • 62
Tom Medley
  • 4,089
  • 8
  • 31
  • 46

1 Answers1

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.

Jivings
  • 22,538
  • 11
  • 90
  • 139
  • 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