dhcpd.conf logical hierachy

Narcis Garcia informatica at actiu.net
Wed Oct 18 17:21:15 UTC 2017


Better now?

shared-network MyMap_interface1 {
        subnet 172.16.0.0 netmask 255.255.0.0 {
                option routers 172.16.20.100;
                option broadcast-address 172.16.255.255;
                option domain-name-servers 172.16.21.61;
                pool {
                        # IP range to be assigned dynamically
                        range 172.16.20.150 172.16.20.189;
                }
                pool {
                        # IP ranges to be assigned statically
                        range 172.16.20.0 172.16.20.149;
                        range 172.16.20.190 172.16.20.255;
                        deny unknown-clients;
                        host printer_1 {
                                hardware ethernet 00:11:22:33:44:55;
                                fixed-address 172.16.20.201;
                        }
                }
        }
}


Remember: My goal is to use dynamic and static specifications in same
subnet, and also avoid this error message:
Dynamic and static leases present for 172.16.20.201
Remove host declaration printer_1 or remove 172.16.20.201



El 18/10/17 a les 17:59, Bruce Hudson ha escrit:
> On Wed, Oct 18, 2017 at 05:43:04PM +0200, Narcis Garcia wrote:
> 
>> As I've understood for my poor english, [subnet] declaration has no much
>> sense because both subnet and netmask are determined by incoming
>> interface's data.
> 
>     If I understand you correctly, you are wrong. What you suggest is true
> only if the incoming requests were not relayed. If they have been forwarded
> by a relay, it is the gateway IP address in the packet that determines what
> subnet an IP address should be assigned from.
> 
>     Even if there is no relay, it is possible to have multiple subnets share
> a single broadcast domain; specified in the DHCP configuration by putting
> the subnet declarations into a "shared-network" container. 
> 
>     In short, you need to be able to write declarations for multiple subnets.
> 


More information about the dhcp-users mailing list