ddns-update-style interim;
ignore client-updates;
subnet 192.168.4.0 netmask 255.255.255.0 { //第一个作用域,必须是本子网
option routers 192.168.4.1; //指定网关
option subnet-mask 255.255.255.0; //指定子掩码
option domain-name "www.xxxx.cn"; //域名
option domain-name-servers 61.139.2.69,202.98.96.68; //dns服务器
option time-offset -18000;
range dynamic-bootp 192.168.4.10 192.168.4.100; //分配范围
default-lease-time 600000; //默认租期
max-lease-time 604800; //最大租期
host ns
{ //静态分配
hardwareethernet 00:14:22:19:e5:2e;
fixed-address 192.168.4.84;
}
}
subnet 192.168.2.0 netmask 255.255.255.0 {
option routers 192.168.2.1;
option subnet-mask 255.255.255.0;
option domain-name "www.xxxx.cn";
option domain-name-servers 61.139.2.69,202.98.96.68;
option time-offset -18000;
range dynamic-bootp 192.168.2.10 192.168.2.200;
default-lease-time 600000;
max-lease-time 604800;
}
subnet 192.168.3.0 netmask 255.255.255.0 {
option routers 192.168.3.1;
option subnet-mask 255.255.255.0;
option domain-name "www.xxxx.cn";
option domain-name-servers 61.139.2.69,202.98.96.68;
option time-offset -18000;
range dynamic-bootp 192.168.3.10 192.168.3.200;
default-lease-time 600000;
max-lease-time 604800;
}
需在交换机上配置dhcp中继,将dhcp服务器指向服务器ip地址。