Skip to content
This repository has been archived by the owner on Oct 20, 2018. It is now read-only.
/ qDHCPv4 Public archive

Fast multi-platform DHCP Server for public places (written in Go)

License

Notifications You must be signed in to change notification settings

ZiroKyl/qDHCPv4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The qDHCPv4 server

qDHCPv4 is DHCPv4 server for public places that use unmanaged switches.

Features

  • 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).

< sarcasm /> :-)

  • Full High Super+ Speed (as USB). Generate 41 Mbps offer / ACK flood by incoming 74 Mbps Discover / 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.

Usage

For Windows 64bit download, unpack and run:

qDHCPv4.exe -conf=<path to config.json>

For other systems: compile binary go get go build.

Documentation

LeaseEndTime scheduler logic

LeaseEndTime

LeaseEndTime 3 user example

LeaseEndTime

Config file

See example_config.json.

globalOptions

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"]
	}

leaseEndTime

Time when all clients must renew the lease. Format hh:mm. Example:

"leaseEndTime":[
	"11:35",
    "12:50",
    "17:23"
]

devices

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}
]

defaultDevice

startIP and rangeIP for all other devices.

"defaultDevice":{"startIP": "194.188.32.1", "rangeIP": 1024}

About

Fast multi-platform DHCP Server for public places (written in Go)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages