Send dhcp-users mailing list submissions to
        dhcp-users@lists.isc.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.isc.org/mailman/listinfo/dhcp-users
or, via email, send a message with subject or body 'help' to
        dhcp-users-requ...@lists.isc.org

You can reach the person managing the list at
        dhcp-users-ow...@lists.isc.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of dhcp-users digest..."


Today's Topics:

   1. Re: dhcpd.conf logical hierachy (Narcis Garcia)
   2. Re: dhcpd.conf logical hierachy (Narcis Garcia)
   3. Re: dhcpd.conf logical hierachy (Bill Shirley)
   4. Re: dhcpd.conf logical hierachy (Bruce Hudson)
   5. Re: dhcpd.conf logical hierachy (Narcis Garcia)
   6. Re: dhcpd.conf logical hierachy (Bill Shirley)


----------------------------------------------------------------------

Message: 1
Date: Wed, 18 Oct 2017 17:43:04 +0200
From: Narcis Garcia <informat...@actiu.net>
To: dhcp-users@lists.isc.org
Subject: Re: dhcpd.conf logical hierachy
Message-ID: <76e4b403-4838-1cfc-2c6a-cdc48e0bd...@actiu.net>
Content-Type: text/plain; charset=utf-8

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.

Then I suppose this specification structure with a group should be better:

authoritative;
server-name "director.example.net";
group MyInterface1 {
        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 dinamically
                range 172.16.20.150 172.16.20.189;
                allow unknown-clients;
        }
        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;
                }
        }
}



El 16/10/17 a les 10:35, Simon Hobson ha escrit:
> Narcis Garcia <informat...@actiu.net> wrote:
> 
>> Do you mean the [group] outside of [subnet] inherits parameters from
>> previous clauses?
> 
> No
> The config file isn't parsed "top to bottom" in terms of how things are 
> evaluated when a request comes in from a client, or put another way, the 
> order of sections within the file isn't important.
> 
> The inheritance is based on scopes. So taking your specific example, 
> printer_1 does a DHCP Discover and the server does two things :
> It uses the incoming interface (directly connected clients) or Gateway 
> Interface Address (if coming via a relay) to identify the subnet (or shared 
> network) to which the client is connected.
> It evaluates classes and host declarations to see if it matches - in this 
> case it will match a host declaration with a fixed address.
> 
> As the fixed address is valid for the subnet to which the client is connected 
> (assuming it's plugged into the right network) then the address will be 
> assigned, the client will be "put into" that subnet, and all the subnet (and 
> possibly shared network) options will be applied. Then any group and host 
> declaration options will be applied.
> 
> If you were to plug the printer into a different network (subnet) served by 
> the same server, then the fixed address assignment would be ignored (not 
> valid for the subnet) but other options declared in the host declaration and 
> group would still be applied and over-ride the subnet/shared network/global 
> options.
> 
> 
> I would recommend that you find a copy of "The DHCP Handbook" by Ralph Droms 
> and Ted Lemon which is more or less the definitive guide to how DHCP works - 
> and specifically the ISC server. It's in it's second edition, but that only 
> really adds the failover stuff so the original version will cover what you 
> need.
> 
> 
>> Anyway, is this a valid (or best) setup to split dynamic and static
>> definitions for same subnet?
> 
> Yes. You can mix and match dynamic pools and fixed addresses as much as you 
> want as long as there is no overlap. As I showed earlier, if you want a fixed 
> address in the middle of a range then you just have to split the range to 
> omit that address from it - you can have multiple ranges in a pool.
> _______________________________________________
> dhcp-users mailing list
> dhcp-users@lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
> 


------------------------------

Message: 2
Date: Wed, 18 Oct 2017 19:21:15 +0200
From: Narcis Garcia <informat...@actiu.net>
To: dhcp-users@lists.isc.org
Subject: Re: dhcpd.conf logical hierachy
Message-ID: <4525e20d-8715-7fa6-a6f0-bc6dcc47c...@actiu.net>
Content-Type: text/plain; charset=utf-8

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.
> 


------------------------------

Message: 3
Date: Wed, 18 Oct 2017 14:05:10 -0400
From: Bill Shirley <b...@c3po.polymerindustries.biz>
To: dhcp-users@lists.isc.org
Subject: Re: dhcpd.conf logical hierachy
Message-ID:
        <21085775-dc01-7d4c-fc24-699876dbb...@c3po.polymerindustries.biz>
Content-Type: text/plain; charset="utf-8"; Format="flowed"

Do not define static address in a pool and define your hosts outside
your subnet:

authoritative; use-host-decl-names on; server-name "equilibri.cpu.actiu.net"; 
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; option ntp-servers 
172.16.20.100; pool { # IP range to be assigned dinamically range 172.16.20.150 
172.16.20.189; allow unknown-clients; } } group 
MyReservations { ??? host printer_1 {? # Impressora ??? ??? hardware ethernet 
**:**:**:**:**:**; ??? ??? fixed-address 
172.16.20.201; ??? ??? option host-name "printer_1"; ??? } }

