qDHCPv4 is DHCPv4 server for public places that use unmanaged switches.
- Dynamically assigned lease time based on schedule (time points when all users must free or extend their lease). Useful for preventing exhaustion of free leases on public places.
- User Classes / Subnets based on
Host Name
(DHCP Option #12).
- Full High Super+ Speed (as USB). Generate 41 Mbps
offer
/ACK
flood by incoming 74 MbpsDiscover
/Request
flood. - Goes beyond the RFC scope. You can see clear logic in one of first commits.
- Need only 34 GiB virtual memory to run (on 64bit systems).
- Doesn't require permanent data storage.
- Code-style:
JavaScript <-> Go <-> C
.
For Windows 64bit download, unpack and run:
qDHCPv4.exe -conf=<path to config.json>
For other systems: compile binary go get
go build
.
See example_config.json.
Transmitted options to DHCP client. List of all options and descriptions: dhcpd options, DHCP and BOOTP parameters, dhcpd options RU, DHCP options in JSON. Example:
"globalOptions":{
"ServerIdentifier": "194.188.64.28",
"SubnetMask": "255.255.0.0",
"Router": ["194.188.64.8"],
"DomainNameServer": ["194.188.64.8"]
}
Time when all clients must renew the lease. Format hh:mm
.
Example:
"leaseEndTime":[
"11:35",
"12:50",
"17:23"
]
Define user Classes / Subnets based on first two chars from Host Name
(DHCP Option #12).
Parameters:
- name - first two chars from
Host Name
(android-a70378b9bf61c919
->an
;iPhone-Jon
,iPad-Jon
->iP
;Windows-Phone
->Wi
) - startIP - first client IP in this scope (Class / Subnet)
- rangeIP - count of all IP's in this scope (Class / Subnet) Example:
"devices":[
{"name": "an", "startIP": "194.188.36.1", "rangeIP": 1024},
{"name": "iP", "startIP": "194.188.40.1", "rangeIP": 1024},
{"name": "Wi", "startIP": "194.188.44.1", "rangeIP": 1024}
]
startIP
and rangeIP
for all other devices.
"defaultDevice":{"startIP": "194.188.32.1", "rangeIP": 1024}