Re: [Kea-users] IP lease based only on host reservation database

2017-04-19 Thread Francis Dupont
Stas Starikevich writes:
> > Stas Starikevich writes:
> > > Can someone suggest a way to serve only white-listed (with host
> > reservation) clients?
> > > I.e. if client is not in the 'hosts' table then it shouldn't not get any
> > leases (and boot from the HDD, but not from PXE).
> >
> > => did you try with no pool?
>
> Can you please provide more details about this with config examples?

 "subnet4": [
   {
  "subnet": "192.168.0.0/24",
  "reservations": [ ... ]
   } ],

As far as I know the only required parameter in a subnet is the
"subnet" range. Pools are not required and without a pool there is no
available address so only known hosts which have a reservation can
get an address. This is a theory, i.e. you have to try it, but on
the paper it does exactly what you want.

Regards

Francis Dupont 
___
Kea-users mailing list
Kea-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users


Re: [Kea-users] Bind service to loopback address

2017-04-19 Thread Jason Guy
Hi Tomek,

I have not tried UDP as I was under the impression this is only used when
the DHCP subnet was directly connected. Everything I am doing requires DHCP
RELAY. I will need to go back and see if there is a way to specify the
loopback to be a UDP socket. The other idea I had was specifying the
loopback address on every interface. Seems like a less than elegant
solution though.

Thanks,
Jason

On Wed, Apr 19, 2017 at 11:00 AM, Tomek Mrugalski  wrote:

> W dniu 19.04.2017 o 16:35, Jason Guy pisze:
> > I would like to leverage my routing on the host setup, and bind the kea
> > service to the loopback address I have configured. This would ultimately
> > allow me to deploy multiple kea servers with an "anycast" reachability.
> >
> > ip addr show lo
> > ...
> > inet 10.50.5.11/32  brd 10.50.5.11 scope
> > global lo:1
> > ...
> >
> > Kea.conf:
> > ...
> > "interfaces-config": {
> > "interfaces": [
> > "lo/10.50.5.11 ",
> > "eth0",
> > "eth1"
> > ]
> > },
> > 
> >
> > I have tried specifying this in a few ways, and the DHCP relay packets
> > reach the server, but Kea does not appear to process them. I thought
> > about putting the loopback on the ethernet interfaces as secondary
> > addresses, but wanted to understand why I can see the relay packets
> > arrive but not picked up by Kea.
> Kea uses raw sockets by default to receive DHCPv4 traffic. Raw sockets
> receive raw packets, i.e. everything that comes over wire (ethernet
> header, ip, udp and everything that follows). This is different on
> loopback as there's no notion of ethernet headers there. Kea has some
> support for loopback traffic handling, but it's not used extensively, so
> did not receive much testing.
>
> Have you tried setting dhcp-socket-type to udp? If that doesn't help at
> all, can you open a ticket for this?
>
> Tomek
>
> ___
> Kea-users mailing list
> Kea-users@lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users
>
___
Kea-users mailing list
Kea-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users


Re: [Kea-users] IP lease based only on host reservation database

2017-04-19 Thread Stas Starikevich
Hello Francis,

Can you please provide more details about this with config examples?

Stas

On Tue, Apr 18, 2017 at 12:13 AM, Francis Dupont  wrote:

> Stas Starikevich writes:
> > Can someone suggest a way to serve only white-listed (with host
> reservation)
> > clients?
> > I.e. if client is not in the 'hosts' table then it shouldn't not get any
> leas
> > es (and boot from the HDD, but not from PXE).
>
> => did you try with no pool?
>
> Regards
>
> Francis Dupont 
>
___
Kea-users mailing list
Kea-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users


Re: [Kea-users] Bind service to loopback address

