Difference between configuring DHCP and starting service

1

On http://technet.microsoft.com/en-us/library/ee441263(v=ws.10).aspx, it says to configure and start DHCP on server core, do the following:

  1. At a command prompt, type: sc config dhcpserver start= auto
  2. Start the service by typing: net start dhcpserver

I thought the 1st command starts DHCP server service automatically. If so, then why do we need net start?

Glowie

Posted 2014-08-29T00:28:00.473

Reputation: 127

Answers

3

sc config dhcpserver start= auto configures the DHCP server to automatically start up when you boot the machine. However, it does not start the DHCP server if your computer is already running.

In order to start the DHCP server on an already running machine, you need the second command: net start dhcpserver. Without this second command you would need to reboot the machine before the DHCP server would start.

lzam

Posted 2014-08-29T00:28:00.473

Reputation: 1 364

So the next time I reboot the machine, DHCP server automatically starts and leases addresses (hence, no need for net start dhcpserver at that point) – Glowie – 2014-08-29T13:01:02.883

@Glowie yes. The net start dhcpserver would be unnecessary if you just rebooted the machine after the first command. – lzam – 2014-08-29T15:11:18.520