Send kea-dev mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.isc.org/mailman/listinfo/kea-dev
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of kea-dev digest..."
Today's Topics:
1. Re: select an IPv4 address on interface with multiple
addresses (Chaigneau, Nicolas)
2. Re: Lease File Cleanup in Kea - Design Document (Shawn Routhier)
----------------------------------------------------------------------
Message: 1
Date: Mon, 26 Jan 2015 16:38:10 +0000
From: "Chaigneau, Nicolas" <[email protected]>
To: Marcin Siodelski <[email protected]>
Cc: "[email protected]" <[email protected]>
Subject: Re: [kea-dev] select an IPv4 address on interface with
multiple addresses
Message-ID:
<ab94b0b675bdf14189cd5a861db36c84194c9...@de-cm-mbx26.corp.capgemini.com>
Content-Type: text/plain; charset="utf-8"
Marcin,
Please see my answers inline below.
Also, my apologizes for not expressing my use cases clearly enough previously.
Regards,
Nicolas.
> On 01/26/15 15:20, Chaigneau, Nicolas wrote:
> >
> > Hello,
> >
> >
> > I've tested the possibility to configure a specific listening address
> > of an interface.
> >
> > It doesn't seem to do anything useful:
> > - I can't start two Kea servers listening on two different addresses
> > of the same interface
>
> That should work but I will double check to make sure.
In this situation, I get the following logs when starting the second server:
2015-01-26 17:13:31.952 WARN [kea-dhcp4.dhcpsrv/14215]
DHCPSRV_OPEN_SOCKET_FAIL failed to open socket: failed to open socket on
interface eth0.102, reason: Failed to bind socket 6 to 10.163.216.230/port=67
2015-01-26 17:13:31.952 WARN [kea-dhcp4.dhcpsrv/14215] DHCPSRV_NO_SOCKETS_OPEN
no interface configured to listen to DHCP traffic
>
> > - I can't start one Kea server listening on two different addresses of
> > the same interface
>
> Initially when we talked about it I thought you were running multiple
> instances of the DHCP server and each DHCP server would bind to a different
> address. So, you used to use two instances of the server because there was no
> other possibility with dhcpd and with Kea you would like to run just one?
This is only part of the answer (please refer to the other mail).
>
> > - One Kea server will still answer to packets sent to any address of
> > the interface, even when configured for a single listen address
> >
>
> The way Kea works (and worked in the past) is that for each address and
> interface on which it should listen, it creates a socket, binds to a specific
> address on this interface and captures both unicast and broadcast traffic on
> this interface.
>
> When we discussed the issues with unicast addresses you seemed to indicate
> that the major pain was that the socket was bound to an interface/device and
> received packets on this interface, even though they were sent to a different
> destination address on that interfaces.
>
> This has been corrected now. But, this was the case when raw socket was in
> use (direct_response_desired = "true"). What I didn't realize realize was
> that you're actually going to use the ip/udp sockets (direct_response_desired
> = "false), not raw sockets.
Yeah I don't want raw sockets at all. Sorry for the misunderstanding :/
>
> > (this with Kea built with "direct_response_desired = false" so raw
> > sockets are not used)
> >
>
> Again, Kea doesn't yet (until #3604) support switching between use of raw
> sockets and ip/udp sockets. It always uses raw sockets. The trick with a
> direct_response_desired is a "hack" which allows you to test the use of
> ip/udp sockets.
>
> Now that I understand a little more about your use cases it seems to me that
> what you ask for is:
>
> - an ability to open multiple sockets on a single interface (assuming they
> are not raw sockets because for raw sockets you have to bind socket to the
> device), within a single DHCP server instance - this is not supported at
> present and implementing this would require a new ticket.
Yes.
> It is doable, but #3604 must go in first because it can only be done for the
> ip/udp socket case.
Understood.
>For raw socket it is way more complicated (not impossible, though).
Don't need them, don't want them :)
>
> - a configuration knob which to select between the use raw sockets and udp
> sockets (for unicast traffic) - covered in #3604, with an additional ability
> to disable the broadcast traffic on the interface on which ip/udp socekts are
> in use.
>
> Please confirm.
Yes.
>
> The question I have is this. Since you want to use the ip/udp sockets (only
> relayed traffic, I suppose), you probably desire to use IP tables.
Yes.
> With a raw socket you couldn't use IP tables because packets will bypass the
> iptables. So one choice you have, when #3604 is done, is to setup ip tables
> to filter out broadcast packets, in which case Kea doesn't have to do it.
> Would that work?
Yes. In my setup Kea will never receive broadcast packets.
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.
------------------------------
Message: 2
Date: Mon, 26 Jan 2015 09:22:00 -0800
From: Shawn Routhier <[email protected]>
To: Stephen Morris <[email protected]>
Cc: [email protected]
Subject: Re: [kea-dev] Lease File Cleanup in Kea - Design Document
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
On Jan 26, 2015, at 7:25 AM, Stephen Morris wrote:
> On 26/01/15 15:05, Marcin Siodelski wrote:
>> Nicolas,
>>
>> Ok, this is actually a good point. The pid file location or at least its
>> name should be configurable in runtime.
>
> The files for different servers should be different, but I don't think
> we need another configuration item.
>
> When LFC runs, it outputs/uses intermediate files, the names of which
> are formed by appending a suffix to the name of the configured lease
> file. We should do the same for the pid file - append something like
> ".pid" to the end of the lease file name.
>
> Stephen
The current LFC code doesn't know anything about the naming conventions.
It accepts a set of file names from the command line to allow the caller
to decide where the files should go. Passing all of the file names on the
command line does add to what needs to be parsed and checked but
it also avoids having two pieces of code (the server and the LFC code)
that both need to agree on the naming conventions.
The one downside of this style is that if a user attempts to use LFC directly
(so call it by hand and not from the kea server) they may get the names
incorrect. As this is not a recommended use of LFC I don't think it is a large
issue.
As of now we don't have a command line argument for the PID file, but it
would be easy enough to add one.
Shawn
------------------------------
_______________________________________________
kea-dev mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/kea-dev
End of kea-dev Digest, Vol 10, Issue 7
**************************************