[Kea-users] Subnet + mysql backend

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

[Kea-users] Subnet + mysql backend

Carlos Carluccio

Guys,  

 

I am trying to provision dhcp to have each computer its own subnet/gw/etc . Do I need to add each one on the config file? There is no way I can have all this inside the mysql backend?

 

 

 

Carlos

 


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

Re: [Kea-users] Subnet + mysql backend

Klaus Steden

Hi Carlos,

If I'm understanding your question correctly, yes, you have to keep all this information in the configuration file, it doesn't live in the database.

We had a similar problem in our environment where we allocated separate subnets to each rack, a problem we solved by generating synthetic scope IDs using a checksum of a unique identifier for each DHCP scope, e.g., checksum("VLAN 100 rack 10") generates some unique number, while checksum("VLAN 50 rack 10") generates some other unique number, and then that number is the scope ID for that subnet. We throw this in one of the reserved DHCP options -- clients ignore it, but it allows us to differentiate.

In your case, if you're doing one scope per host, you could use a similar approach on the MAC address and get unique IDs that way; in our case, we used this Python snippet:

return binascii.crc32(name) & 0xffffffff

which forces the results to be a positive number.

HTH,
Klaus

On Fri, Apr 5, 2019 at 6:20 AM Carlos Carluccio <[hidden email]> wrote:

Guys,  

 

I am trying to provision dhcp to have each computer its own subnet/gw/etc . Do I need to add each one on the config file? There is no way I can have all this inside the mysql backend?

 

 

 

Carlos

 

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

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

Re: [Kea-users] Subnet + mysql backend

Carlos Carluccio

Klaus, thanks a lot for the replied. You are 100% correct.

 

This is starting to sound like a lot of crazy work.

 

Any of the dev team at kea knows when we will have this function in the database?

 

Carlos

 

 

From: Klaus Steden <[hidden email]>
Sent: Friday, April 12, 2019 10:00 PM
To: Carlos Carluccio <[hidden email]>
Cc: [hidden email]
Subject: Re: [Kea-users] Subnet + mysql backend

 

*** THIS EMAIL ORIGINATED OUTSIDE THE ORGANIZATION ***

 

Hi Carlos,

 

If I'm understanding your question correctly, yes, you have to keep all this information in the configuration file, it doesn't live in the database.

 

We had a similar problem in our environment where we allocated separate subnets to each rack, a problem we solved by generating synthetic scope IDs using a checksum of a unique identifier for each DHCP scope, e.g., checksum("VLAN 100 rack 10") generates some unique number, while checksum("VLAN 50 rack 10") generates some other unique number, and then that number is the scope ID for that subnet. We throw this in one of the reserved DHCP options -- clients ignore it, but it allows us to differentiate.

 

In your case, if you're doing one scope per host, you could use a similar approach on the MAC address and get unique IDs that way; in our case, we used this Python snippet:

 

return binascii.crc32(name) & 0xffffffff

 

which forces the results to be a positive number.

 

HTH,

Klaus

 

On Fri, Apr 5, 2019 at 6:20 AM Carlos Carluccio <[hidden email]> wrote:

Guys,  

 

I am trying to provision dhcp to have each computer its own subnet/gw/etc . Do I need to add each one on the config file? There is no way I can have all this inside the mysql backend?

 

 

 

Carlos

 

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


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