shared subnet declaration behavior between 2 pools

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

shared subnet declaration behavior between 2 pools

project722
Hello. im curious as to how dhcpd determines what pool to pull a lease from in a shared subnet declaration. for ex on our server we have:

shared-network "Market 1" {
        option domain-name "example.com";
                subnet 192.168.1.0 netmask 255.255.255.0 {
                option broadcast-address 192.168.1.255;
                option routers 192.168.1.1;
                pool {
                     
                     
                       failover peer "dhcp-failover";
                       range 192.168.1.10 192.168.1.254;
                     
        }
        subnet 192.168.2.0 netmask 255.255.255.0 {
                option broadcast-address 192.168.2.255;
                option routers 192.168.2.1;
                pool {
                        
                        failover peer "dhcp-failover";
                        range 192.168.2.10 192.168.2.254;
                        
                        
               }
}

I would suspect that the broadcasts that come through these routers/gateways determine the pool that dhcp assigns a lease from. So, if a client requests is seen by the sever comes from 192.168.1.1 it will get a lease out of that pool, and if it sees that the client requests cvomes from 192.168.2.1 it will get a lease from that pool. Is my understanding correct on this? If that is correct, then what happens when the 192.168.1.0 network gets full? Does dhcpd have some type of algo that allows it to assign a lease from the 192.168.2.0 pool in order to prevent an out of leases condition?


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: shared subnet declaration behavior between 2 pools

Bob Harold

On Mon, Oct 9, 2017 at 4:10 PM, project722 <[hidden email]> wrote:
Hello. im curious as to how dhcpd determines what pool to pull a lease from in a shared subnet declaration. for ex on our server we have:

shared-network "Market 1" {
        option domain-name "example.com";
                subnet 192.168.1.0 netmask 255.255.255.0 {
                option broadcast-address 192.168.1.255;
                option routers 192.168.1.1;
                pool {
                     
                     
                       failover peer "dhcp-failover";
                       range 192.168.1.10 192.168.1.254;
                     
        }
        subnet 192.168.2.0 netmask 255.255.255.0 {
                option broadcast-address 192.168.2.255;
                option routers 192.168.2.1;
                pool {
                        
                        failover peer "dhcp-failover";
                        range 192.168.2.10 192.168.2.254;
                        
                        
               }
}

I would suspect that the broadcasts that come through these routers/gateways determine the pool that dhcp assigns a lease from. So, if a client requests is seen by the sever comes from 192.168.1.1 it will get a lease out of that pool, and if it sees that the client requests cvomes from 192.168.2.1 it will get a lease from that pool. Is my understanding correct on this? If that is correct, then what happens when the 192.168.1.0 network gets full? Does dhcpd have some type of algo that allows it to assign a lease from the 192.168.2.0 pool in order to prevent an out of leases condition?


What I have observed is that DHCPD tends to fill the first pool, regardless of which router forwarded the request.  When the first pool, gets full, it starts using the second.  Once all have been used, it reuses the 'oldest' entry (LRU - least recently used).

-- 
Bob Harold
 


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: shared subnet declaration behavior between 2 pools

Simon Hobson
In reply to this post by project722

On 9 Oct 2017, at 21:10, project722 <[hidden email]> wrote:

> Hello. im curious as to how dhcpd determines what pool to pull a lease from in a shared subnet declaration. for ex on our server we have:
>
> shared-network "Market 1" {
>         option domain-name "example.com";
>                 subnet 192.168.1.0 netmask 255.255.255.0 {
>                 option broadcast-address 192.168.1.255;
>                 option routers 192.168.1.1;
>                 pool {
>                      
>                      
>                        failover peer "dhcp-failover";
>                        range 192.168.1.10 192.168.1.254;
>                      
>         }
>         subnet 192.168.2.0 netmask 255.255.255.0 {
>                 option broadcast-address 192.168.2.255;
>                 option routers 192.168.2.1;
>                 pool {
>                        
>                         failover peer "dhcp-failover";
>                         range 192.168.2.10 192.168.2.254;
>                        
>                        
>                }
> }
>
> I would suspect that the broadcasts that come through these routers/gateways determine the pool that dhcp assigns a lease from. So, if a client requests is seen by the sever comes from 192.168.1.1 it will get a lease out of that pool, and if it sees that the client requests cvomes from 192.168.2.1 it will get a lease from that pool. Is my understanding correct on this?

No, you are incorrect.
Basically, when you define a shared network, you are telling the server that all the subnets in it are "equivalent" - it can give any address to any client. Your broadcasts will all come from the same relay address(es) anyway regardless of the client.

In terms of allocation strategy, all the addresses in all the pools are put in a hashed list. When there are "never used before" addresses available then they will be given to new clients in an undocumented (and liable to change without warning) order which is currently top down (ie highest address first). Once there are no such addresses left, then addresses will be allocated in a least recently used order.
Basically, it is indeterminate which clients end up in which subnet.

If that isn't what you want, then you need to start using allow/deny rules to manage it. It may be as simple as defining hosts and using allow/deny known/unknown hosts, or you could use classes to allocate clients to pools.

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

RE: shared subnet declaration behavior between 2 pools

Patrick Trapp
In reply to this post by project722

All things being equal, I don’t know how it handles this. In our network, each pool in the shared network is assigned based on class matching (or not matching). In our case, each class matches a different type of device which gets a different configuration in addition to receiving an address from a different pool.

 

I’m not sure, looking at your configuration here, why you need a shared network. What are you trying to accomplish?

 

In our case, we have multiple networks that are all reaching the DHCP server via a particular network. In order for ISC DHCP to accept a request from network Z when the request came through network X, we define shared networks so that the server accepts the request as valid. Otherwise, it rejects the request. You don’t seem to have that type of scenario in your example.

 

What problem are you trying to fix with a shared network?

 

From: dhcp-users [mailto:[hidden email]] On Behalf Of project722
Sent: Monday, October 9, 2017 3:10 PM
To: Users of ISC DHCP <[hidden email]>
Subject: shared subnet declaration behavior between 2 pools

 

Hello. im curious as to how dhcpd determines what pool to pull a lease from in a shared subnet declaration. for ex on our server we have:

 

shared-network "Market 1" {

        option domain-name "example.com";

                subnet 192.168.1.0 netmask 255.255.255.0 {

                option broadcast-address 192.168.1.255;

                option routers 192.168.1.1;

                pool {

                     

                     

                       failover peer "dhcp-failover";

                       range 192.168.1.10 192.168.1.254;

                     

        }

        subnet 192.168.2.0 netmask 255.255.255.0 {

                option broadcast-address 192.168.2.255;

                option routers 192.168.2.1;

                pool {

                        

                        failover peer "dhcp-failover";

                        range 192.168.2.10 192.168.2.254;

                        

                        

               }

}

 

I would suspect that the broadcasts that come through these routers/gateways determine the pool that dhcp assigns a lease from. So, if a client requests is seen by the sever comes from 192.168.1.1 it will get a lease out of that pool, and if it sees that the client requests cvomes from 192.168.2.1 it will get a lease from that pool. Is my understanding correct on this? If that is correct, then what happens when the 192.168.1.0 network gets full? Does dhcpd have some type of algo that allows it to assign a lease from the 192.168.2.0 pool in order to prevent an out of leases condition?

 


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: shared subnet declaration behavior between 2 pools

project722
Thanks all. I'm just trying to figure out if the "shared network" option will automatically use our second pool when the first one gets full. But, I think Bob has answered that question. If what he is saying is correct, then my question is answered. 

On Mon, Oct 9, 2017 at 3:36 PM, Patrick Trapp <[hidden email]> wrote:

All things being equal, I don’t know how it handles this. In our network, each pool in the shared network is assigned based on class matching (or not matching). In our case, each class matches a different type of device which gets a different configuration in addition to receiving an address from a different pool.

 

I’m not sure, looking at your configuration here, why you need a shared network. What are you trying to accomplish?

 

In our case, we have multiple networks that are all reaching the DHCP server via a particular network. In order for ISC DHCP to accept a request from network Z when the request came through network X, we define shared networks so that the server accepts the request as valid. Otherwise, it rejects the request. You don’t seem to have that type of scenario in your example.

 

What problem are you trying to fix with a shared network?

 

From: dhcp-users [mailto:[hidden email]] On Behalf Of project722
Sent: Monday, October 9, 2017 3:10 PM
To: Users of ISC DHCP <[hidden email]>
Subject: shared subnet declaration behavior between 2 pools

 

Hello. im curious as to how dhcpd determines what pool to pull a lease from in a shared subnet declaration. for ex on our server we have:

 

shared-network "Market 1" {

        option domain-name "example.com";

                subnet 192.168.1.0 netmask 255.255.255.0 {

                option broadcast-address 192.168.1.255;

                option routers 192.168.1.1;

                pool {

                     

                     

                       failover peer "dhcp-failover";

                       range 192.168.1.10 192.168.1.254;

                     

        }

        subnet 192.168.2.0 netmask 255.255.255.0 {

                option broadcast-address 192.168.2.255;

                option routers 192.168.2.1;

                pool {

                        

                        failover peer "dhcp-failover";

                        range 192.168.2.10 192.168.2.254;

                        

                        

               }

}

 

I would suspect that the broadcasts that come through these routers/gateways determine the pool that dhcp assigns a lease from. So, if a client requests is seen by the sever comes from 192.168.1.1 it will get a lease out of that pool, and if it sees that the client requests cvomes from 192.168.2.1 it will get a lease from that pool. Is my understanding correct on this? If that is correct, then what happens when the 192.168.1.0 network gets full? Does dhcpd have some type of algo that allows it to assign a lease from the 192.168.2.0 pool in order to prevent an out of leases condition?

 


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: shared subnet declaration behavior between 2 pools

project722
Thanks Simon, that was very helpful!!

On Mon, Oct 9, 2017 at 3:49 PM, project722 <[hidden email]> wrote:
Thanks all. I'm just trying to figure out if the "shared network" option will automatically use our second pool when the first one gets full. But, I think Bob has answered that question. If what he is saying is correct, then my question is answered. 

On Mon, Oct 9, 2017 at 3:36 PM, Patrick Trapp <[hidden email]> wrote:

All things being equal, I don’t know how it handles this. In our network, each pool in the shared network is assigned based on class matching (or not matching). In our case, each class matches a different type of device which gets a different configuration in addition to receiving an address from a different pool.

 

I’m not sure, looking at your configuration here, why you need a shared network. What are you trying to accomplish?

 

In our case, we have multiple networks that are all reaching the DHCP server via a particular network. In order for ISC DHCP to accept a request from network Z when the request came through network X, we define shared networks so that the server accepts the request as valid. Otherwise, it rejects the request. You don’t seem to have that type of scenario in your example.

 

What problem are you trying to fix with a shared network?

 

From: dhcp-users [mailto:[hidden email]] On Behalf Of project722
Sent: Monday, October 9, 2017 3:10 PM
To: Users of ISC DHCP <[hidden email]>
Subject: shared subnet declaration behavior between 2 pools

 

Hello. im curious as to how dhcpd determines what pool to pull a lease from in a shared subnet declaration. for ex on our server we have:

 

shared-network "Market 1" {

        option domain-name "example.com";

                subnet 192.168.1.0 netmask 255.255.255.0 {

                option broadcast-address 192.168.1.255;

                option routers 192.168.1.1;

                pool {

                     

                     

                       failover peer "dhcp-failover";

                       range 192.168.1.10 192.168.1.254;

                     

        }

        subnet 192.168.2.0 netmask 255.255.255.0 {

                option broadcast-address 192.168.2.255;

                option routers 192.168.2.1;

                pool {

                        

                        failover peer "dhcp-failover";

                        range 192.168.2.10 192.168.2.254;

                        

                        

               }

}

 

I would suspect that the broadcasts that come through these routers/gateways determine the pool that dhcp assigns a lease from. So, if a client requests is seen by the sever comes from 192.168.1.1 it will get a lease out of that pool, and if it sees that the client requests cvomes from 192.168.2.1 it will get a lease from that pool. Is my understanding correct on this? If that is correct, then what happens when the 192.168.1.0 network gets full? Does dhcpd have some type of algo that allows it to assign a lease from the 192.168.2.0 pool in order to prevent an out of leases condition?

 


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users



_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users