[Bug Report] key conflict message for create host by Omapi

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

[Bug Report] key conflict message for create host by Omapi

Clodoaldo de Borba Lambiase

Hi,

I'm trying to enable duplicate MACs in different subnets for ISC DHCP- 4.3.3 with OMAPI host entries. I would like to have two IPs with the same MAC address in different subnets.

 

First IP address: 10.0.244.2 (subnet 10.0.244.0)

Second IP address: 10.0.246.2 (subnet 10.0.246.0)

 

Subnets are set in "dhcpd.subnets" file included by dhcpd.conf file. Below are the two subnets related with each ip address.

 

vi /etc/dhcp3/dhcpd.subnets

shared-network enfermagem {

    # Enfermagem - Campus Saúde

    subnet 10.0.246.0 netmask 255.255.255.0 {

        option domain-name-servers 10.0.2.165,10.0.2.166;

        option routers 10.0.246.1;

        default-lease-time 1209600;

        option domain-name "ufrgs.br";

    }

}

shared-network bioquimica {

    # Bioquimica - Campus Saúde

    subnet 10.0.244.0 netmask 255.255.255.0 {

       default-lease-time 1209600;

        option domain-name-servers 10.0.1.52,10.0.1.53;

        option routers 10.0.244.1;

        option domain-name "bioquimica.ufrgs.br";

    }

}

 

After the commands below in OMSHELL, I have received an error message called "key conflict". This error occurs because MAC Address is equal.

 

However, as far as I know, this restriction applies only for IPs within the same subnet, and identical MACs are allowed for different IPs in different subnets. Am I right?

 

DHCP SERVER CONFIGURATIONS

      1.  The specific operating system name and version of the

        machine on which the DHCP server or client is running.

clodoaldo@nac:~/Scripts$ lsb_release -a

LSB Version:    core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:core-4.1-amd64:core-4.1-noarch:security-4.0-amd64:security-4.0-noarch:security-4.1-amd64:security-4.1-noarch

Distributor ID: Ubuntu

Description:    Ubuntu 14.04.2 LTS

Release:        14.04

Codename:       trusty

      4.  The specific version of the DHCP distribution you're

        running, as reported by dhcpd -t.

clodoaldo@nac:~/Scripts$ dhcpd -t

Internet Systems Consortium DHCP Server 4.3.3

Copyright 2004-2015 Internet Systems Consortium.

All rights reserved.

For info, please visit https://www.isc.org/software/dhcp/

Warning: subnet 10.0.0.0/24 overlaps subnet 10.0.0.0/24

Config file: /etc/dhcpd.conf

Database file: /var/db/dhcpd.leases

PID file: /var/run/dhcpd.pid

 

OMSHELL COMMANDS

[hidden email] /usr/local/sbin/dhcpd -cf /etc/dhcpd.conf -lf /var/db/dhcpd.leases -pf eth0

Internet Systems Consortium DHCP Server 4.3.3

Copyright 2004-2015 Internet Systems Consortium.

All rights reserved.

For info, please visit https://www.isc.org/software/dhcp/

Warning: subnet 10.0.0.0/24 overlaps subnet 10.0.0.0/24

Config file: /etc/dhcpd.conf

Database file: /var/db/dhcpd.leases

PID file: eth0

Wrote 0 leases to leases file.

Listening on LPF/eth1/7a:7b:0c:e0:29:83/Backup

Sending on   LPF/eth1/7a:7b:0c:e0:29:83/Backup

Listening on LPF/eth0/c2:3f:b8:f9:84:2f/dc-dev

Sending on   LPF/eth0/c2:3f:b8:f9:84:2f/dc-dev

Sending on   Socket/fallback/fallback-net

failover peer failover-litoral: I move from recover to startup

failover peer failover-ceclimar: I move from recover to startup

failover peer failover-centro: I move from recover to startup

failover peer failover-vale: I move from recover to startup

failover peer failover-saude: I move from recover to startup

[hidden email] ps xa | grep dhcpd

29150 ?        Ss     0:00 /usr/local/sbin/dhcpd -cf /etc/dhcpd.conf -lf /var/db/dhcpd.leases -pf eth0

