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?
Asked
Active
Viewed 4,854 times
13
-
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: http://unix.stackexchange.com/questions/16754/how-to-share-the-internet-connection – finnw Jun 14 '12 at 13:04
-
1I 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
-
Only a DHCP server or a gateway as well? – Jun 14 '12 at 13:43
-
@Tibor Only for DHCP. We have a router which is our gateway, but it's DHCP service is effectively broken. – Tom Medley Jun 14 '12 at 13:48
1 Answers
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
-
-
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