mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 05:55:28 +00:00
[5033] Added exmaple json files with dhcp-ddns, fixed copyrights
This commit is contained in:
77
doc/examples/kea4/with-ddns.json
Normal file
77
doc/examples/kea4/with-ddns.json
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
# This is an example configuration file for the DHCPv4 server in Kea.
|
||||||
|
# It is a basic scenario with one IPv4 subnet configured but with DDNS
|
||||||
|
# enabled.
|
||||||
|
|
||||||
|
{ "Dhcp4":
|
||||||
|
|
||||||
|
{
|
||||||
|
# Kea is told to listen on ethX interface only.
|
||||||
|
"interfaces-config": {
|
||||||
|
"interfaces": [ "ethX" ]
|
||||||
|
},
|
||||||
|
|
||||||
|
# We need to specify the the database used to store leases. As of
|
||||||
|
# September 2016, four database backends are supported: MySQL,
|
||||||
|
# PostgreSQL, Cassandra, and the in-memory database, Memfile.
|
||||||
|
# We'll use memfile because it doesn't require any prior set up.
|
||||||
|
"lease-database": {
|
||||||
|
"type": "memfile",
|
||||||
|
"lfc-interval": 3600
|
||||||
|
},
|
||||||
|
|
||||||
|
# Addresses will be assigned with a lifetime of 4000 seconds.
|
||||||
|
"valid-lifetime": 4000,
|
||||||
|
|
||||||
|
# Renew and rebind timers are commented out. This implies that options
|
||||||
|
# 58 and 59 will not be sent to the client. In this case it is up to
|
||||||
|
# the client to pick the timer values according to RFC2131. Uncomment the
|
||||||
|
# timers to send these options to the client.
|
||||||
|
# "renew-timer": 1000,
|
||||||
|
# "rebind-timer": 2000,
|
||||||
|
|
||||||
|
# The following list defines subnets. We have only one subnet
|
||||||
|
# here. We tell Kea that it is directly available over local interface.
|
||||||
|
"subnet4": [
|
||||||
|
{
|
||||||
|
"pools": [ { "pool": "192.0.2.1 - 192.0.2.200" } ],
|
||||||
|
"subnet": "192.0.2.0/24",
|
||||||
|
"interface": "ethX"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
# Enable dynamic DNS updates
|
||||||
|
"dhcp-ddns" : {
|
||||||
|
"enable-updates" : true,
|
||||||
|
"server-ip" : "192.0.2.0",
|
||||||
|
"server-port" : 3432,
|
||||||
|
"sender-ip" : "192.0.2.1",
|
||||||
|
"sender-port" : 3433,
|
||||||
|
"max-queue-size" : 2048,
|
||||||
|
"ncr-protocol" : "UDP",
|
||||||
|
"ncr-format" : "JSON",
|
||||||
|
"always-include-fqdn" : true,
|
||||||
|
"override-no-update" : true,
|
||||||
|
"override-client-update" : true,
|
||||||
|
"replace-client-name" : "when-present",
|
||||||
|
"generated-prefix" : "test.prefix",
|
||||||
|
"qualifying-suffix" : "test.suffix."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
# The following configures logging. It assumes that messages with at least
|
||||||
|
# informational level (info, warn, error and fatal) should be logged to stdout.
|
||||||
|
"Logging": {
|
||||||
|
"loggers": [
|
||||||
|
{
|
||||||
|
"name": "kea-dhcp4",
|
||||||
|
"output_options": [
|
||||||
|
{
|
||||||
|
"output": "stdout"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"severity": "INFO"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
81
doc/examples/kea6/with-ddns.json
Normal file
81
doc/examples/kea6/with-ddns.json
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
# This is an example configuration file for DHCPv6 server in Kea.
|
||||||
|
# It's a basic scenario with one IPv6 subnet configured. It is
|
||||||
|
# assumed that one subnet (2001:db8:1::/64 is available directly
|
||||||
|
# over ethX interface.
|
||||||
|
|
||||||
|
{ "Dhcp6":
|
||||||
|
|
||||||
|
{
|
||||||
|
# Kea is told to listen on ethX interface only.
|
||||||
|
"interfaces-config": {
|
||||||
|
"interfaces": [ "ethX" ]
|
||||||
|
},
|
||||||
|
|
||||||
|
# We need to specify the the database used to store leases. As of
|
||||||
|
# September 2016, four database backends are supported: MySQL,
|
||||||
|
# PostgreSQL, Cassandra, and the in-memory database, Memfile.
|
||||||
|
# We'll use memfile because it doesn't require any prior set up.
|
||||||
|
"lease-database": {
|
||||||
|
"type": "memfile",
|
||||||
|
"lfc-interval": 3600
|
||||||
|
},
|
||||||
|
|
||||||
|
# Addresses will be assigned with preferred and valid lifetimes
|
||||||
|
# being 3000 and 4000, respectively. Client is told to start
|
||||||
|
# renewing after 1000 seconds. If the server does not respond
|
||||||
|
# after 2000 seconds since the lease was granted, client is supposed
|
||||||
|
# to start REBIND procedure (emergency renewal that allows switching
|
||||||
|
# to a different server).
|
||||||
|
"preferred-lifetime": 3000,
|
||||||
|
"valid-lifetime": 4000,
|
||||||
|
"renew-timer": 1000,
|
||||||
|
"rebind-timer": 2000,
|
||||||
|
|
||||||
|
# The following list defines subnets. Each subnet consists of at
|
||||||
|
# least subnet and pool entries.
|
||||||
|
"subnet6": [
|
||||||
|
{
|
||||||
|
"pools": [ { "pool": "2001:db8:1::/80" } ],
|
||||||
|
"subnet": "2001:db8:1::/64",
|
||||||
|
"interface": "ethX"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
"dhcp-ddns" : {
|
||||||
|
"enable-updates" : true,
|
||||||
|
"server-ip" : "3001::1",
|
||||||
|
"server-port" : 3432,
|
||||||
|
"sender-ip" : "3001::2",
|
||||||
|
"sender-port" : 3433,
|
||||||
|
"max-queue-size" : 2048,
|
||||||
|
"ncr-protocol" : "UDP",
|
||||||
|
"ncr-format" : "JSON",
|
||||||
|
"always-include-fqdn" : true,
|
||||||
|
"override-no-update" : true,
|
||||||
|
"override-client-update" : true,
|
||||||
|
"replace-client-name" : "when-present",
|
||||||
|
"generated-prefix" : "test.prefix",
|
||||||
|
"qualifying-suffix" : "test.suffix."
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
# The following configures logging. It assumes that messages with at least
|
||||||
|
# informational level (info, warn, error and fatal) should be logged to stdout.
|
||||||
|
"Logging": {
|
||||||
|
"loggers": [
|
||||||
|
{
|
||||||
|
"name": "kea-dhcp6",
|
||||||
|
"output_options": [
|
||||||
|
{
|
||||||
|
"output": "stdout"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"debuglevel": 0,
|
||||||
|
"severity": "INFO"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC")
|
// Copyright (C) 2016-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||||
//
|
//
|
||||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC")
|
// Copyright (C) 2016-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||||
//
|
//
|
||||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC")
|
// Copyright (C) 2016-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||||
//
|
//
|
||||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -322,7 +322,8 @@ TEST(ParserTest, file) {
|
|||||||
"pgsql-reservations.json",
|
"pgsql-reservations.json",
|
||||||
"reservations.json",
|
"reservations.json",
|
||||||
"several-subnets.json",
|
"several-subnets.json",
|
||||||
"single-subnet.json" };
|
"single-subnet.json",
|
||||||
|
"with-ddns.json" };
|
||||||
|
|
||||||
for (int i = 0; i<configs.size(); i++) {
|
for (int i = 0; i<configs.size(); i++) {
|
||||||
testFile(string(CFG_EXAMPLES) + "/" + configs[i]);
|
testFile(string(CFG_EXAMPLES) + "/" + configs[i]);
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
|
// Copyright (C) 2016-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||||
//
|
//
|
||||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC")
|
// Copyright (C) 2016-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||||
//
|
//
|
||||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC")
|
// Copyright (C) 2016-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||||
//
|
//
|
||||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -241,6 +241,7 @@ TEST(ParserTest, file) {
|
|||||||
configs.push_back("several-subnets.json");
|
configs.push_back("several-subnets.json");
|
||||||
configs.push_back("simple.json");
|
configs.push_back("simple.json");
|
||||||
configs.push_back("stateless.json");
|
configs.push_back("stateless.json");
|
||||||
|
configs.push_back("with-ddns.json");
|
||||||
|
|
||||||
for (int i = 0; i<configs.size(); i++) {
|
for (int i = 0; i<configs.size(); i++) {
|
||||||
testFile(string(CFG_EXAMPLES) + "/" + configs[i], false);
|
testFile(string(CFG_EXAMPLES) + "/" + configs[i], false);
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2012-2016 Internet Systems Consortium, Inc. ("ISC")
|
// Copyright (C) 2012-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||||
//
|
//
|
||||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2014-2015 Internet Systems Consortium, Inc. ("ISC")
|
// Copyright (C) 2014-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||||
//
|
//
|
||||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
Reference in New Issue
Block a user