[Kea-users] kea-dhcp4 mysql lease - how to interpret it!
Steve Teusch
steve.teusch at rtr.guru
Wed Sep 13 11:19:59 UTC 2017
A view may also be helpful:
CREATE VIEW active_lease_v4 AS
select INET_NTOA(address) addr, subnet_id, HEX(hwaddr) hwaddr, expire, hostname from lease4;
Then just :
select * from active_lease_v4;
-----Original Message-----
From: Kea-users [mailto:kea-users-bounces at lists.isc.org] On Behalf Of Evgeny Petrenko
Sent: Wednesday, September 13, 2017 9:05 AM
To: Neil Briscoe <neil.briscoe at 6point6.co.uk>
Cc: Kea-users at lists.isc.org
Subject: Re: [Kea-users] kea-dhcp4 mysql lease - how to interpret it!
Hi Neil,
Pls use next query:
select inet_ntoa(address), hex(hwaddr) to convert values in mysql into human-friendly representation.
On Wed, Sep 13, 2017 at 1:16 AM, Neil Briscoe <neil.briscoe at 6point6.co.uk> wrote:
> Kea-1.0.0 on Ubuntu 16
>
> MySQL (schema 5.0)
>
>
>
> Currently running kea and the leases are working fine – handing out IP
> address as expected.
>
>
>
> When I look in the MySQL DB for the leases, I can see that the lease4
> table is being populated.
>
>
>
> However, the address column isn’t an IP address (as I would expect)
> and the hwaddr is not a MAC address (as I would expect).
>
>
>
> Is there something I am missing or should be using a different way to
> look at the IP vs MAC vs Hostname?
>
>
>
> mysql> select * from lease4;
>
> +-----------+--------+-------------+----------------+---------------------+-----------+----------+----------+-----------------+-------+
>
> | address | hwaddr | client_id | valid_lifetime | expire |
> subnet_id | fqdn_fwd | fqdn_rev | hostname | state |
>
> +-----------+--------+-------------+----------------+---------------------+-----------+----------+----------+-----------------+-------+
>
> | 168059909 | g?6܆ | g?6܆ | 300 | 2017-09-12 19:11:50 |
> 1 | 0 | 0 | neil-ultrabook. | 0 |
>
> | 171049482 | p???? | p???? | 300 | 2017-09-12
> 19:09:49 | 5 | 0 | 0 | WS1394. | 0 |
>
> | 171049483 | p???? | p???? | 300 | 2017-09-12
> 18:59:49 | 4 | 0 | 0 | | 2 |
>
> | 171056451 | ???? | sla-2,6161 | 300 | 2017-09-12 19:12:08
> | 45 | 0 | 0 | | 0 |
>
> +-----------+--------+-------------+----------------+---------------------+-----------+----------+----------+-----------------+-------+
>
> 4 rows in set (0.00 sec)
>
>
>
>
>
> Neil Briscoe
>
>
> _______________________________________________
> Kea-users mailing list
> Kea-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users
>
--
With best regards, Evgeniy Petrenko.
_______________________________________________
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