-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 16/01/16 15:00, Pali Rohár wrote:
> On Friday 15 January 2016 22:48:31 Simon Kelley wrote:
>> On 01/01/16 21:29, Pali Rohár wrote:
>>> On Friday 01 January 2016 21:23:36 Simon Kelley wrote:
>>>> On 23/12/15 21:10, Pali Rohár wrote:
>>>>> This patch allows to assign one IPv6 address for more
>>>>> config entries specified by MAC address. This is similar
>>>>> function as for IPv4 addresses in DHCPv4 server code part.
>>>> 
>>>> This needs some thinking about: DHCPv6 is different from
>>>> DHCPv4 in that clients are not, at all, identified by MAC
>>>> address, rather by client-id and IAID.
>>> 
>>> I know and this is absolutely uncomfortable for me. One client
>>> has
>>> 
>>> different DUID across different operating systems. Also
>>> different
>>> 
>>> across OS reinstalling... Also if I want to connect new device
>>> I need to instruct people how to set stable DUID across all
>>> OS... Just not usable for normal usage of "any" device.
>>> 
>>> For identifying computer/device I need some stable identifier
>>> and DHCPv6 DUID is *not* stable in current implementation of
>>> major usage OS.
>>> 
>>> MAC address of network card is stable. And so this identifier
>>> is what I prefer to use. dnsmasq has for it support and I'm
>>> happy for it! And when I configure both DHCPv4 and DHCPv6 one
>>> configuration line MAC,ipv4,ipv6 is really nice for having
>>> "clean" configuration.
>>> 
>>>> In addition, DHCPv6 handles multiple addresses and leases
>>>> per client.
>>> 
>>> When using just DUID I have problem here. My laptop has both
>>> Wifi and wired ethernet and with DUID information I'm not able
>>> to configure dnsmasq for stable ipv6 addresses.
>>> 
>>>> What's important? To be able to specify more than on MAC
>>>> address, any one of which can be matched, or to have a single
>>>> IPv6 address which is removed from one IAID to another if the
>>>> MAC addresses are paired?
>>> 
>>> For specified laptops, I have special configuration. All
>>> network interfaces (one wifi, one wired ethernet) on those
>>> laptops is assigned same IP address. Operating system is
>>> configured in special way that when both interfaces are active
>>> it send packets *only* via ethernet.
>>> 
>>> So it allows me to have active TCP connections and allows me
>>> to switch between wifi/ethernet without dropping it.
>>> 
>>> DHCPv4 in dnsmasq has already support for assigning one ip
>>> address to more MAC addresses (more clients) and this my patch
>>> add support for it too.
>> 
>> That makes sense. I think if you can organise for both interfaces
>> to send the same CLID and IAID, then both will get the same
>> address.
> 
> I cannot do that. It is limitation of ISC dhclient which I'm using.
>  Already tried to do that, not possible.
> 
>> Actually, one way to make this work may be to have ONE DHCP
>> client, and make it configure both interfaces, or copy  the
>> address from one interface to the other.
> 
> For classic "desktop" linux solution it is again not possible.
> Whole network configuration is done by NetworkManager which just do
> not support something like this...
> 
>> I think you can configure a stable address not matter which
>> interface actually does the DHCP transaction with
>> 
>> dhcp-host=<mac1><IP-address> dhcp-host=<mac2><IP-address>
>> 
>> without needing any patches to the code.
> 
> If IP-address from first line is same as from second line, then
> dnsmasq refuse to assign same address to both mac1 and mac2
> addresses. Already tried that.

Even if the DHCP client provides the same CLID and IAID?
Later: OK, I saw that you can't do that.
> 
>> The way you're using the IPv4 multiple mac address feature is 
>> interesting, It was intended to work when only one interface is 
>> active at any time.
> 
> I know but, if you start thinking how "stealing" that lease work
> when both interfaces are active, then is no reason why it should
> not work (in case you have correct working DHCPv4 client).
> 
> Anyway I know lot of people who use this "multiple mac address
> feature". So it is really useful feature.
> 
>> Extending this to DHCPv6 doesn't really work, because DHCPv6
>> doesn't use the MAC address to identify interfaces, as I said in
>> my previous reply.
> 
> But dnsmasq has already support for identifying IPv6 clients via
> its mac address (in case there is no DHCPv6 relay) since commit
> 89500e3. And this my patch is working fine on my network.
> 

Dnsmasq identifies IPv6 clients via their MAC address for the purpose
of selecting dhcp-host configuration to use, but it doesn't use the
MAC address as a unique client identifier for the purpose of assigning
DHCP leases in the same way the DHCPv4 does. That's the crucial
difference.
The equivalent of the DHCPv4 share MAC address facility, should really
be something  which shares IAIDs, maybe?


The crucial thing I'm trying to achieve here is turning your patch
from something that works on your network, with your very odd
configuration, into something that other people might want and use.
Without that, it's fine as your patch, but it can't go into the
dnsmasq mainline. Maybe the way to think about that is to think about
how to document it. If we can describe what problem it solves, and how
it should be used, then we'll be getting there. We need to bear in
mind that the behaviour we're talking about violates the RFCs
specifying DHCPv6, so it has to be especially carefull justified.


Cheers,

Simon.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBCAAGBQJWn+rbAAoJEBXN2mrhkTWin0UQAJXe1gntXVKlh1yeuHn7cTqB
zoq5KriaAVVZIFSxoRRdrY31EsMg+dlnh6TE9uNyHl2PfbTk3F8cGDYviBAplQo9
moVed7fcgs/Lkb+zMnHnQCG+Z/GJk7TQ/tlBeGYcpFuPOxC+fs0ryLDNYVubvOvP
W7JldqUIFAfbRhflRvhMQwNakbHLFs/1g1Mc3rcVr0rLUOxWdpZFqaHu4jQnXDEL
s6IkICmMAdpyDrNvOX8jUr0aIKBksz4o/BbCAknLi9lqODkIvOGBpJQ5fogpz5qb
RGdvdAmuNpnuvAUpeXyJcLwx8jybf23E2WlTdx2ZbFtshYp6XWlDfbC4Y6s2cso4
MLl+hMBjkzhlt2oTU5PTrXysmlQBND3PdAJomrCrgAWykcUDT7XVaEzCJslGE0sJ
8Trbz95Vc1fZAaq6NwrhduWovgPqsLgCQlF161t9oAzavFPKIQqn4zXQWHGl3BlO
Y/Lyz8nJ20MdR9f4JShAH/g2REbB6Uutmk/W+FtDB8Ltob8azAnRNPNOaHfD4eHL
q86Bwh6ba1ThYZIa5rNkQdxbU2ZZYqUg8vaLjkwdodRhbyUYZwGIG6bkiG7Kd06h
ISHlInwdIxxasfng33Q8H/QoLFp8T7Ak1A5T5vkbiX+Yb8lmZQfh8yTNt3q7ezFw
P3bg1GjIkLlkwQXAuEYf
=ROZJ
-----END PGP SIGNATURE-----

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to