[Kea-users] IP reservation for multiple MAC addresses

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

[Kea-users] IP reservation for multiple MAC addresses

Robin Daermann
Dear all,

I would like to make host reservations for multiple MAC addresses that share a single IP(v4) address, for example:

             {
                "hw-address": "00:15:e9:7c:56:8e",
                "ip-address": "172.16.1.13"
             },
             {
                "hw-address": "00:15:e9:7c:56:8f",
                "ip-address": "172.16.1.13"
             },

Unfortunately, this is not possible. I get the following message:

   DHCP4_CONFIG_LOAD_FAIL configuration error using file: /usr/local/etc/kea/kea-dhcp4.conf, reason: failed to add new host using the HW address '00:15:e9:7c:56:8f and DUID '(null)' to the IPv4 subnet id '3' for the address 172.16.1.13: There's already a reservation for this address

That was/is possible in the ISC DHCPD.

Is there a specific reason for that behaviour? And can I change it in any way? Or is my config simply wrong?

Kind regards,

Robin Därmann
(Network Operation Center RUB)

--
| Robin Därmann                             Network Operation Center |
| RS18625-RIPE                              Ruhr-Universitaet Bochum |
| You always meet twice in a lifetime...                             |

_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

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

Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users

smime.p7s (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] IP reservation for multiple MAC addresses

Marcin Romanowski


wt., 1 wrz 2020 o 20:02 Robin Daermann <[hidden email]> napisał(a):
Dear all,

I would like to make host reservations for multiple MAC addresses that share a single IP(v4) address, for example:

             {
                "hw-address": "00:15:e9:7c:56:8e",
                "ip-address": "172.16.1.13"
             },
             {
                "hw-address": "00:15:e9:7c:56:8f",
                "ip-address": "172.16.1.13"
             },

Unfortunately, this is not possible. I get the following message:

   DHCP4_CONFIG_LOAD_FAIL configuration error using file: /usr/local/etc/kea/kea-dhcp4.conf, reason: failed to add new host using the HW address '00:15:e9:7c:56:8f and DUID '(null)' to the IPv4 subnet id '3' for the address 172.16.1.13: There's already a reservation for this address

That was/is possible in the ISC DHCPD.


Do you think that is correct? There shouldn't be / it can't be two the same ip address in the same network, this is ip conflicts and L3 wont work correctly.

Opposite situation where you share the same mac but with different ip could be considered as correct.


 

Is there a specific reason for that behaviour? And can I change it in any way? Or is my config simply wrong?

Kind regards,

Robin Därmann
(Network Operation Center RUB)

--
| Robin Därmann                             Network Operation Center |
| RS18625-RIPE                              Ruhr-Universitaet Bochum |
| You always meet twice in a lifetime...                             |
_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

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

Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users


--
Marcin Romanowski / nicraM



_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

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

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] IP reservation for multiple MAC addresses

Robin Daermann
Hi,

On Tue, Sep 01, 2020 at 08:11:21PM +0200, Marcin Romanowski wrote:
>Do you think that is correct? There shouldn't be / it can't be two the same
>ip address in the same network, this is ip conflicts and L3 wont work
>correctly.
>
>Opposite situation where you share the same mac but with different ip could
>be considered as correct.

Yes it is correct. Imagine for example having laptops with USB-C
Ethernet Adapters/port-replicators/docks. Each adapter has its own MAC
address and only one of them is used at a time. Due to obscure reasons,
some users are dependent on specific IP addresses and would like to get
them assigned independently of their Ethernet adapter.

I know that we could use other criteria such as DUID for assignment but
that is not an option because it has other disadvantages for us (i.e.
they tend to change when reinstalling the OS or for other reasons).

I wonder if it is possible when using a MySQL database for host
reservations. Will try some things tomorrow...

Btw: I am using Kea 1.6.3 on FreeBSD 12.1.

Regards,

Robin Därmann
(Network Operation Center RUB)

--
| Robin Därmann                             Network Operation Center |
| RS18625-RIPE                              Ruhr-Universitaet Bochum |
| You always meet twice in a lifetime...                             |

_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

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

Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users

smime.p7s (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] IP reservation for multiple MAC addresses