2017-04-19 Thread Tomek Mrugalski
W dniu 19.04.2017 o 16:35, Jason Guy pisze:
> I would like to leverage my routing on the host setup, and bind the kea
> service to the loopback address I have configured. This would ultimately
> allow me to deploy multiple kea servers with an "anycast" reachability.
> 
> ip addr show lo
> ...
> inet 10.50.5.11/32  brd 10.50.5.11 scope
> global lo:1
> ...
> 
> Kea.conf:
> ...
> "interfaces-config": {
> "interfaces": [
> "lo/10.50.5.11 ",
> "eth0",
> "eth1"
> ]
> },
> 
> 
> I have tried specifying this in a few ways, and the DHCP relay packets
> reach the server, but Kea does not appear to process them. I thought
> about putting the loopback on the ethernet interfaces as secondary
> addresses, but wanted to understand why I can see the relay packets
> arrive but not picked up by Kea.
Kea uses raw sockets by default to receive DHCPv4 traffic. Raw sockets
receive raw packets, i.e. everything that comes over wire (ethernet
header, ip, udp and everything that follows). This is different on
loopback as there's no notion of ethernet headers there. Kea has some
support for loopback traffic handling, but it's not used extensively, so
did not receive much testing.

Have you tried setting dhcp-socket-type to udp? If that doesn't help at
all, can you open a ticket for this?

Tomek

___
Kea-users mailing list
Kea-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users


[Kea-users] Bind service to loopback address

2017-04-19 Thread Jason Guy
Hi folks,

I would like to leverage my routing on the host setup, and bind the kea
service to the loopback address I have configured. This would ultimately
allow me to deploy multiple kea servers with an "anycast" reachability.

ip addr show lo
...
inet 10.50.5.11/32 brd 10.50.5.11 scope global lo:1
...

Kea.conf:
...
"interfaces-config": {
"interfaces": [
"lo/10.50.5.11",
"eth0",
"eth1"
]
},


I have tried specifying this in a few ways, and the DHCP relay packets
reach the server, but Kea does not appear to process them. I thought about
putting the loopback on the ethernet interfaces as secondary addresses, but
wanted to understand why I can see the relay packets arrive but not picked
up by Kea.

Thanks,
Jason
___
Kea-users mailing list
Kea-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users


Re: [Kea-users] Wrong values in Kea statistics

2017-04-19 Thread Malcolm Scerri
Hi Thomas,

Thanks for the information provided.

I look forward to integrate the patch/upgrade once it becomes available.

Thanks and regards,

Malcolm.

From: Thomas Markwalder [mailto:tm...@isc.org]
Sent: 19 April 2017 15:18
To: Malcolm Scerri 
Cc: kea-users@lists.isc.org
Subject: Re: [Kea-users] Wrong values in Kea statistics

Hi Malcom:

1.2 is due 4/28/17.

Cheers,

Thomas

On 4/19/17 8:39 AM, Malcolm Scerri wrote:
Hi Thomas,

Thanks for your email. I have just seen the ticket.

Do you have any approximate date when Kea 1.2 will be released please?

Thanks and regards,

Malcolm.

From: Kea-users [mailto:kea-users-boun...@lists.isc.org] On Behalf Of Thomas 
Markwalder
Sent: 19 April 2017 14:08
To: kea-users@lists.isc.org
Subject: Re: [Kea-users] Wrong values in Kea statistics

Hello Malcom:

As per my private replies to you, we have identified the issue.   As a matter 
of expediency, I have created a ticket for your issue:

   http://kea.isc.org/ticket/5247#ticket

and we are working into our Kea 1.2 release which is in beta now.  Code freeze 
for final is Monday.  We felt this issue warranted a fix forthwith.  You'll 
need to register:

http://kea.isc.org/register

to view the ticket.

To recap the issue:   The v4 server does not increment assigned-leases when 
expired leases are renewed (same client) or reused (different client).  Since 
we decrement assigned-leases each time we expire a lease (as we should), the 
assigned-leases stat becomes incorrect with the first reissue of an expired 
lease.

Based on that stats you provided, it looks like client leases expire pretty 
frequently in your environment as your reclaim-leases stat is quite large.

Additionally testing shows  a similar error in v6 assigned-nas assigned-pds 
stats.  This will be corrected under the same ticket.

Regards,

Thomas Markwalder

On 4/17/17 9:30 AM, Malcolm Scerri wrote:
Hello everyone,

I am using Kea socket to obtain statistics per each configured subnet. However, 
the value of Assigned addresses is exceeding the value of Total addresses.

