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