Marcin Romanowski

wt., 1 wrz 2020 o 20:52 Robin Daermann <[hidden email]> napisał(a):
Hi,

On Tue, Sep 01, 2020 at 08:11:21PM +0200, Marcin Romanowski wrote:
>Do you think that is correct? There shouldn't be / it can't be two the same
>ip address in the same network, this is ip conflicts and L3 wont work
>correctly.
>
>Opposite situation where you share the same mac but with different ip could
>be considered as correct.

Yes it is correct. Imagine for example having laptops with USB-C
Ethernet Adapters/port-replicators/docks. Each adapter has its own MAC
address and only one of them is used at a time. Due to obscure reasons,
some users are dependent on specific IP addresses and would like to get
them assigned independently of their Ethernet adapter.


No this configuration is still incorrect. From network engineer perspective that configuration assumes that could be one ip address with different mac addresses at the same time. This is a network issue. Don't do that.

If you want to share the same ip address with different devices consider using option 82 and assign addresses based on port.

you also can make user class with test where you provide your mac addresses as key and assign that class to reserved ip address. I've never do that way, but could work.

 

I know that we could use other criteria such as DUID for assignment but
that is not an option because it has other disadvantages for us (i.e.
they tend to change when reinstalling the OS or for other reasons).

I wonder if it is possible when using a MySQL database for host
reservations. Will try some things tomorrow...

Btw: I am using Kea 1.6.3 on FreeBSD 12.1.

Regards,

Robin Därmann
(Network Operation Center RUB)

--
| Robin Därmann                             Network Operation Center |
| RS18625-RIPE                              Ruhr-Universitaet Bochum |
| You always meet twice in a lifetime...                             |
_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

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

Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users


--
Marcin Romanowski / nicraM



_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

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

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] IP reservation for multiple MAC addresses

Francis Dupont
In reply to this post by Robin Daermann
Robin Daermann writes:
> I wonder if it is possible when using a MySQL database for host
> reservations. Will try some things tomorrow...

=> key_dhcp4_ipv4_address_subnet_id is created by UNIQUE INDEX so
as the comment says:
# Create index to search for reservations using IP address and subnet id.
# This unique index guarantees that there is only one occurrence of the
# particular IPv4 address for a given subnet.

Regards

Francis Dupont <[hidden email]>
_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

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

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] IP reservation for multiple MAC addresses

Sten Carlsen
This used to work some years ago, I used it to allow me to switch from a cable to wifi connection and vice versa without breaking the connection and stop e.g. a download operation.

It worked perfectly. I believe I had two host statements with fixed addresses.

It was years ago, I have not tried for at least 10 years.

-- 
Best regards 
Sten Carlsen 


For every problem, there is a solution that
is simple, elegant, and wrong.
HL Mencken


On 1 Sep 2020, at 23.57, Francis Dupont <[hidden email]> wrote:

Robin Daermann writes:
I wonder if it is possible when using a MySQL database for host
reservations. Will try some things tomorrow...

=> key_dhcp4_ipv4_address_subnet_id is created by UNIQUE INDEX so
as the comment says:
# Create index to search for reservations using IP address and subnet id.
# This unique index guarantees that there is only one occurrence of the
# particular IPv4 address for a given subnet.

Regards

Francis Dupont <[hidden email]>
_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

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

Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users


_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

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

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] IP reservation for multiple MAC addresses

Robin Daermann
In reply to this post by Marcin Romanowski
Hi,

On Tue, Sep 01, 2020 at 09:02:27PM +0200, Marcin Romanowski wrote:
>No this configuration is still incorrect. From network engineer perspective
>that configuration assumes that could be one ip address with different mac
>addresses at the same time. This is a network issue. Don't do that.

I know that, I'm the network engineer. But there are lots of other
reasons for duplicate IP addresses, so I would not bother for this
additional one, given the fact that it is much easier to generate
duplicate IP addresses when setting them up manually instead of using
DHCP for it.

We also have a bunch of switch stacks that need DHCP. They often come up
with different stack master and therefore different MAC address, so this
feature would help us a lot. Sure, it's just like a "bug fix" for
vendors not being able to handle out consistent MAC addresses from their
switch stacks but unfortunately we have to work with it.

