Gratis · Redes e infraestructura TI
Generador de configuración DHCP.
Genere la configuración de un servidor DHCPv4 para Kea, ISC dhcpd, dnsmasq, Windows Server y MikroTik, con rangos, opciones y reservas.
Windows Server rejects the 2 reservation(s) outside 192.168.10.100 – 192.168.10.199; widen the scope and add an exclusion range instead.
- 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.21Windows 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.
Cómo usar esta herramienta: Generador de configuración DHCP
Introduce los datos o selecciona el archivo. Ajusta las opciones, genera el resultado y revísalo antes de copiarlo o descargarlo.
Límites y formatos compatibles
Los datos se procesan en tu dispositivo.
Notas técnicas en inglés
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.
Addresses, MACs and options are validated once, then written in each server’s syntax. MAC addresses are normalised to the separator each product expects.
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.