Basic DHCP Server Setup

From CSLabsWiki
Revision as of 21:40, 4 January 2015 by Beadleha (talk | contribs) (Created page, added content.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

What is this?

This page describes the setup of a basic dhcp server for the 144 subnet to get the lab machines in COSI and the ITL online.

The setup described was used in January 2014 to quickly get the lab back online using CRUX 3.1 as the host system with a single NIC.

Setup

Install a dhcp server. On CRUX, this is:

prt-get depinst dhcp

This will place a startup script in /etc/rc.d/. (At least with sysV) You may want to enable it to run on startup.

We need to set a static IP. Instructions to do this can be found elsewhere. You need to pick one in the 144 subnet if you only have one NIC.

Once you have a static IP, configure the DHCP server by modifying /etc/dhcpd.conf. The example below assumes that the address of the PXE server (if applicable) is 128.153.145.AAA. Pick your IP range carefully. In this example it goes from 128.153.144.150 to 128.153.144.254.

option domain-name-servers 8.8.8.8;
option subnet-mask 255.255.255.0;
option routers 128.153.144.1;
subnet 128.153.144.0 netmask 255.255.255.0 {
	range 128.153.144.150 128.153.144.254;
}
allow booting;
allow bootp;
next-server 128.153.145.AAA;
filename "/pxe/pxelinux.0";

Then, just start dhcpd and it should hopefully work.