windows-server-dhcp
create host
netsh> dhcp server add scope <"Scope_description">
dhcp server 192.168.1.1 add scope 192.168.1.0 255.255.255.0 TestScope "This is my test scope"
setting state
If we don’t want to set it as active during creation process, set state value should be 0.
netsh> dhcp server scope set state 1
dhcp server 192.168.1.1 scope 192.168.1.0 set state 0
setting range
netsh> dhcp server scope add iprange
dhcp server 192.168.1.1 scope 192.168.1.0 add iprange 192.168.1.100 192.168.1.149
setting excluderange
netsh> dhcp server scope add excluderange
dhcp server 192.168.1.1 scope 192.168.1.0 add excluderange 192.168.1.130 192.168.1.134
only one
dhcp server 192.168.1.1 scope 192.168.1.0 add excluderange 192.168.1.130 192.168.1.130
setting reservedip (固定ip)
netsh> dhcp server scope add reservedip <"Description_for_reservation">
dhcp server 192.168.1.1 scope 192.168.1.0 add reservedip 192.168.1.125 0003EF159A6B My_PC "" BOTH