[Kea-users] Host Reservation in Kea 1.5.0

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

[Kea-users] Host Reservation in Kea 1.5.0

Jeronimo
Hi,

I have installed Kea 1.5.0 and configured it to store leases on a local PostgreSQL backend.
I have searchin how to create reservations but on Kea Guide https://ftp.isc.org/isc/kea/1.5.0/doc/kea-guide.html only have mentions about creating reservation on config file.

How can I create reservation on PostgreSQL database? What is the command to do it?

/etc/kea/kea-dhcp4.conf
# The whole configuration starts here.
{
    # DHCPv4 specific configuration starts here.
    "Dhcp4": {
    "lease-database": {
    "type": "postgresql",
    "name": "keadhcp",
    "host": "127.0.0.1",
    "port": 5432,
    "user": "keadhcp",
    "password": "rapadura"
    },
    "hosts-database": {
    "type": "postgresql",
    "name": "keadhcp",
    "host": ""
    },
    "interfaces-config": {
            "interfaces": [ "ens4" ],
            "dhcp-socket-type": "raw"
        },
        "valid-lifetime": 400,
        "renew-timer": 100,
        "rebind-timer": 200,
        "subnet4": [{
           "pools": [ { "pool": "192.168.82.1-192.168.82.200" } ],
           "subnet": "192.168.82.0/24"
        }]
    },

    # Logger configuration starts here.
    "Logging": {
       "loggers": [{
            "name": "*",
            "severity": "DEBUG"
        }]
    }

# The whole configuration structure ends here.
}


Regards,

Jeronimo Menezes

_______________________________________________
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] Host Reservation in Kea 1.5.0

mathiasAichinger
Hi Jeronimo,

to use the API, I think you need to buy the Premium hook library. An
alternative would be to do all the inserts manually via SQL.

https://jenkins.isc.org/job/Kea_doc/guide/kea-guide.html#host-cmds

The command would be:
https://jenkins.isc.org/job/Kea_doc/guide/kea-guide.html#reference-reservation-add

An example:

{
  "command": "reservation-add",
  "arguments": {
    "reservation": {
      "subnet-id": 3,
      "hw-address": "AAbe9b864392",
      "ip-address": "192.168.225.56",
      "next-server": "192.168.203.7",
      "boot-file-name": "dynamic_bootfiles/AA-be-9b-86-43-92.bin"
    }
  },
  "service": [
    "dhcp4"
  ]
}


Best Regards,

Mathias Aichinger


Jeronimo wrote

> Hi,
>
> I have installed Kea 1.5.0 and configured it to store leases on a local
> PostgreSQL backend.
> I have searchin how to create reservations but on Kea Guide
> https://ftp.isc.org/isc/kea/1.5.0/doc/kea-guide.html only have mentions
> about creating reservation on config file.
>
> How can I create reservation on PostgreSQL database? What is the command
> to
> do it?
>
> ...
>
> Regards,
>
> Jeronimo Menezes
>
> _______________________________________________
> Kea-users mailing list

> Kea-users@.isc

> https://lists.isc.org/mailman/listinfo/kea-users





--
Sent from: http://kea-users.7364.n8.nabble.com/
_______________________________________________
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] Host Reservation in Kea 1.5.0

tombaja
Hi Mathias,
Could you please so kind and update both links, there are not working
anymore.
Thanks.



--
Sent from: http://kea-users.7364.n8.nabble.com/
_______________________________________________
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] Host Reservation in Kea 1.5.0

mathiasAichinger
tombaja wrote
> Hi Mathias,
> Could you please so kind and update both links, there are not working
> anymore.
> Thanks.

https://kea.readthedocs.io/en/latest/arm/hooks.html#host-cmds-host-commands
https://kea.readthedocs.io/en/latest/api.html#reservation-add



--
Sent from: http://kea-users.7364.n8.nabble.com/
_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users