29209 pts/0    S+     0:00 grep --color=auto dhcpd

[hidden email] omshell

> server localhost

> connect

obj: <null>

> new host

obj: host

> set

usage: set <name> = <value>

obj: host

> name=10.0.244.2

<STDIN> line 1: unknown token: name

name=

^

obj: host

> set name=10.0.244.2

obj: host

name = 8f:36:f4:02

> set name="10.0.244.2"

obj: host

name = "10.0.244.2"

> set hardware-type=1

obj: host

name = "10.0.244.2"

hardware-type = 1

> set hardware-address=d6:37:64:30:39:3e

obj: host

name = "10.0.244.2"

hardware-type = 1

hardware-address = d6:37:64:30:39:3e

> set ip-address=10.0.244.2

obj: host

name = "10.0.244.2"

hardware-type = 1

hardware-address = d6:37:64:30:39:3e

ip-address = 8f:36:f4:02

> create

obj: host

name = "10.0.244.2"

hardware-type = 00:00:00:01

hardware-address = d6:37:64:30:39:3e

ip-address = "10.0.244.2"

> new host

an object is already open.

obj: host

name = "10.0.244.2"

hardware-type = 00:00:00:01

hardware-address = d6:37:64:30:39:3e

ip-address = "10.0.244.2"

> close

obj: <null>

> new host

obj: host

> set name="10.0.246.2"

obj: host

name = "10.0.246.2"

> set hardware-type=1

obj: host

name = "10.0.246.2"

hardware-type = 1

> hardware-address=d6:37:64:30:39:3e

<STDIN> line 1: unknown token: hardware-address

hardware-address=

^

obj: host

name = "10.0.246.2"

hardware-type = 1

> set hardware-address=d6:37:64:30:39:3e

obj: host

name = "10.0.246.2"

hardware-type = 1

hardware-address = d6:37:64:30:39:3e

> set ip-address=10.0.246.2

obj: host

name = "10.0.246.2"

hardware-type = 1

hardware-address = d6:37:64:30:39:3e

ip-address = 8f:36:f6:02

> create

can't open object: key conflict

obj: host

name = "10.0.246.2"

hardware-type = 1

hardware-address = d6:37:64:30:39:3e

ip-address = 8f:36:f6:02

 

 

Regards,

Eng. Clodoaldo Lambiase


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

dhcpd.conf (7K) Download Attachment
dhcpd.leases (3K) Download Attachment
dhcpd.subnets (78K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Bug Report] key conflict message for create host by Omapi

Muhammad Faisal
Hi Clodoaldo,
The DHCP experts might explain this but what about arp resolution within the server ? The MAC address is a unique identifier so if your deployment is getting two IP for the same MAC how the conflict will resolve?
 
Regards, Muhammad Faisal.


From: Clodoaldo de Borba Lambiase <[hidden email]>
To: "[hidden email]" <[hidden email]>
Sent: Thursday, October 29, 2015 12:28 AM
Subject: [Bug Report] key conflict message for create host by Omapi

Hi,
I'm trying to enable duplicate MACs in different subnets for ISC DHCP- 4.3.3 with OMAPI host entries. I would like to have two IPs with the same MAC address in different subnets.
 
First IP address: 10.0.244.2 (subnet 10.0.244.0)
Second IP address: 10.0.246.2 (subnet 10.0.246.0)
 
Subnets are set in "dhcpd.subnets" file included by dhcpd.conf file. Below are the two subnets related with each ip address.
 
vi /etc/dhcp3/dhcpd.subnets
shared-network enfermagem {
    # Enfermagem - Campus Saúde
    subnet 10.0.246.0 netmask 255.255.255.0 {
        option domain-name-servers 10.0.2.165,10.0.2.166;
        option routers 10.0.246.1;
        default-lease-time 1209600;
        option domain-name "ufrgs.br";
    }
}
shared-network bioquimica {
    # Bioquimica - Campus Saúde
    subnet 10.0.244.0 netmask 255.255.255.0 {
       default-lease-time 1209600;
        option domain-name-servers 10.0.1.52,10.0.1.53;
        option routers 10.0.244.1;
        option domain-name "bioquimica.ufrgs.br";
    }
}
 
