# cat dhcpd.conf
option domain-name “bigcloud.local”;#此處設置主機名
option domain-name-servers 192.168.188.11, 192.168.188.12;#此處設置默認DNS
subnet 192.168.188.0 netmask 255.255.255.0 { #此處設置第一個子網
range dynamic-bootp 192.168.188.100 192.168.188.160; #此處設定為不連續的IP段
range dynamic-bootp 192.168.188.169 192.168.188.253;
default-lease-time 259200; #默認租約時間
max-lease-time 259200;
option routers 192.168.188.2; # 默認網關
}
subnet 192.168.189.0 netmask 255.255.255.0 { #第二個子網
range dynamic-bootp 192.168.189.100 192.168.189.253;
default-lease-time 691200;
max-lease-time 691200;
option routers 192.168.189.2;
}
host pc1 { #為某一臺主機單獨配置靜態IP
hardware ethernet 00:12:34:56:78:90;
fixed-address 192.168.188.111;
#啟動服務。
# service dhcpd start
Starting dhcpd: [ OK ]
請問代碼怎么插入的?