[Kea-users] subnet and DHCP options for MySQL backend

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

[Kea-users] subnet and DHCP options for MySQL backend

xbgmsharp
Hello,

I'm trying to use MySQL as backend for DHCP, but I can't find
documentation for this configuration. I've found how to compile and
import tables ( http://kea.isc.org/docs/kea-guide.html ), but there's no
documentation about how to configure a DHCP server for MySQL backend. I
also setup some host reservation using the following wiki page,
http://kea.isc.org/wiki/HostReservationsHowTo

I found in the mailing list a few samples and configure as below the
lease-database and hosts-database. How do i configure a subnet and DHCP
options for MySQL backend?

In the mysql schema, there is a dhcp4_options and dhcp_option_scope
table.

INFO  [kea-dhcp4.dhcp4/19405] DHCP4_CONFIG_COMPLETE DHCPv4 server has
completed configuration: no IPv4 subnets!; DDNS: disabled
INFO  [kea-dhcp4.dhcpsrv/19405] DHCPSRV_MYSQL_DB opening MySQL lease
database: host=<host> name=<database> password=***** type=mysql
universe=4 user=<user>
INFO  [kea-dhcp4.dhcpsrv/19405] DHCPSRV_MYSQL_HOST_DB opening MySQL
hosts database: host=<host> name=<database> password=***** type=mysql
universe=4 user=<user>

"Dhcp4":
{
   "interfaces-config": {
     "interfaces": [ "eth0" ]
   },

   "lease-database": {
     "type": "mysql",
     "host": "<host>",
     "user": "<user>",
     "password": "<password>",
     "name": "<database>"
   },

   "hosts-database": {
     "type": "mysql",
     "name": "<database>",
     "host": "<host>",
     "user": "<user>",
     "password": "<password>"
   }

}

Thanks
_______________________________________________
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 and DHCP options for MySQL backend

Owen Dunn
On Mon, 26 Feb 2018, xbgmsharp wrote:

> I'm trying to use MySQL as backend for DHCP, but I can't find documentation
> for this configuration. I've found how to compile and import tables (
> http://kea.isc.org/docs/kea-guide.html ), but there's no documentation about
> how to configure a DHCP server for MySQL backend. I also setup some host
> reservation using the following wiki page,
> http://kea.isc.org/wiki/HostReservationsHowTo
>
> I found in the mailing list a few samples and configure as below the
> lease-database and hosts-database. How do i configure a subnet and DHCP
> options for MySQL backend?

You need to put the subnet definitions in your config file.

(I actually generate my config file from a database because I am too lazy
to edit config files by hand.)

Owen
_______________________________________________
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 and DHCP options for MySQL backend

Francis Dupont
In reply to this post by xbgmsharp
A lease database backend is for the whole server. If you have
specific subnet / options setting they go into the configuration
inside subnet entries independently of backends.

Regards

Francis Dupont <[hidden email]>

PS: BTW there must be at least one subnet because incoming packets are
localized (aka subnet selection) with success to get useful services
(cf. subnet[46]_select last statement in the developer guide, i.e.
https://jenkins.isc.org/job/Kea_doc/doxygen/de/df3/dhcpv4Hooks.html
copied here in the case you have no access to it:
If any callout sets the status to SKIP, the server will not select any
subnet. Packet processing will continue, but will be severely limited. )
_______________________________________________
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 and DHCP options for MySQL backend

xbgmsharp
Thanks for the feedback, by using a backend i was expecting to have all
the config in the backend, like isc-dhcp with the LDAP backend.

I have pretty standard configuration, name servers, time server, netbios
server, lease time, etc...

Regards

On 2018-02-26 13:01, Francis Dupont wrote:

> A lease database backend is for the whole server. If you have
> specific subnet / options setting they go into the configuration
> inside subnet entries independently of backends.
>
> Regards
>
> Francis Dupont <[hidden email]>
>
> PS: BTW there must be at least one subnet because incoming packets are
> localized (aka subnet selection) with success to get useful services
> (cf. subnet[46]_select last statement in the developer guide, i.e.
> https://jenkins.isc.org/job/Kea_doc/doxygen/de/df3/dhcpv4Hooks.html
> copied here in the case you have no access to it:
> If any callout sets the status to SKIP, the server will not select any
> subnet. Packet processing will continue, but will be severely limited.
> )
_______________________________________________
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 and DHCP options for MySQL backend

Klaus Steden

Yeah, it's lease/reservation info only. We generate our scopes programmatically and add/remove them using configuration management.

cheers,
Klaus

On Mon, Feb 26, 2018 at 8:38 AM, xbgmsharp <[hidden email]> wrote:
Thanks for the feedback, by using a backend i was expecting to have all the config in the backend, like isc-dhcp with the LDAP backend.

I have pretty standard configuration, name servers, time server, netbios server, lease time, etc...

Regards


On 2018-02-26 13:01, Francis Dupont wrote:
A lease database backend is for the whole server. If you have
specific subnet / options setting they go into the configuration
inside subnet entries independently of backends.

Regards

Francis Dupont <[hidden email]>

PS: BTW there must be at least one subnet because incoming packets are
localized (aka subnet selection) with success to get useful services
(cf. subnet[46]_select last statement in the developer guide, i.e.
https://jenkins.isc.org/job/Kea_doc/doxygen/de/df3/dhcpv4Hooks.html
copied here in the case you have no access to it:
If any callout sets the status to SKIP, the server will not select any
subnet. Packet processing will continue, but will be severely limited. )
_______________________________________________
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