This issue is currently occurring on two servers and on multiple subnets and 
cannot figure out what might be wrong.

I appreciate any help on this matter.

Thank you in advance!

Malcolm.









___

Kea-users mailing list

Kea-users@lists.isc.org

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




___
Kea-users mailing list
Kea-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users


Re: [Kea-users] Wrong values in Kea statistics

2017-04-19 Thread Chaigneau, Nicolas
Thomas,


I would love to use 1.2 :)

Timing is unfortunate though. We're currently integrating Kea 1.1.0, and we 
might not have the time to upgrade to 1.2 when it's available.
If this is the case I'll have to fix the issue on 1.1.0 before we ship. If you 
provide an official patch, it will be easier :)


Regards,
Nicolas.

De : Thomas Markwalder [mailto:tm...@isc.org]
Envoyé : mercredi 19 avril 2017 15:20
À : Chaigneau, Nicolas; kea-users@lists.isc.org
Objet : Re: [Kea-users] Wrong values in Kea statistics

Hi Nicolas:

It does affect 1.1.0.  We can probably make a patch available, of course we 
would encourage you to upgrade 1.2.  It has lots of shiny new features to play 
with.

Cheers,

Thomas


On 4/19/17 8:35 AM, Chaigneau, Nicolas wrote:
Hello Thomas,


I assume this issue also affects Kea 1.1.0 ?

If so, would it be possible to have a corrective patch for 1.1.0 ?



Regards,
Nicolas.

De : Kea-users [mailto:kea-users-boun...@lists.isc.org] De la part de Thomas 
Markwalder
Envoyé : mercredi 19 avril 2017 14:08
À : kea-users@lists.isc.org
Objet : Re: [Kea-users] Wrong values in Kea statistics

Hello Malcom:

As per my private replies to you, we have identified the issue.   As a matter 
of expediency, I have created a ticket for your issue:

   http://kea.isc.org/ticket/5247#ticket

and we are working into our Kea 1.2 release which is in beta now.  Code freeze 
for final is Monday.  We felt this issue warranted a fix forthwith.  You'll 
need to register:

http://kea.isc.org/register

to view the ticket.

To recap the issue:   The v4 server does not increment assigned-leases when 
expired leases are renewed (same client) or reused (different client).  Since 
we decrement assigned-leases each time we expire a lease (as we should), the 
assigned-leases stat becomes incorrect with the first reissue of an expired 
lease.

Based on that stats you provided, it looks like client leases expire pretty 
frequently in your environment as your reclaim-leases stat is quite large.

Additionally testing shows  a similar error in v6 assigned-nas assigned-pds 
stats.  This will be corrected under the same ticket.

Regards,

Thomas Markwalder

On 4/17/17 9:30 AM, Malcolm Scerri wrote:
Hello everyone,

I am using Kea socket to obtain statistics per each configured subnet. However, 
the value of Assigned addresses is exceeding the value of Total addresses.

This issue is currently occurring on two servers and on multiple subnets and 
cannot figure out what might be wrong.

I appreciate any help on this matter.

Thank you in advance!

Malcolm.









___

Kea-users mailing list

Kea-users@lists.isc.org

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


This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient, you are not authorized 
to read, print, retain, copy, disseminate, distribute, or use this message or 
any part thereof. If you receive this message in error, please notify the 
sender immediately and delete all copies of this message.


___
Kea-users mailing list
Kea-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users


Re: [Kea-users] Wrong values in Kea statistics

2017-04-19 Thread Thomas Markwalder
Hi Nicolas:

It does affect 1.1.0.  We can probably make a patch available, of course
we would encourage you to upgrade 1.2.  It has lots of shiny new
features to play with.

Cheers,

Thomas


