Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
James' HOWTO: DHCP Server
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2015-04-14
02:13 PM
2015-04-14
02:13 PM
James' HOWTO: DHCP Server
Now that I'm the proud owner of an RN204, I thought I'd add a few guides on how to accomplish various useful features.
This guide assumes:
So... DHCP server. (Seems that others didn't get this to work, but its relatively straight-forward).
1. Install isc-dhcp-server package.
2. Configure DHCP server (/etc/dhcp/dhcpd.conf)
3. Setup a systemd service file... (/lib/systemd/system/isc-dhcp-server.service)
Most systemd files would use:
But I couldn't get this to work (i.e. no network connections would be found and then the daemon wouldn't work).
I figured waiting on readynasd would be a good bet as that requires pretty much everything else to be ready.
If anyone has more information about systemd or how to do this properly it would be appreciated.
4. Enable the systemd service with systemctl
5. Start/Stop/Status
Your new fully fledged dhcp server should now be running. It will also start on reboot.
Coming soon:
Hope I got everything right there, please let me know if you see any mistakes.
James
This guide assumes:
1. You can login as root via SSH.
2. You have an OS6 device.
So... DHCP server. (Seems that others didn't get this to work, but its relatively straight-forward).
1. Install isc-dhcp-server package.
apt-get install isc-dhcp-server
2. Configure DHCP server (/etc/dhcp/dhcpd.conf)
vi /etc/dhcp/dhcpd.conf
option domain-name "local";
allow-unknown-clients;
option domain-name-servers 10.0.0.2;
default-lease-time 86400;
max-lease-time 60480[code][/code]0;
authoritative;
subnet 10.0.0.0 netmask 255.255.255.0 {
range 10.0.0.100 10.0.0.239;
option subnet-mask 255.255.255.0;
option routers 10.0.0.1;
option domain-name-servers 10.0.0.2;
option domain-name "local";
}
3. Setup a systemd service file... (/lib/systemd/system/isc-dhcp-server.service)
vi /lib/systemd/system/isc-dhcp-server.service
[Unit]
Description = DHCP server
After=readynasd.service
[Service]
ExecStart = /usr/sbin/dhcpd -q -d --no-pid -cf /etc/dhcp/dhcpd.conf
[Install]
WantedBy = multi-user.target
Most systemd files would use:
After=network.target
But I couldn't get this to work (i.e. no network connections would be found and then the daemon wouldn't work).
I figured waiting on readynasd would be a good bet as that requires pretty much everything else to be ready.
If anyone has more information about systemd or how to do this properly it would be appreciated.
4. Enable the systemd service with systemctl
systemctl enable isc-dhcp-server
5. Start/Stop/Status
systemctl start isc-dhcp-server
systemctl stop isc-dhcp-server
systemctl status isc-dhcp-server
Your new fully fledged dhcp server should now be running. It will also start on reboot.
Coming soon:
* Local dns server (caching) with DHCP hostname updating.
* OneDrive syncing.
* Much much more...
Hope I got everything right there, please let me know if you see any mistakes.
James
Message 1 of 1
Labels: