isc dhcp 中子网内的类声明

isc dhcp 中子网内的类声明

我想使用基于子网范围的类声明,可以吗?还是所有类都是全局范围的?

这是我的 dhcp.conf 片段:

subnet 10.200.147.0 netmask 255.255.255.224 {
authoritative;
option domain-name-servers     10.200.17.28;
option routers                 10.200.147.1;
option subnet-mask             255.255.255.224;

class "Cisco AP c1240 22nd fl" {
    match if option vendor-class-identifier = "Cisco AP c1240";
    option option-043              f1:0c:0a:c8:d3:46:0a:c3:d3:45:0a:c3:d3:47;
    option vendor-class-identifier "Cisco AP c1240";
    vendor-option-space            Cisco_LWAPP_AP;

}

group {
    option domain-name             "cde.net";

    host ap1.aaa{
        fixed-address                  10.200.147.4;
        hardware ethernet              00:aa:bb:cc:dd:ee;
        option host-name               "ap1.aaa.cde.net";

    }

这也是在同一个文件中:

subnet 10.201.147.0 netmask 255.255.255.224 {
authoritative;
option domain-name-servers     10.201.17.28;
option routers                 10.201.147.1;
option subnet-mask             255.255.255.224;

class "Cisco AP c1240 1gp" {
    match if option vendor-class-identifier = "Cisco AP c1240";
    option option-043              f1:08:0a:c2:d2:04:0a:d0:d1:04;
    option vendor-class-identifier "Cisco AP c1240";
    vendor-option-space            Cisco_LWAPP_AP;

}

group {
    option domain-name             "cde.net";

    host ap1.bbb {
        fixed-address                  10.201.147.4;
        hardware ethernet              00:11:22:33:44:55;
        option host-name               "ap1.bbb.cde.net";

    }

我在日志文件中看到了这一点,这让我认为所有类声明都是全局的:

Dec  7 06:22:20 [email protected] dhcpd: too many classes match 00:aa:bb:cc:dd:ee 

但是我没有在 isc dhcp 文档中看到任何可以证实我的理论的内容。

答案1

所有类都是全局的(当您使用 测试配置是否存在错误时,您会看到一条警告dhcpd -t -cf dhcpd.conf

我不知道这是否重要,因为你option vendor-class-identifier在课堂上也声明了两次。

相关内容