...
Save a copy of the original dhcpd.conf file:
Panel |
---|
mv /etc/dhcpd.conf /etc/dhcpd.conf.orig |
Panel |
---|
vi /etc/dhcpd.conf |
No Format |
---|
ddns-update-style none; shared-network vmnet1 { subnet 192.168.0.0 netmask 255.255.0.0 { ignore unknown-clients; option routers 192.168.0.1; host vmguest-1 { option host-name "vmguest-1"; hardware ethernet 00:50:56:1a:01:01; fixed-address 192.168.1.1; filename "/tftpboot/pxelinux.0"; option dhcp-server-identifier 192.168.0.1; next-server 192.168.0.1; } } } |
The DHCP daemon should only listen on the virtual private network (vmnet1) to avoid conflicts with other production VCL networks. Configure the dhcpd service startup script to only listen on the vmnet1 interface:
Panel |
---|
vi /etc/init.d/dhcpd |
No Format |
---|
start() { [ -x $dhcpd ] || return 5 [ -f $conf ] || return 6 pidofproc $prog >/dev/null 2>&1 RETVAL=$? [ $RETVAL -eq 0 ] && return $RETVAL echo -n $"Starting $prog: " daemon $dhcpd vmnet1 $DHCPDARGS 2>/dev/null RETVAL=$? echo [ $RETVAL = 0 ] && touch $lockfile return $RETVAL } |
Configure the dhcpd service to automatically start at runlevels 3-5:
Panel |
---|
/sbin/chkconfig --level 345 dhcpd on |
...