After the commands below in OMSHELL, I have received an error message called "key conflict". This error occurs because MAC Address is equal.
 
However, as far as I know, this restriction applies only for IPs within the same subnet, and identical MACs are allowed for different IPs in different subnets. Am I right?
 
DHCP SERVER CONFIGURATIONS
      1.  The specific operating system name and version of the
        machine on which the DHCP server or client is running.
clodoaldo@nac:~/Scripts$ lsb_release -a
LSB Version:    core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:core-4.1-amd64:core-4.1-noarch:security-4.0-amd64:security-4.0-noarch:security-4.1-amd64:security-4.1-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.2 LTS
Release:        14.04
Codename:       trusty
      4.  The specific version of the DHCP distribution you're
        running, as reported by dhcpd -t.
clodoaldo@nac:~/Scripts$ dhcpd -t
Internet Systems Consortium DHCP Server 4.3.3
Copyright 2004-2015 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Warning: subnet 10.0.0.0/24 overlaps subnet 10.0.0.0/24
Config file: /etc/dhcpd.conf
Database file: /var/db/dhcpd.leases
PID file: /var/run/dhcpd.pid
 
OMSHELL COMMANDS
[hidden email] /usr/local/sbin/dhcpd -cf /etc/dhcpd.conf -lf /var/db/dhcpd.leases -pf eth0
Internet Systems Consortium DHCP Server 4.3.3
Copyright 2004-2015 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Warning: subnet 10.0.0.0/24 overlaps subnet 10.0.0.0/24
Config file: /etc/dhcpd.conf
Database file: /var/db/dhcpd.leases
PID file: eth0
Wrote 0 leases to leases file.
Listening on LPF/eth1/7a:7b:0c:e0:29:83/Backup
Sending on   LPF/eth1/7a:7b:0c:e0:29:83/Backup
Listening on LPF/eth0/c2:3f:b8:f9:84:2f/dc-dev
Sending on   LPF/eth0/c2:3f:b8:f9:84:2f/dc-dev
Sending on   Socket/fallback/fallback-net
failover peer failover-litoral: I move from recover to startup
failover peer failover-ceclimar: I move from recover to startup
failover peer failover-centro: I move from recover to startup
failover peer failover-vale: I move from recover to startup
failover peer failover-saude: I move from recover to startup
[hidden email] ps xa | grep dhcpd
29150 ?        Ss     0:00 /usr/local/sbin/dhcpd -cf /etc/dhcpd.conf -lf /var/db/dhcpd.leases -pf eth0
29209 pts/0    S+     0:00 grep --color=auto dhcpd
> server localhost
> connect
obj: <null>
> new host
obj: host
> set
usage: set <name> = <value>
obj: host
> name=10.0.244.2
<STDIN> line 1: unknown token: name
name=
^
obj: host
> set name=10.0.244.2
obj: host
name = 8f:36:f4:02
> set name="10.0.244.2"
obj: host
name = "10.0.244.2"
> set hardware-type=1
obj: host
name = "10.0.244.2"
hardware-type = 1
> set hardware-address=d6:37:64:30:39:3e
obj: host
name = "10.0.244.2"
hardware-type = 1
hardware-address = d6:37:64:30:39:3e
> set ip-address=10.0.244.2
obj: host
name = "10.0.244.2"
hardware-type = 1
hardware-address = d6:37:64:30:39:3e
ip-address = 8f:36:f4:02
> create
obj: host
name = "10.0.244.2"
hardware-type = 00:00:00:01
hardware-address = d6:37:64:30:39:3e
ip-address = "10.0.244.2"
> new host
an object is already open.
obj: host
name = "10.0.244.2"
hardware-type = 00:00:00:01
hardware-address = d6:37:64:30:39:3e
ip-address = "10.0.244.2"
> close
obj: <null>
> new host
obj: host
> set name="10.0.246.2"
obj: host
name = "10.0.246.2"
> set hardware-type=1
obj: host
name = "10.0.246.2"
hardware-type = 1
> hardware-address=d6:37:64:30:39:3e
<STDIN> line 1: unknown token: hardware-address
hardware-address=
^
obj: host
name = "10.0.246.2"
hardware-type = 1
> set hardware-address=d6:37:64:30:39:3e
obj: host
name = "10.0.246.2"
hardware-type = 1
hardware-address = d6:37:64:30:39:3e
> set ip-address=10.0.246.2
obj: host
name = "10.0.246.2"
hardware-type = 1
hardware-address = d6:37:64:30:39:3e
ip-address = 8f:36:f6:02
> create
can't open object: key conflict
obj: host
name = "10.0.246.2"
hardware-type = 1
hardware-address = d6:37:64:30:39:3e
ip-address = 8f:36:f6:02
 
 
Regards,
Eng. Clodoaldo Lambiase

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


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: [Bug Report] key conflict message for create host by Omapi