Your group statement above is not needed, it doesn't add
any configuration.

However...

group MyReservations { default-lease-time 21600; # 6 hours ??? host printer_1 
{? # Impressora ??? ??? hardware ethernet 
**:**:**:**:**:**; ??? ??? fixed-address 172.16.20.201; ??? ??? option 
host-name "printer_1"; ??? } ??? host printer_2 {? # 
Impressora ??? ??? hardware ethernet **:**:**:**:**:*2; ??? ??? fixed-address 
172.16.20.202; ??? ??? option host-name 
"printer_2"; ??? } }

This will give out a different default lease time for every device in the group.

Bill


On 10/14/2017 12:00 PM, Narcis Garcia wrote:
> In a Debian 9 host, I receive warnings like:
> Dynamic and static leases present for 172.16.20.201.
> Remove host declaration printer_1 or remove 172.16.20.201
> from the dynamic address pool for 172.16.0.0/16
>
> I'm trying to combine static reservations with dynamic assignment in
> same subnet:
>
> authoritative;
> use-host-decl-names on;
> server-name "equilibri.cpu.actiu.net";
> 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;
>          option ntp-servers 172.16.20.100;
>          pool {
>                  # IP range to be assigned dinamically
>                  range 172.16.20.150 172.16.20.189;
>                  allow unknown-clients;
>          }
>          pool {
>                  # IP range 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;
> #                deny all clients;
>                  group MyReservations {
>                          host printer_1 {  # Impressora
>                                  hardware ethernet **:**:**:**:**:**;
>                                  fixed-address 172.16.20.201;
>                                  option host-name "printer_1";
>                          }
>                  }
>          }
> }
>
> But I've not clear if "group" and "host" work inside "pool", or what
> else is the problem.
> _______________________________________________
> dhcp-users mailing list
> dhcp-users@lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<https://lists.isc.org/pipermail/dhcp-users/attachments/20171018/ef7a8c77/attachment-0001.html>

------------------------------

Message: 4
Date: Wed, 18 Oct 2017 15:37:23 -0300
From: Bruce Hudson <bruce.hud...@dal.ca>
To: Users of ISC DHCP <dhcp-users@lists.isc.org>
Subject: Re: dhcpd.conf logical hierachy
Message-ID: <20171018183722.ga6...@kil-bah-1.its.dal.ca>
Content-Type: text/plain; charset=us-ascii

On Wed, Oct 18, 2017 at 07:21:15PM +0200, Narcis Garcia wrote:

> 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

     The "shared-network" adds nothing with only one subnet but hurts
nothing. There is no problem with static and dynamic in the same subnet.
The issue is including the static IP addresses in your range statement.
To avoid the error, just do two (or three) range statements.

                > pool {
                >    range 172.16.20.190 172.16.20.200;
                >    range 172.16.20.202 172.16.20.255;
                >    ...
                > }

    Then put the host statements at the global scope level so they so not
