- 论坛徽章:
- 13
|
不好意思,上午没看清楚,以为是Windows下面,在Linux下面,其实我也想知道。正好我们有服务,开了CASE问了红帽。
请楼主测试下,记得测试后,更新下结果呀
You can edit /etc/dhcpd.conf file this way to deny specified NIC which is using certain MAC to get IP from this DHCP server:
class "deny-class-1" {
match pick-first-value (option dhcp-client-identifier, hardware);
}
subclass "deny-class-1" 1:00:0C:29:26:1B:28;
subclass "deny-class-1" 1:00:0C:29:32:23:96;
subnet 192.168.100.0 netmask 255.255.255.0 {
pool {
deny members of "deny-class-1";
range 192.168.100.60 192.168.100.70;
}
}
Parameter Description of above configuration:
1) "deny-class-1" == This is a class name and under that subclass is not working which will use the main class name i.e. deny-class-1
2) Then we have specified the MAC address of client machine which we don't want to allocate IP form Pool (From 192.168.100.60 TO 192.168.100.70)
3) Notice 00:0C:29:26:1B:28 is a MAC address and before that we need to specify the 1 number.
4) subclass "deny-class-1" 1:00:0C:29:32:23:96;
In this line we are again specifying the next system's MAC address and this client will also can't get IP from Pool.
5) You can create as many classes as you want
6) You can create as many subclasses as you want
Note:- One needs to specify the pool and MAC address as per the requirement.
|
|