Simon Hobson
Muhammad Faisal <[hidden email]> wrote:

> The DHCP experts might explain this but what about arp resolution within the server ? The MAC address is a unique identifier so if your deployment is getting two IP for the same MAC how the conflict will resolve?

The assumption is that the client won't be in two places at once - so wherever it is located at any point in time, ARP will work fine and there's no conflict.

However, a device with a single MAC address can have two IP addresses - and that'll work fine. Also, though I *REALLY* do not recommend this, you can have two clients with the same MAC address in different networks (in different collision domains) and IP addressing will work fine - ARP resolution within each network will work fine, the MAC address only needs to be unique within one collision domain*.

As far as the DHCP server is concerned, it'll quite happily lease different addresses to the "same client" in different networks. You can see this if you (for example) plug a computer into one network, let it get an address, then pull the network cable (so it can't release the lease). When you plug it into another network, it'll get another address - but the first lease is still current.

* Amusing story.
Our local LUG used to meet in a university facility. They bought a truckload of new computers, and had "strange" network problems with a few computers. Eventually they pinned it down to MAC addresses - the manufacturer had a bug in their addressing code, and duplicated one address in every 257 machines ! This hadn't shown up before since it is only a problem if those 2 machines in each set of 257 are on the same network - and even buying 300+ machines wouldn't guarantee that you got consecutive MAC addresses.

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: [Bug Report] key conflict message for create host by Omapi

John Wobus

On Oct 29, 2015, at 7:47 AM, Simon Hobson <[hidden email]> wrote:

> Muhammad Faisal <[hidden email]> wrote:
>
>> The DHCP experts might explain this but what about arp resolution within the server ? The MAC address is a unique identifier so if your deployment is getting two IP for the same MAC how the conflict will resolve?
>
> The assumption is that the client won't be in two places at once - so wherever it is located at any point in time, ARP will work fine and there's no conflict.
>
> However, a device with a single MAC address can have two IP addresses - and that'll work fine. Also, though I *REALLY* do not recommend this, you can have two clients with the same MAC address in different networks (in different collision domains) and IP addressing will work fine - ARP resolution within each network will work fine, the MAC address only needs to be unique within one collision domain*.

And if the DHCP protocol or server were not to handle this, a client could DOS another
client using the same DHCP server, even on a separate subnet, simply by using the victim's
MAC address.

As far as I know, ISC dhcpd serves DHCP for identical MAC addresses on different subnets,
except for configuring it via the OMAPI interface.  It seems reasonable that dhcpd support
such configuration but I don’t know where that potential enhancement falls on ISC’s priority list.

John Wobus
Cornell U IT
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

[Bug Report] key conflict message for create host by Omapi

Clodoaldo de Borba Lambiase
In reply to this post by Clodoaldo de Borba Lambiase
Hi,

I already have tested two differents IP entries for the same MAC address in dhcpd.conf. It works fine and it proves that ISC DHCP supports this behaviour.

However, two omapi entries with the same MAC address, even if the IPs are in different networks, doesn't work (like I have described at the first topic).

Main problem is the distinct behaviour applied by ISC-DHCP to 'host' entries by omapi or by dhcpd.conf. I think the result should be the same for both cases.
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users