>If you want to share the same ip address with different devices consider
>using option 82 and assign addresses based on port.

We can't do that.

>you also can make user class with test where you provide your mac addresses
>as key and assign that class to reserved ip address. I've never do that
>way, but could work.

I will test that in the next days.

Best regards,

Robin Därmann
(Network Operation Center RUB)

--
| Robin Därmann                             Network Operation Center |
| RS18625-RIPE @ RUB8-RIPE                  Ruhr-Universitaet Bochum |
| You always meet twice in a lifetime...                             |
_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

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

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] IP reservation for multiple MAC addresses

Oswald
Hi Robin,

Not recommended and not tested - but it might work in your situation.

 "Dhcp4": {
   "client-classes": [ {
      "name": "Stack"
   },  ],

   "reservations": [ {
      "client-classes": ["Stack"],
      "hw-address": 00:15:e9:7c:56:8e", }
   {
   "client-classes": ["Stack"],
   "hw-address": 00:15:e9:7c:56:8e"
   } ],

   "subnet4": [ {
       "subnet": "172.16.1.0"/24"
       "reservation-mode": "global",
       "pools": [ {
          "pool": "172.16.1.13-172.16.1.13"
          "client-class": "Stack"
      }],
   } ],
}

Peter

On 03/09/2020 16:58, Robin Daermann wrote:

> Hi,
>
> On Tue, Sep 01, 2020 at 09:02:27PM +0200, Marcin Romanowski wrote:
>> No this configuration is still incorrect. From network engineer
>> perspective
>> that configuration assumes that could be one ip address with
>> different mac
>> addresses at the same time. This is a network issue. Don't do that.
>
> I know that, I'm the network engineer. But there are lots of other
> reasons for duplicate IP addresses, so I would not bother for this
> additional one, given the fact that it is much easier to generate
> duplicate IP addresses when setting them up manually instead of using
> DHCP for it.
>
> We also have a bunch of switch stacks that need DHCP. They often come up
> with different stack master and therefore different MAC address, so this
> feature would help us a lot. Sure, it's just like a "bug fix" for
> vendors not being able to handle out consistent MAC addresses from their
> switch stacks but unfortunately we have to work with it.
>
>> If you want to share the same ip address with different devices consider
>> using option 82 and assign addresses based on port.
>
> We can't do that.
>
>> you also can make user class with test where you provide your mac
>> addresses
>> as key and assign that class to reserved ip address. I've never do that
>> way, but could work.
>
> I will test that in the next days.
>
> Best regards,
>
> Robin Därmann
> (Network Operation Center RUB)
>
_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

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

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] IP reservation for multiple MAC addresses

Robin Daermann
Hi Oswald,

thank you for the example!

On Thu, Sep 03, 2020 at 07:44:08PM +0200, Oswald wrote:
>Not recommended and not tested - but it might work in your situation.
[...]

This configuration really works:

   "client-classes": [
       { "name": "class_172.30.1.11" }
   ],
   "reservations": [
       {
           "hostname": "kea-testclient-1",
           "hw-address": "d6:ed:a0:39:77:b4",
           "client-classes": [ "class_172.30.1.11" ]
       },
       {
           "hostname": "kea-testclient-2",
           "hw-address": "b2:e3:07:74:b9:24",
           "client-classes": [ "class_172.30.1.11" ]
       }
   ],
   "shared-networks": [
       {
          "name": "Vlan364",
          "subnet4": [
             {
                "id": 364,
                "pools": [
                   {
                      "pool": "172.30.1.11 - 172.30.1.11",
                      "client-class": "class_172.30.1.11"
                   }
                ],
                "reservation-mode": "global",
                "subnet": "172.30.1.0/24"
             }
          ]
       }

We will have to implement some more logic into our config generating
scripts but I am sure that it will work for us in the end.

Best regards,

Robin Därmann
(Network Operation Center RUB)

--
| Robin Därmann                             Network Operation Center |
| RS18625-RIPE                              Ruhr-Universitaet Bochum |
| You always meet twice in a lifetime...                             |

_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

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

Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users

smime.p7s (6K) Download Attachment