subnet 192.168.0.0 netmask 255.255.255.0{
range 192.168.0.10 192.168.0.100;
}
说明:
缺省每个IP租期2天: default-lease-time 120000;
最长租期: max-lease-time 920000;
缺省子网掩码:option subnet-mask 255.255.255.0;
缺省广播地址:option broadcast-address 192.168.0.255;
让192.168.0.200上的samba服务启用WINS服务:用于内部域名解析:option netbios-name-servers 192.168.0.200;
缺省网关 option routers 192.168.0.1;
缺省域名服务器 option domain-name-servers 202.106.196.115,202.96.199.133;
缺省域名 option domain-name "example.com";
#一个缺省的子网设置:
subnet 192.168.0.0 netmask 255.255.255.0{
#为子网动态分配0.10-100的IP
range 192.168.0.10 192.168.0.100;
}
辅DHCP服务器上唯一不同的地方是:为子网动态分配0.110-150的IP,主DHCP和附DHCP服务器的IP池不能相互重叠
subnet 192.168.0.0 netmask 255.255.255.0{
range 192.168.0.110 192.168.0.150;
}
3、主服务器上的应用安装
SAMBA服务:用于文件的共享和内部WINS解析,这里只做一个只读共享的简单配置:
[global]
#别人会通过"网上邻居"看到WORKGROUP组里的
Linux机器,注释是:My Samba Server
workgroup = WORKGROUP
netbios name = Linux
server string = My Samba Server
#日志设置
log file = /var/log/samba/%m.log
max log size = 50
#安全设置
security = share
#用SAMBA的WINS服务支持,并且用/etc/hosts做内部域名解析
wins support = yes
name resolve order = hosts lmhosts wins bcast
dns proxy = yes
[public]
#一个共享设置
comment = Public Stuff
path = /home/share
public = yes
guest ok = yes
read only = yes
writable = no
printable = no
……