On 4/19/17 8:35 AM, Chaigneau, Nicolas wrote:
>
> Hello Thomas,
>
>  
>
>  
>
> I assume this issue also affects Kea 1.1.0 ?
>
>  
>
> If so, would it be possible to have a corrective patch for 1.1.0 ?
>
>  
>
>  
>
>  
>
> Regards,
>
> Nicolas.
>
>  
>
> *De :*Kea-users [mailto:kea-users-boun...@lists.isc.org] *De la part
> de* Thomas Markwalder
> *Envoyé :* mercredi 19 avril 2017 14:08
> *À :* kea-users@lists.isc.org
> *Objet :* Re: [Kea-users] Wrong values in Kea statistics
>
>  
>
> Hello Malcom:
>
> As per my private replies to you, we have identified the issue.   As a
> matter of expediency, I have created a ticket for your issue:
>
>http://kea.isc.org/ticket/5247#ticket
>
> and we are working into our Kea 1.2 release which is in beta now. 
> Code freeze for final is Monday.  We felt this issue warranted a fix
> forthwith.  You'll need to register:
>
> http://kea.isc.org/register
>
> to view the ticket.
>
> To recap the issue:   The v4 server does not increment assigned-leases
> when expired leases are renewed (same client) or reused (different
> client).  Since we decrement assigned-leases each time we expire a
> lease (as we should), the assigned-leases stat becomes incorrect with
> the first reissue of an expired lease.
>
> Based on that stats you provided, it looks like client leases expire
> pretty frequently in your environment as your reclaim-leases stat is
> quite large.
>
> Additionally testing shows  a similar error in v6 assigned-nas
> assigned-pds stats.  This will be corrected under the same ticket.
>
> Regards,
>
> Thomas Markwalder
>
> On 4/17/17 9:30 AM, Malcolm Scerri wrote:
>
> Hello everyone,
>
>  
>
> I am using Kea socket to obtain statistics per each configured
> subnet. However, the value of Assigned addresses is exceeding the
> value of Total addresses.
>
>  
>
> This issue is currently occurring on two servers and on multiple
> subnets and cannot figure out what might be wrong.
>
>  
>
> I appreciate any help on this matter.
>
>  
>
> Thank you in advance!
>
>  
>
> Malcolm.
>
>  
>
>  
>
>  
>
>  
>
>
>
>
> ___
>
> Kea-users mailing list
>
> Kea-users@lists.isc.org 
>
> https://lists.isc.org/mailman/listinfo/kea-users
>
>  
>
> This message contains information that may be privileged or
> confidential and is the property of the Capgemini Group. It is
> intended only for the person to whom it is addressed. If you are not
> the intended recipient, you are not authorized to read, print, retain,
> copy, disseminate, distribute, or use this message or any part
> thereof. If you receive this message in error, please notify the
> sender immediately and delete all copies of this message. 


___
Kea-users mailing list
Kea-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users


Re: [Kea-users] Wrong values in Kea statistics

2017-04-19 Thread Thomas Markwalder
Hi Malcom:

1.2 is due 4/28/17.

Cheers,

Thomas

On 4/19/17 8:39 AM, Malcolm Scerri wrote:
>
> Hi Thomas,
>
>  
>
> Thanks for your email. I have just seen the ticket.
>
>  
>
> Do you have any approximate date when Kea 1.2 will be released please?
>
>  
>
> Thanks and regards,
>
>  
>
> Malcolm.
>
>  
>
> *From:*Kea-users [mailto:kea-users-boun...@lists.isc.org] *On Behalf
> Of *Thomas Markwalder
> *Sent:* 19 April 2017 14:08
> *To:* kea-users@lists.isc.org
> *Subject:* Re: [Kea-users] Wrong values in Kea statistics
>
>  
>
> Hello Malcom:
>
> As per my private replies to you, we have identified the issue.   As a
> matter of expediency, I have created a ticket for your issue:
>
>http://kea.isc.org/ticket/5247#ticket
>
> and we are working into our Kea 1.2 release which is in beta now. 
> Code freeze for final is Monday.  We felt this issue warranted a fix
> forthwith.  You'll need to register:
>
> http://kea.isc.org/register
>
> to view the ticket.
>
> To recap the issue:   The v4 server does not increment assigned-leases
> when expired leases are renewed (same client) or reused (different
> client).  Since we decrement assigned-leases each time we expire a
> lease (as we should), the assigned-leases stat becomes incorrect with
> the first reissue of an expired lease.
>
> Based on that stats you provided, it looks like client leases expire
> pretty frequently in your environment as your reclaim-leases stat is
> quite large.
>
> Additionally testing shows  a similar error in v6 assigned-nas
> assigned-pds stats.  This will be corrected under the same ticket.
>
> Regards,
>
> Thomas Markwalder
>
> On 4/17/17 9:30 AM, Malcolm Scerri wrote:
>
> Hello everyone,
>
>  
>
> I am using Kea socket to obtain statistics per each configured
> subnet. However, the value of Assigned addresses is exceeding the
> value of Total addresses.
>
>  
>
> This issue is currently occurring on two servers and on multiple
> subnets and cannot figure out what might be wrong.
>
>  
>
> I appreciate any help on this matter.
>
>  
>
> Thank you in advance!
>
>  
>
> Malcolm.
>
>  
>
>  
>
>  
>
>  
>
>
>
>
> ___
>
> Kea-users mailing list
>
> Kea-users@lists.isc.org 
>
> https://lists.isc.org/mailman/listinfo/kea-users
>
>  
>

