Waclaw Chrabaszcz
... there is no spoon ...

How to install and configure DHCP server

Tuesday, January 15, 2013 3:20 PM

Today I needed to create DHCP server ASAP in my LAB. Maybe this code is not so pretty … but it works.

start /w ocsetup DHCPServer
sc config dhcpserver start= auto
net start dhcpserver
netsh dhcp add server %hostname% 192.168.1.100
netsh dhcp server 192.168.1.100 add scope 192.168.1.0 255.255.255.0 Scope1 Scopevlan1
netsh dhcp server 192.168.1.100 scope 192.168.1.0 add iprange 192.168.1.1 192.168.1.254
netsh dhcp server 192.168.1.100 scope 192.168.1.0 add excluderange 192.168.1.100 192.168.1.150
netsh dhcp server 192.168.1.100 scope 192.168.1.0 set optionvalue 003 IPADDRESS 192.168.1.1
netsh dhcp server 192.168.1.100 scope 192.168.1.0 set optionvalue 006 IPADDRESS 192.168.1.100 192.168.1.1
netsh dhcp server 192.168.1.100 scope 192.168.1.0 set state 1




Feedback

# re: How to install and configure DHCP server

plz share with me how to install a DHCP server.
8/3/2013 9:33 AM | Munwar

Post a comment