Pool selection based on Giaddr

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

Pool selection based on Giaddr

Nisha Chandy

 

I am trying to identify how I can match on giaddr the ISC DHCP server and then determine which ip subnet the ISC DHCP server will hand out.

 

client----->layer2-[switch]----->[vrf interent]router[vrf default]-------[isc]dhcp server

 

Here is how I have my config. I keep getting no free leases. My giaddr that the request will come in is 10.80.2.44. Appreciate any help

 

 

option space myagent;

option agent.subscriber-id code 6 = text;

option agent.link-selection code 5 = ip-address;

 

 

shared-network "E451"

{

subnet 10.80.2.44 netmask 255.255.255.252 {

  pool

                                {

                                                deny members of "Vlan451";

                                                range 10.80.2.45;

                                                deny dynamic bootp clients;

                                                                                }

        }

                               

                                subnet X.170.132.0 netmask 255.255.255.0

                                #Vlan451

                {

                               

                                option domain-name-servers                    dns1, dns2;

                                pool

                                {

                                                allow members of "Vlan451";

                                                range X.170.132.2 192.170.132.253;

                                                option subnet-mask                                       255.255.255.0;

                                                option routers                                                   1X.170.132.1;

                                                deny dynamic bootp clients;

                                }

                }

}             

 

 

 

Jun  9 08:59:32 dhcpsvr1 dhcpd: DHCPDISCOVER from 00:06:31:b4:62:a8 via 10.80.2.44: network E451: no free leases

 

 

Any help is really appreciated

 

Thanks & Regards,

Nisha Chandy




CONFIDENTIALITY NOTICE: This email and any attachments are confidential and intended to be reviewed only by the individual or organization named above. Unauthorized review, use, disclosure, or distribution of this email by any other person is prohibited. If you have received this message in error, please delete it from your system immediately and notify our office at once by telephone at 830-367-5333 or 1-800-292-5457. Thank you for your cooperation.

USDA is an equal opportunity provider, employer and lender. To file a complaint of discrimination, write USDA, Director, Office of Civil Rights, 1400 Independence Avenue, S.W., Washington, DC 20250-9410, or call 800-795-3272 (voice) or 202-720-6382 (TDD).

Hill Country Telephone Cooperative, Inc. borrows money from the Rural Utilities Service and is an equal opportunity provider and employer. Please contact us at 830-367-5333 or 800-292-5457 for any questions.

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

RE: Pool selection based on Giaddr

Nisha Chandy

I was able to get this working.

 

By

 

class "Vlan451"

                                {

                                                                                                  match if (binary-to-ascii(10,8, ".", packet(24,4)) ="10.80.2.44");

                               

 

                                               

                                }

 

 

Thanks & Regards,

Nisha Chandy

IP Network Engineer

 

From: Nisha Chandy
Sent: Thursday, June 09, 2016 9:02 AM
To: '[hidden email]' <[hidden email]>
Subject: Pool selection based on Giaddr

 

 

I am trying to identify how I can match on giaddr the ISC DHCP server and then determine which ip subnet the ISC DHCP server will hand out.

 

client----->layer2-[switch]----->[vrf interent]router[vrf default]-------[isc]dhcp server

 

Here is how I have my config. I keep getting no free leases. My giaddr that the request will come in is 10.80.2.44. Appreciate any help

 

 

option space myagent;

option agent.subscriber-id code 6 = text;

option agent.link-selection code 5 = ip-address;

 

 

shared-network "E451"

{

subnet 10.80.2.44 netmask 255.255.255.252 {

  pool

                                {

                                                deny members of "Vlan451";

                                                range 10.80.2.45;

                                                deny dynamic bootp clients;

                                                                                }

        }

                               

                                subnet X.170.132.0 netmask 255.255.255.0

                                #Vlan451

                {

                               

                                option domain-name-servers                    dns1, dns2;

                                pool

                                {

                                                allow members of "Vlan451";

                                                range X.170.132.2 192.170.132.253;

                                                option subnet-mask                                       255.255.255.0;

                                                option routers                                                   1X.170.132.1;

                                                deny dynamic bootp clients;

                                }

                }

}             

 

 

 

Jun  9 08:59:32 dhcpsvr1 dhcpd: DHCPDISCOVER from 00:06:31:b4:62:a8 via 10.80.2.44: network E451: no free leases

 

 

 

Thanks & Regards,

Nisha Chandy




CONFIDENTIALITY NOTICE: This email and any attachments are confidential and intended to be reviewed only by the individual or organization named above. Unauthorized review, use, disclosure, or distribution of this email by any other person is prohibited. If you have received this message in error, please delete it from your system immediately and notify our office at once by telephone at 830-367-5333 or 1-800-292-5457. Thank you for your cooperation.

USDA is an equal opportunity provider, employer and lender. To file a complaint of discrimination, write USDA, Director, Office of Civil Rights, 1400 Independence Avenue, S.W., Washington, DC 20250-9410, or call 800-795-3272 (voice) or 202-720-6382 (TDD).

Hill Country Telephone Cooperative, Inc. borrows money from the Rural Utilities Service and is an equal opportunity provider and employer. Please contact us at 830-367-5333 or 800-292-5457 for any questions.

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

Re: Pool selection based on Giaddr

Simon Hobson
Nisha Chandy <[hidden email]> wrote:

> I was able to get this working.
>  
> By
>  
> class "Vlan451"
>   {
>     match if (binary-to-ascii(10,8, ".", packet(24,4)) ="10.80.2.44");
>   }