accidentally inherit when they shouldn't.
-- 
Bruce A. Hudson                         | bruce.hud...@dal.ca
ITS, Networks and Systems               |
Dalhousie University                    |
Halifax, Nova Scotia, Canada            | (902) 494-3405


------------------------------

Message: 5
Date: Wed, 18 Oct 2017 21:19:28 +0200
From: Narcis Garcia <informat...@actiu.net>
To: dhcp-users@lists.isc.org
Subject: Re: dhcpd.conf logical hierachy
Message-ID: <d8fd20a3-944e-b8e4-a29d-8ee3ccd3c...@actiu.net>
Content-Type: text/plain; charset=utf-8

Any way I define the static pool, error messages occur.
This is the only configuration I've reached without errors when a known
host connects, but I might not be defining subnet/interface where static
cases are attached to:

subnet 172.16.0.0 netmask 255.255.0.0 {
        option subnet-mask 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;
                allow unknown-clients;
        }
}
group MyReservations {
        option subnet-mask 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;
        host printer_1 {
                hardware ethernet 00:11:22:33:44:55;
                fixed-address 172.16.20.201;
        }
}


El 18/10/17 a les 20:37, Bruce Hudson ha escrit:
> On Wed, Oct 18, 2017 at 07:21:15PM +0200, Narcis Garcia wrote:
> 
>> 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
> 
>      The "shared-network" adds nothing with only one subnet but hurts
> nothing. There is no problem with static and dynamic in the same subnet.
> The issue is including the static IP addresses in your range statement.
> To avoid the error, just do two (or three) range statements.
> 
>               > pool {
>               >    range 172.16.20.190 172.16.20.200;
>               >    range 172.16.20.202 172.16.20.255;
>               >    ...
>               > }
> 
>     Then put the host statements at the global scope level so they so not
> accidentally inherit when they shouldn't.
> 


------------------------------

Message: 6
Date: Wed, 18 Oct 2017 15:30:41 -0400
From: Bill Shirley <b...@c3po.polymerindustries.biz>
To: dhcp-users@lists.isc.org
Subject: Re: dhcpd.conf logical hierachy
Message-ID:
        <fc2bbeb6-9692-b8bf-59ca-caf577f7b...@c3po.polymerindustries.biz>
Content-Type: text/plain; charset=utf-8; format=flowed

You do not need subnet-mask, router, broadcast-address, or domain-name-servers
in the group unless they override an option.? They will be supplied by the 
subnet.
Defining them in the group clause doesn't "hurt" anything though.

Bill

On 10/18/2017 3:19 PM, Narcis Garcia wrote:
> Any way I define the static pool, error messages occur.
> This is the only configuration I've reached without errors when a known
> host connects, but I might not be defining subnet/interface where static
> cases are attached to:
>
> subnet 172.16.0.0 netmask 255.255.0.0 {
>          option subnet-mask 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;
>                  allow unknown-clients;
>          }
> }
> group MyReservations {
>          option subnet-mask 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;
>          host printer_1 {
>                  hardware ethernet 00:11:22:33:44:55;
>                  fixed-address 172.16.20.201;
>          }
> }
>
>
> El 18/10/17 a les 20:37, Bruce Hudson ha escrit:
>> On Wed, Oct 18, 2017 at 07:21:15PM +0200, Narcis Garcia wrote:
>>
>>> 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
>>       The "shared-network" adds nothing with only one subnet but hurts
>> nothing. There is no problem with static and dynamic in the same subnet.
>> The issue is including the static IP addresses in your range statement.
>> To avoid the error, just do two (or three) range statements.
>>
>>              > pool {
>>              >    range 172.16.20.190 172.16.20.200;
>>              >    range 172.16.20.202 172.16.20.255;
>>              >    ...
>>              > }
>>
>>      Then put the host statements at the global scope level so they so not
>> accidentally inherit when they shouldn't.
>>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users@lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users



------------------------------

Subject: Digest Footer

_______________________________________________
dhcp-users mailing list
dhcp-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/dhcp-users

------------------------------

End of dhcp-users Digest, Vol 108, Issue 9
******************************************

Reply via email to