1. 在/etc/dhcpd.conf 全局变量中,使用 include 参数。 好处是,逻辑清晰,且后续新增删除动作,不会影响到主配置文件:
include "/etc/dhcpd.conf.specific";
2. 新增配置文件 /etc/dhcpd.conf.specific
class "specific" {
match if (
# 可用作限定非法电脑名主机使用网络
(substring (option host-name,0,10) = "cmm-saxp01") or
# 可用作限制Android 类智能手机使用无线网络
(substring (option vendor-class-identifier,0,6)="dhcpcd") or
# 可用作限定指定MAC地址类别设备使用网络
(substring (hardware,1,6) = "00:0C:29:09:1A:F3")
);
}
注意 or 参数的使用。
3. 在具体的subnet中,增加pool参数,并设定拒绝或允许:
subnet 192.168.33.0 netmask 255.255.255.0 {
pool {
deny members of "specific";
#allow members of "specific";
range 192.168.33.2 192.168.33.127;
}
}
ISC DHCP and option 82 - The Relay Agent Information Option aka Option82http://www.miquels.cistron.nl/isc-dhcpd/
for more ISC dhcpd options, use "man dhcp-options"
or this url: http://www.linuxmanpages.com/man5/dhcp-options.5.php
http://systemnetworksecurity.blogspot.sg/2013/02/adding-custom-options-in-isc-dhcpds.html
评论