[Kea-users] Kea 1.1.0, MySQL and client-id

Olivier Français olivier.francais at corp.ovh.com
Mon Jan 9 16:46:33 UTC 2017


Hi,

I've apply your patch, recompile and install : it doesn't work.
My device get and IP, but not the reserved IP.

To test my config, I try host reservation with hw-address : it works.

The test config :

{
  "Dhcp4": {
    "renew-timer": 60,
    "rebind-timer": 120,
    "expired-leases-processing": {
      "hold-reclaimed-time": 3600,
      "unwarned-reclaim-cycles": 5,
      "max-reclaim-time": 250,
      "max-reclaim-leases": 100,
      "flush-reclaimed-timer-wait-time": 25,
      "reclaim-timer-wait-time": 10
    },
    "valid-lifetime": 180,
    "interfaces-config": {
      "interfaces": [
        "*"
      ],
      "dhcp-socket-type": "udp"
    },
    "option-def": [
      
    ],
    "option-data": [
      
    ],
    "subnet4": [
      {
        "pools": [
          {
            "pool": "192.168.1.5-192.168.1.10"
          }
        ],
        "next-server": "",
        "id": 1,
        "subnet": "192.168.1.0\/24",
        "option-data": [
          
        ]
      }
    ],
    "hosts-database": {
      "name": "kea",
      "user": "kea",
      "type": "postgresql",
      "password": "***",
      "host": "db"
    },
    "lease-database": {
      "name": "kea",
      "user": "kea",
      "type": "postgresql",
      "password": "***",
      "host": "db"
    }
  }
}

Info in database (PG 9.4.10) :

kea=> select * from lease4;
-[ RECORD 1 ]--+-----------------------------
address        | 3232235781
hwaddr         | \xc8f9f9f79440
client_id      | \x0073772d3235373431332d326b
valid_lifetime | 180
expire         | 2017-01-09 16:25:34+00
subnet_id      | 1
fqdn_fwd       | t
fqdn_rev       | t
hostname       | sw-257413-2k
state          | 0

kea=> select * from hosts;
-[ RECORD 1 ]---------+-----------------------------
host_id               | 5
dhcp_identifier       | \x0073772d3235373431332d326b
dhcp_identifier_type  | 3
dhcp4_subnet_id       | 1
dhcp6_subnet_id       |
ipv4_address          | 3232235802
hostname              |
dhcp4_client_classes  |
dhcp6_client_classes  |
dhcp4_next_server     |
dhcp4_server_hostname |
dhcp4_boot_file_name  |
 
Maybe I've make a mistake, but I didn't see it.
If you need more info, feel free

-- 
Olivier Français
olivier.francais at corp.ovh.com



On jeu., 2017-01-05 at 11:48 +0100, Marcin Siodelski wrote:
> We have investigated this today and it appears we do have some problem
> in the code with the reservations by client identifier. There is no
> workaround for this and the only way to make it usable is to patch the code.
> 
> The relevant Kea ticket is here: http://kea.isc.org/ticket/5102
> 
> We will release the fix in Kea 1.2 but if you're ok with patching your
> Kea version locally, you're welcome to use the patch provided in the
> ticket description. This should fix the problem. I'd appreciate if you
> let me know how it works for you.
> 
> Thanks for pointing out the issue.
> Marcin Siodelski
> ISC
> 
> On 05.01.2017 10:41, Olivier Français wrote:
> > Hello,
> >
> > I think I have the same issue. I try to do host reservation with a
> > client-id and a cisco device without success.
> > It works with mac address, but not with client-id.
> >
> > I've try to change the identifiers for :
> > "host-reservation-identifiers": [ "auto" ]
> > and
> > "host-reservation-identifiers": [ "client-id" ]
> > but it doesn't work.
> >
> > My device get and ip address, but not the reserved IP.
> >
> > I took the client-id value from the lease table :
> >
> > kea=> SELECT * FROM lease4;
> > -[ RECORD 1 ]--+-----------------------------
> > address        | 3232235782
> > hwaddr         | \xc8f9f9f79440
> > client_id      | \x0073772d3235373431332d326b
> > valid_lifetime | 180
> > expire         | 2017-01-05 09:35:55+00
> > subnet_id      | 1
> > fqdn_fwd       | t
> > fqdn_rev       | t
> > hostname       | sw-257413-2k
> > state          | 0
> >
> > kea=> SELECT * FROM hosts;
> > -[ RECORD 1 ]---------+-----------------------------
> > host_id               | 3
> > dhcp_identifier       | \x0073772d3235373431332d326b
> > dhcp_identifier_type  | 3
> > dhcp4_subnet_id       | 1
> > dhcp6_subnet_id       |
> > ipv4_address          | 3232235801
> > hostname              |
> > dhcp4_client_classes  |
> > dhcp6_client_classes  |
> > dhcp4_next_server     | 16777216
> > dhcp4_server_hostname |
> > dhcp4_boot_file_name  |
> >
> >
> > I use PostgreSQL 9.4.10 with Kea :
> > 1.1.0
> > tarball
> > linked with:
> > log4plus 1.1.2
> > OpenSSL 1.1.0c  10 Nov 2016
> > database:
> > MySQL backend 5.0, library 10.0.28-MariaDB
> > PostgreSQL backend 3.0, library 90409
> > Memfile backend 2.0
> >
> >
> > If it can help.
> >
> > Thanks
> >
> >
> >
> > _______________________________________________
> > Kea-users mailing list
> > Kea-users at lists.isc.org
> > https://lists.isc.org/mailman/listinfo/kea-users
> >
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20170109/72f004ac/attachment.bin>


More information about the Kea-users mailing list