PasteZap
🌐 English
Free · No account

FREE · NETWORK & IT INFRASTRUCTURE

DHCP Config Generator.

Generate DHCPv4 server configuration for Kea, ISC dhcpd, dnsmasq, Windows Server and MikroTik, with pools, options and reservations.

Limits & supported formats

DHCPv4 only; no failover, relay or DHCPv6 settings. Reservation rules differ: Windows needs them inside the scope, others prefer them outside the pool. Everything is calculated in your browser; nothing is sent or probed on the network.

CALCULATED IN YOUR BROWSER · NOTHING IS UPLOADED
Reservations
Addresses in the pool100192.168.10.100 – 192.168.10.199
Subnet
192.168.10.0/24 (255.255.255.0)
Gateway
192.168.10.1
Usable addresses outside the pool
154
Lease time
1d

Kea DHCPv4 (kea-dhcp4.conf)

{
  "Dhcp4": {
    "interfaces-config": {
      "interfaces": [
        "eth0"
      ]
    },
    "lease-database": {
      "type": "memfile",
      "persist": true,
      "name": "/var/lib/kea/kea-leases4.csv"
    },
    "valid-lifetime": 86400,
    "max-valid-lifetime": 172800,
    "subnet4": [
      {
        "id": 1,
        "subnet": "192.168.10.0/24",
        "pools": [
          {
            "pool": "192.168.10.100 - 192.168.10.199"
          }
        ],
        "option-data": [
          {
            "name": "routers",
            "data": "192.168.10.1"
          },
          {
            "name": "domain-name-servers",
            "data": "192.168.10.1"
          },
          {
            "name": "domain-name",
            "data": "office.lan"
          }
        ],
        "reservations": [
          {
            "hw-address": "00:1b:63:84:45:e6",
            "ip-address": "192.168.10.20",
            "hostname": "printer"
          },
          {
            "hw-address": "3c:52:82:0a:11:7f",
            "ip-address": "192.168.10.21",
            "hostname": "nas"
          }
        ]
      }
    ]
  }
}

ISC DHCP (dhcpd.conf)

# ISC DHCP (dhcpd.conf). ISC DHCP reached end of life in 2022; Kea is its successor.
option domain-name "office.lan";
option domain-name-servers 192.168.10.1;
default-lease-time 86400;
max-lease-time 172800;
authoritative;

subnet 192.168.10.0 netmask 255.255.255.0 {
  range 192.168.10.100 192.168.10.199;
  option routers 192.168.10.1;
  option broadcast-address 192.168.10.255;
}

host printer {
  hardware ethernet 00:1b:63:84:45:e6;
  fixed-address 192.168.10.20;
}

host nas {
  hardware ethernet 3c:52:82:0a:11:7f;
  fixed-address 192.168.10.21;
}

dnsmasq

interface=eth0
dhcp-range=192.168.10.100,192.168.10.199,255.255.255.0,86400
dhcp-option=option:router,192.168.10.1
dhcp-option=option:dns-server,192.168.10.1
domain=office.lan
dhcp-host=00:1b:63:84:45:e6,printer,192.168.10.20
dhcp-host=3c:52:82:0a:11:7f,nas,192.168.10.21

Windows Server (PowerShell)

Add-DhcpServerv4Scope -Name "192.168.10.0/24" -StartRange 192.168.10.100 -EndRange 192.168.10.199 -SubnetMask 255.255.255.0 -LeaseDuration (New-TimeSpan -Seconds 86400) -State Active
Set-DhcpServerv4OptionValue -ScopeId 192.168.10.0 -Router 192.168.10.1 -DnsServer 192.168.10.1 -DnsDomain "office.lan"
Add-DhcpServerv4Reservation -ScopeId 192.168.10.0 -IPAddress 192.168.10.20 -ClientId "00-1b-63-84-45-e6" -Name "printer"
Add-DhcpServerv4Reservation -ScopeId 192.168.10.0 -IPAddress 192.168.10.21 -ClientId "3c-52-82-0a-11-7f" -Name "nas"

MikroTik RouterOS

/ip pool
add name=pool-eth0 ranges=192.168.10.100-192.168.10.199
/ip dhcp-server
add name=dhcp-eth0 interface=eth0 address-pool=pool-eth0 lease-time=1d
/ip dhcp-server network
add address=192.168.10.0/24 gateway=192.168.10.1 dns-server=192.168.10.1 domain=office.lan
/ip dhcp-server lease
add address=192.168.10.20 mac-address=00:1B:63:84:45:E6 server=dhcp-eth0 comment=printer
add address=192.168.10.21 mac-address=3C:52:82:0A:11:7F server=dhcp-eth0 comment=nas
  • Run only one DHCP server per network segment unless you configure failover.
  • Validate before restarting: kea-dhcp4 -t, dhcpd -t, dnsmasq --test.

How to use DHCP Config Generator

Enter the subnet, pool, gateway, DNS servers, domain and lease time, add MAC reservations, then copy or download the format you use.

How it works

Addresses, MACs and options are validated once, then written in each server’s syntax. MAC addresses are normalised to the separator each product expects.

Example

192.168.10.0/24 with pool .100–.199, gateway .1 and two reservations produces matching kea-dhcp4.conf, dhcpd.conf, dnsmasq, PowerShell and RouterOS files.

Questions about DHCP Config Generator

Is DHCP Config Generator free, and do I need an account?

Yes. This tool is free to use in your browser without an account. Processing takes place on your device.

What are the limits and what should I check?

DHCPv4 only; no failover, relay or DHCPv6 settings. Reservation rules differ: Windows needs them inside the scope, others prefer them outside the pool. Everything is calculated in your browser; nothing is sent or probed on the network. Review the result before using it in your work.

Is my input sent to a server?

Your input is processed in your browser and is not uploaded by this tool. Files and pasted text are cleared when the page is refreshed. Normal website requests are still required to load the page and its libraries. Read the privacy explanation.