dhcp-server 有 2 个子网问题

dhcp-server 有 2 个子网问题

我怎样才能拥有 2 个子网(net1 和 net2),一个子网允许所有主机,另一个子网仅允许基于 mac 地址选定的主机?

这是我的 dhcpd.conf

ddns-update-style none;
log-facility local7;
not authoritative;


# DNS UPDATE SECURITY 
key DHCP_UPDATER {
    algorithm HMAC-MD5.SIG-ALG.REG.INT;
    secret asdfasdfasdfasdfasdfasdf==;
};
zone mydomain.com. {
    primary 127.0.0.1;
    key DHCP_UPDATER;
}
zone 17.127.10.in-addr.arpa. {
    primary 127.0.0.1;
    key DHCP_UPDATER;
}


# class
class "Net2-fixed-class" {
    match pick-first-value (option dhcp-client-identifier, hardware);
}
    subclass "Net2-fixed-class" 1:00:26:2D:AE:94:F7;
    subclass "Net2-fixed-class" 1:70:F1:A1:6A:70:CC;
    subclass "Net2-fixed-class" 1:00:16:D4:43:44:6C;
    subclass "Net2-fixed-class" 1:00:13:02:e3:fb:45;
    subclass "Net2-fixed-class" 1:00:26:5c:ff:81:da;
    subclass "Net2-fixed-class" 1:00:21:19:98:c5:52; 


# Net1 subnet (Allowed All and deny selected hosts based on mac address)
subnet 10.0.0.0 netmask 255.255.255.192 {
        option routers                  10.0.0.1;
        option subnet-mask              255.255.255.192;
        option broadcast-address        10.0.0.63;
        option domain-name-servers      8.8.8.8,8.8.4.4;
        option domain-name              "net1"; 
        option ntp-servers              10.0.0.1;
        option netbios-name-servers     10.0.0.1;
        option netbios-node-type 2;
        default-lease-time 600;
        max-lease-time 7200;
        pool {
            range 10.0.0.10 10.0.0.62;
        }
}


# Net2 subnet  (only allowed selected hosts based on mac address)
subnet 10.0.1.0 netmask 255.255.255.224 {
    #range              10.0.1.1 10.0.1.30;
    option routers                  10.0.1.1,10.0.1.2;
    option subnet-mask              255.255.255.224;
    option broadcast-address        10.0.1.31;
    option domain-name      "mydomain.com"; 
    option domain-name-servers      10.0.1.1,10.0.1.2;
    option ntp-servers              10.0.1.1,10.0.1.2;
    option netbios-name-servers     10.0.1.1,10.0.1.2;
    option netbios-node-type 2;
    default-lease-time 600;
    max-lease-time 7200;

    deny unknown-clients;

    group { 
        host pc1 {
            hardware ethernet 70:F1:A1:6A:70:CC;
            fixed-address 10.0.1.11;
        }    
        host pc2 {
            hardware ethernet 00:26:2D:AE:94:F7;
            fixed-address 10.0.1.12;
        }    
        host pc3 {
            hardware ethernet 00:16:D4:43:44:6C;
            fixed-address 10.0.1.13;
        }
        host pc4 {
            hardware ethernet 00:13:02:e3:fb:45;
            fixed-address 10.0.1.14;
        }           
        host pc5 {
            hardware ethernet 00:26:5c:ff:81:da;
            fixed-address 10.0.1.15;
        }    
        host pc6 {
            hardware ethernet 00:21:19:98:c5:52;
            fixed-address 10.0.1.16;
        }   
    }
}

此配置工作正常。但是,我一直收到

Jun  5 01:20:27 localhost dhcpd: DHCPDISCOVER from 00:24:9f:92:7e:a6 via eth1: network 10.0.1.0/27: no free leases
Jun  5 01:23:00 localhost dhcpd: DHCPDISCOVER from e0:f8:47:a2:4a:f6 via eth1: network 10.0.1.0/27: no free leases
Jun  5 01:26:07 localhost dhcpd: DHCPDISCOVER from 00:24:9f:92:7e:a6 via eth1: network 10.0.1.0/27: no free leases
Jun  5 01:26:08 localhost dhcpd: DHCPDISCOVER from 00:24:9f:92:7e:a6 via eth1: network 10.0.1.0/27: no free leases
Jun  5 01:38:23 localhost dhcpd: DHCPDISCOVER from 2c:a8:35:22:04:46 via eth1: network 10.0.1.0/27: no free leases
Jun  5 01:51:48 localhost dhcpd: DHCPDISCOVER from 2c:a8:35:22:04:46 via eth1: network 10.0.1.0/27: no free leases

任何帮助将非常感激。

相关内容