I'm moving my DHCP services from CentOS to OpenBSD. The OpenBSD dhcpd
service appears to work perfectly during testing, but I want to confirm
a few things:

1. In the dhcpd.conf on CentOS, the host definitions with fixed-address
set for static IPs need to be excluded from the range statement for
the subnet they are in. Is this the case for OpenBSD's dhcpd?

2. How do I move the dhcpd.leases database from CentOS to OpenBSD?
I've parsed the existing CentOS file to pull out the leases, starts,
end, hardware ethernet, and client-hostname lines, but the uid line is
very different in CentOS's dhcpd vs OpenBSD's. Can I just create new uid's
in the format that the dhcpd on OpenBSD uses based on the MAC address?

Thank you in advance!

dhcpd.conf:
default-lease-time 604800;              # 7 days (604800 seconds)
max-lease-time 604800;
option domain-name "mydomain.com";
option domain-name-servers 10.0.0.5, 10.0.0.6;

shared-network mydomain.com-vlan20 {
    default-lease-time 345600;      # 4 days (345600 seconds)
    subnet 10.20.20.0 netmask 255.255.255.0 {
            option subnet-mask 255.255.255.0;
            option broadcast-address 10.20.20.255;
            option routers 10.20.20.1;
            range 10.20.20.50 10.20.20.200;
            host bob { hardware ethernet aa:bb:02:7e:2c:92;
               fixed-address 10.20.20.131;
               option host-name "bob.static.mydomain.com"; }
            host roger { hardware ethernet cc:d3:d1:a6:38:b9;
               fixed-address 10.20.20.143; 
               option host-name "roger.static.mydomain.com"; }
            host mary { hardware ethernet d0:11:e2:26:55:91;
               fixed-address 10.20.20.158; 
               option host-name "mary.static.mydomain.com"; }
            host steve { hardware ethernet 34:1f:d9:83:3d:a5; 
               fixed-address 10.20.20.159; 
               option host-name "steve.static.mydomain.com"; }
    }
}

shared-network mydomain.com {
    subnet 10.0.0.0 netmask 255.255.255.0 {
            option subnet-mask 255.255.255.0;
            option broadcast-address 10.0.0.255;
            option routers 10.0.0.1;
            range 10.0.0.50 10.0.0.200;
    }
}

shared-network mydomain.com-vlan10 {
    option domain-name "test.mydomain.com";
    option domain-name-servers 10.10.10.5, 10.10.10.6;
    subnet 10.10.10.0 netmask 255.255.255.0 {
            option subnet-mask 255.255.255.0;
            option broadcast-address 10.10.10.255;
            option routers 10.10.10.1;
            range 10.10.10.50 10.10.10.99;
    }
}

Reply via email to