- 论坛徽章:
- 0
|
我的dhcp服务器配置如下:dhcpd.conf文件内容
[root@CrcszProxy root]# more /etc/dhcpd.conf
# 1. Global
default-lease-time 259200; #three days
max-lease-time 518400; #six days
#default-lease-time 21600; #six hours
#max-lease-time 43200; #twelve hours
option domain-name "dhcp.crcsz.com";
option domain-name-servers 192.168.0.143,202.96.134.133,202.96.128.68;
#ddns-update-style interim;
ddns-update-style none;
ignore client-updates;
authoritative;
# 2. Dynamic ip setting
subnet 192.168.0.0 netmask 255.255.255.0 {
# --- default gateway
range dynamic-bootp 192.168.0.50 192.168.0.200;
option broadcast-address 192.168.0.255;
option routers 192.168.0.143;
option subnet-mask 255.255.255.0;
# option nis-domain "domain.org";
# option domain-name "domain.org";
# option domain-name-servers 192.168.1.1;
# option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;
# range dynamic-bootp 192.168.0.128 192.168.0.255;
# default-lease-time 21600;
# max-lease-time 43200;
}
# 3. Static ip setting
# we want the nameserver to appear at a fixed address
host hufuliang {
# next-server marvin.redhat.com;
hardware ethernet 00:14:78:25:11:76;
fixed-address 192.168.0.88;
option broadcast-address 192.168.0.255;
option routers 192.168.0.143;
}
host fazhbhp5550 {
hardware ethernet 00:11:0A:C9:B7:95;
fixed-address 192.168.0.54;
option broadcast-address 192.168.0.255;
option routers 192.168.0.143;
}
host caiwubhp3600 {
hardware ethernet 00:14:38:46:2D:F7;
fixed-address 192.168.0.57;
option broadcast-address 192.168.0.255;
option routers 192.168.0.143;
}
host hotelbhp3600 {
hardware ethernet 00:14:38:46:6A:2D;
fixed-address 192.168.0.73;
option broadcast-address 192.168.0.255;
option routers 192.168.0.143;
}
host hotelbhp1022n {
hardware ethernet 00:12:79 F:C5:43;
fixed-address 192.168.0.103;
option broadcast-address 192.168.0.255;
option routers 192.168.0.143;
}
host hrcenterhp3600 {
hardware ethernet 00:14:38:48:4E:50;
fixed-address 192.168.0.139;
option broadcast-address 192.168.0.255;
option routers 192.168.0.143;
}
分配的地址池是192.168.0.50 192.168.0.200,其中有些电脑我希望每次分配的ip地址相同,故我通过host命令进行设置,如上所述。对ip和mac在dhcp配置文件中进行了绑定。运行正常,近日发现在上面某些固定ip地址电脑(如hufuliang)没有开机的情况下,原本固定分配给他的192.168.0.88地址,被局域网中其他动态获取地址的电脑获得,这种情况正常吗,按照我的理解如果在dhcp的配置文件中通过host对ip和mac进行了设置的话,应该是不管该机器是否在使用这个ip地址,都不应该分配给其他的动态获取地址的客户端呀?
请大家帮我看一下,如果我要实现绑定了就不会分配给其他的电脑,该怎么样修改我的配置文件?
谢谢 |
|