You should not need that. This is pretty basic stuff that the server does handle automagically - if set up right.

> shared-network "E451" {
>   subnet 10.80.2.44 netmask 255.255.255.252 {
>     pool {
>       deny members of "Vlan451";
>       range 10.80.2.45;
>       deny dynamic bootp clients;
>     }
>   }
>                                
>   subnet X.170.132.0 netmask 255.255.255.0 {
>   #Vlan451
>     pool
>     {
>       allow members of "Vlan451";
>       range X.170.132.2 192.170.132.253;
>       deny dynamic bootp clients;
>     }
>   }
> }

It might help if you clarified what you are expecting to happen.

> Jun  9 08:59:32 dhcpsvr1 dhcpd: DHCPDISCOVER from 00:06:31:b4:62:a8 via 10.80.2.44: network E451: no free leases

The obvious question here is, are there actually any free leases ?
Did you actually have a class Vlan451 defined ? For example, if class Vlan451 was not defined, then the second pool could never be used (the client can't be a member of a pool if that pool is not defined). And if the address 10.80.2.45 was already leased out then that's not available for leasing.

So, my guess is that you want all clients behind that relay agent to be using the pool 170.132.2-192.170.132.253, and nothing to use the address 10.80.2.45 ? The simple way of doing this is simply to not define the "range 10.80.2.45", leave out all references to Vlan451, and the server will automagically give clients addresses from the 170.132.0 subnet (that's the purpose of the shared network statement).

BTW - is 10.80.2.44 actually the address of an interface ? It's not valid for interface use in the subnet.

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

RE: Pool selection based on Giaddr

glenn.satchell
In reply to this post by Nisha Chandy
Hi Nisha

Your subnet is not specified correctly, or rather your gateway address is
wrong for the subnet.

subnet 10.80.2.44 netmask 255.255.255.252

This network address is 10.80.2.44, broadcast is 10.80.2.47 and the two
usable IPs are 10.80.2.45 and 10.80.2.46.

The giaddr should be 10.80.2.46 if you want the other device to be
10.80.2.45. Then dhcpd will automatically match the incoming request to
the right subnet.

Check with an online subnet calculator such as
http://www.subnet-calculator.com

regards,
-glenn

On Fri, June 10, 2016 12:48 am, Nisha Chandy wrote:

> I was able to get this working.
>
> By
>
> class "Vlan451"
>     {
>        match if (binary-to-ascii(10,8,".",packet(24,4)) ="10.80.2.44");
>         }
>
>
> Thanks & Regards,
> Nisha Chandy
> IP Network Engineer
>
> From: Nisha Chandy
> Sent: Thursday, June 09, 2016 9:02 AM
> To: '[hidden email]' <[hidden email]>
> Subject: Pool selection based on Giaddr
>
>
> I am trying to identify how I can match on giaddr the ISC DHCP server and
> then determine which ip subnet the ISC DHCP server will hand out.
>
> client----->layer2-[switch]----->[vrf interent]router[vrf
> default]-------[isc]dhcp server
>
> Here is how I have my config. I keep getting no free leases. My giaddr
> that the request will come in is 10.80.2.44. Appreciate any help
>
>
> option space myagent;
> option agent.subscriber-id code 6 = text;
> option agent.link-selection code 5 = ip-address;
>
>
> shared-network "E451"
> {
> subnet 10.80.2.44 netmask 255.255.255.252 {
>   pool
>                                 {
>                                                 deny members of "Vlan451";
>                                                 range 10.80.2.45;
>                                                 deny dynamic bootp
> clients;
>                                                                                 }
>         }
>
>                                 subnet X.170.132.0 netmask 255.255.255.0
>                                 #Vlan451
>                 {
>
>                                 option domain-name-servers
>    dns1, dns2;
>                                 pool
>                                 {
>                                                 allow members of
> "Vlan451";
>                                                 range X.170.132.2
> 192.170.132.253;
>                                                 option subnet-mask
>
>    255.255.255.0;
>                                                 option routers
>
>            1X.170.132.1;
>                                                 deny dynamic bootp
> clients;
>                                 }
>                 }
> }
>
>
>
> Jun  9 08:59:32 dhcpsvr1 dhcpd: DHCPDISCOVER from 00:06:31:b4:62:a8 via
> 10.80.2.44: network E451: no free leases
>
>
>
> Thanks & Regards,
> Nisha Chandy
>
> ________________________________
>
> CONFIDENTIALITY NOTICE: This email and any attachments are confidential
> and intended to be reviewed only by the individual or organization named
> above. Unauthorized review, use, disclosure, or distribution of this email
> by any other person is prohibited. If you have received this message in
> error, please delete it from your system immediately and notify our office
> at once by telephone at 830-367-5333 or 1-800-292-5457. Thank you for your
> cooperation.
>
> USDA is an equal opportunity provider, employer and lender. To file a
> complaint of discrimination, write USDA, Director, Office of Civil Rights,
> 1400 Independence Avenue, S.W., Washington, DC 20250-9410, or call
> 800-795-3272 (voice) or 202-720-6382 (TDD).
>
> Hill Country Telephone Cooperative, Inc. borrows money from the Rural
> Utilities Service and is an equal opportunity provider and employer.
> Please contact us at 830-367-5333 or 800-292-5457 for any questions.
> _______________________________________________
> 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