Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
d7114906
Commit
d7114906
authored
Jan 12, 2017
by
Thomas Markwalder
Browse files
[5033] Added exmaple json files with dhcp-ddns, fixed copyrights
parent
9b20235e
Changes
10
Hide whitespace changes
Inline
Side-by-side
doc/examples/kea4/with-ddns.json
0 → 100644
View file @
d7114906
#
This
is
an
example
configuration
file
for
the
DHCPv
4
server
in
Kea.
#
It
is
a
basic
scenario
with
one
IPv
4
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
RFC
2131
.
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"
}
]
}
}
doc/examples/kea6/with-ddns.json
0 → 100644
View file @
d7114906
#
This
is
an
example
configuration
file
for
DHCPv
6
server
in
Kea.
#
It's
a
basic
scenario
with
one
IPv
6
subnet
configured.
It
is
#
assumed
that
one
subnet
(
2001
:db
8
:
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"
}
]
}
}
src/bin/dhcp4/simple_parser4.cc
View file @
d7114906
// 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
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
src/bin/dhcp4/simple_parser4.h
View file @
d7114906
// 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
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
src/bin/dhcp4/tests/parser_unittest.cc
View file @
d7114906
// 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
// 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"
,
"reservations.json"
,
"several-subnets.json"
,
"single-subnet.json"
};
"single-subnet.json"
,
"with-ddns.json"
};
for
(
int
i
=
0
;
i
<
configs
.
size
();
i
++
)
{
testFile
(
string
(
CFG_EXAMPLES
)
+
"/"
+
configs
[
i
]);
...
...
src/bin/dhcp6/simple_parser6.cc
View file @
d7114906
// 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
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
src/bin/dhcp6/simple_parser6.h
View file @
d7114906
// 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
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
src/bin/dhcp6/tests/parser_unittest.cc
View file @
d7114906
// 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
// 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
(
"simple.json"
);
configs
.
push_back
(
"stateless.json"
);
configs
.
push_back
(
"with-ddns.json"
);
for
(
int
i
=
0
;
i
<
configs
.
size
();
i
++
)
{
testFile
(
string
(
CFG_EXAMPLES
)
+
"/"
+
configs
[
i
],
false
);
...
...
src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc
View file @
d7114906
// Copyright (C) 2012-201
6
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2012-201
7
Internet Systems Consortium, Inc. ("ISC")
//
// 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
...
...
src/lib/dhcpsrv/tests/srv_config_unittest.cc
View file @
d7114906
// Copyright (C) 2014-201
5
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2014-201
7
Internet Systems Consortium, Inc. ("ISC")
//
// 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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment