[Kea-users] Hosts reservations config mysql

Marcin Siodelski marcin at isc.org
Mon Apr 11 11:30:13 UTC 2016


Duly noted. We'll update the documentation.

Thanks,
Marcin

On 11.04.2016 13:25, Thomas Andersen wrote:
> Hi Marcin,
>
> Thanks for the answer, it works now. :)
> The subnet id was already correct. It was simply a matter of inserting
> the mac correctly.
>
> A simple example like the one you gave me would be terrific in the
> documentation.
>
> Br,
> Thomas
>
>
>
>
> On 11/04/16 13:03, "Marcin Siodelski" <marcin at isc.org> wrote:
>
> > Hello Thomas,
> >
> > How about this:
> >
> > INSERT INTO hosts(dhcp_identifier, dhcp_identifier_type,
> > dhcp4_subnet_id, dhcp6_subnet_id, ipv4_address, hostname)
> > VALUES (UNHEX("010203040506"), 0, 1, 2, INET_ATON('192.0.2.1'),
> > "super-host.isc.org.");
> >
> >
> > where "010203040506" represents a MAC address by which you want to
> > identify the host.
> >
> > Also, please note that the dhcp4_subnet_id is a DHCPv4 subnet identifier
> > where the host belongs. This identifier can be explicitly assigned to a
> > subnet where the host is connected through the Kea configuration file.
> > If the identifier is not explicitly assigned to the subnet, it will be
> > auto-generated, in which case it may cause the troubles with matching
> > hosts in the database with a database.
> >
> > You may also consult the
> > http://kea.isc.org/docs/kea-guide.html#ipv4-subnet-id
> >
> > Marcin Siodelski
> > ISC
> >
> > On 11.04.2016 11:06, Thomas Andersen wrote:
> >> Hi all,
> >>
> >> I have a bit of a problem with the host reservations in mysql. The
> lease
> >> ‘file’ is already in mysql, so that part do work.
> >>
> >> I can see from the log that is actually do connect to the DB
> >> 2016-04-11 10:59:24.028 INFO  [kea-dhcp4.dhcpsrv/30140]
> >> DHCPSRV_MYSQL_HOST_DB opening MySQL hosts database: host=mysql
> >> name=keadhcp password=***** type=mysql universe=4 user=dhcp
> >>
> >>
> >> I think that the problem is how I insert the dhcp_identifier (mac
> address).
> >>
> >> Can anyone send me an example on how to insert this value correct?
> >>
> >> Br,
> >> Thomas
> >>
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> Kea-users mailing list
> >> Kea-users at lists.isc.org
> >> https://lists.isc.org/mailman/listinfo/kea-users
> >>



More information about the Kea-users mailing list