___
Kea-users mailing list
Kea-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users


[Kea-users] Dynamically changing DHCP options based on current environment using hooks

2017-04-19 Thread Munroe Sollog
I have a network that has two gateways that can act as a device’s default 
gateway.  Currently I am running kea on two different servers.  Each server is 
configured to hand out half of the network’s ip space (non-overlapping).  Each 
server has a different default gateway configured.  This has the effect of load 
balancing users across both gateways.  For added robustness I wrote a simple 
perl script that checks to ensure each path is up and routing, when one goes 
down for whatever reason, the script stops the appropriate DHCP server so users 
aren’t directed to a black hole.  Finally the same script will start the DHCP 
server again when the path becomes functional again.

This setup has been working well, but I would like to take advantage of the Kea 
hook framework, so I can reproduce this functionality using a single kea 
instance.  I am looking for pointers and thoughts regarding writing a hook for 
this.  It looks like, at the moment,  I am locked into C++.  I’m not sure which 
hook to use to massage the default gw for every lease.


signature.asc
Description: Message signed with OpenPGP
___
Kea-users mailing list
Kea-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users


Re: [Kea-users] Wrong values in Kea statistics

2017-04-19 Thread Malcolm Scerri
Hi Thomas,

Thanks for your email. I have just seen the ticket.

Do you have any approximate date when Kea 1.2 will be released please?

Thanks and regards,

Malcolm.

From: Kea-users [mailto:kea-users-boun...@lists.isc.org] On Behalf Of Thomas 
Markwalder
Sent: 19 April 2017 14:08
To: kea-users@lists.isc.org
Subject: Re: [Kea-users] Wrong values in Kea statistics

Hello Malcom:

As per my private replies to you, we have identified the issue.   As a matter 
of expediency, I have created a ticket for your issue:

   http://kea.isc.org/ticket/5247#ticket

and we are working into our Kea 1.2 release which is in beta now.  Code freeze 
for final is Monday.  We felt this issue warranted a fix forthwith.  You'll 
need to register:

http://kea.isc.org/register

to view the ticket.

To recap the issue:   The v4 server does not increment assigned-leases when 
expired leases are renewed (same client) or reused (different client).  Since 
we decrement assigned-leases each time we expire a lease (as we should), the 
assigned-leases stat becomes incorrect with the first reissue of an expired 
lease.

Based on that stats you provided, it looks like client leases expire pretty 
frequently in your environment as your reclaim-leases stat is quite large.

Additionally testing shows  a similar error in v6 assigned-nas assigned-pds 
stats.  This will be corrected under the same ticket.

Regards,

Thomas Markwalder

On 4/17/17 9:30 AM, Malcolm Scerri wrote:
Hello everyone,

I am using Kea socket to obtain statistics per each configured subnet. However, 
the value of Assigned addresses is exceeding the value of Total addresses.

This issue is currently occurring on two servers and on multiple subnets and 
cannot figure out what might be wrong.

I appreciate any help on this matter.

Thank you in advance!

Malcolm.








___

Kea-users mailing list

Kea-users@lists.isc.org

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


___
Kea-users mailing list
Kea-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users