Skip to content

Instantly share code, notes, and snippets.

@shouhei
Created December 10, 2017 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shouhei/5d49e76e0517fa70c21baeca9d442c2d to your computer and use it in GitHub Desktop.
Save shouhei/5d49e76e0517fa70c21baeca9d442c2d to your computer and use it in GitHub Desktop.
kea dhcp with control-agent
{
"Control-agent": {
"http-host": "0.0.0.0",
"http-port": 8080,
"control-sockets": {
"dhcp4": {
"socket-type": "unix",
"socket-name": "/var/run/socket-dhcp-v4"
}
},
"hooks-libraries": []
},
"Dhcp4": {
"control-socket": {
"socket-type": "unix",
"socket-name": "/var/run/socket-dhcp-v4"
},
"interfaces-config": {
"interfaces": [
"*"
]
},
"lease-database": {
"type": "memfile",
"name": "leases4"
},
"valid-lifetime": 4000,
"subnet4": [
{
"subnet": "192.168.10.0/24",
"pools": [
{
"pool": "192.168.10.31 - 192.168.10.254"
}
]
}
]
},
"Logging": {
"loggers": [
{
"name": "kea-dhcp4",
"output_options": [
{
"output": "stdout"
}
],
"severity": "WARN"
}
]
}
}
version: "3.0"
services:
dhcp4:
image: shouhei/kea-dhcp:v1_3_0
network_mode: "host"
volumes:
- ./config.json.example:/etc/config.json
- socket:/var/run/
command: ["kea-dhcp4", "-c", "/etc/config.json"]
control-agent:
image: shouhei/kea-dhcp:v1_3_0
ports:
- "8080:8080"
volumes:
- ./config.json.example:/etc/config.json
- socket:/var/run/
command: ["kea-ctrl-agent", "-c", "/etc/config.json"]
volumes:
socket:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment