Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Sebastian Schrader
Kea
Commits
b2ba456f
Commit
b2ba456f
authored
Apr 28, 2017
by
Tomek Mrugalski
🛰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[5212] Comments # converted to //
parent
6e2b24d1
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
204 additions
and
204 deletions
+204
-204
doc/examples/kea6/backends.json
doc/examples/kea6/backends.json
+68
-68
doc/examples/kea6/classify.json
doc/examples/kea6/classify.json
+20
-20
doc/examples/kea6/duid.json
doc/examples/kea6/duid.json
+30
-30
doc/examples/kea6/leases-expiration.json
doc/examples/kea6/leases-expiration.json
+26
-26
doc/examples/kea6/mysql-reservations.json
doc/examples/kea6/mysql-reservations.json
+31
-31
doc/examples/kea6/simple.json
doc/examples/kea6/simple.json
+19
-19
doc/examples/kea6/stateless.json
doc/examples/kea6/stateless.json
+10
-10
No files found.
doc/examples/kea6/backends.json
View file @
b2ba456f
#
This
is
an
example
configuration
file
for
the
DHCPv
6
server
in
Kea.
#
It
is
a
basic
scenario
with
one
IPv
6
subnet
configured.
It
demonstrates
#
how
to
configure
Kea
to
use
various
backends
to
store
leases:
#
-
memfile
#
-
MySQL
#
-
PostgreSQL
#
-
CQL
(Cassandra)
backend
//
This
is
an
example
configuration
file
for
the
DHCPv
6
server
in
Kea.
//
It
is
a
basic
scenario
with
one
IPv
6
subnet
configured.
It
demonstrates
//
how
to
configure
Kea
to
use
various
backends
to
store
leases:
//
-
memfile
//
-
MySQL
//
-
PostgreSQL
//
-
CQL
(Cassandra)
backend
{
"Dhcp6"
:
{
#
Kea
is
told
to
listen
on
ethX
interface
only.
//
Kea
is
told
to
listen
on
ethX
interface
only.
"interfaces-config"
:
{
"interfaces"
:
[
"ethX"
]
},
#
We
need
to
specify
lease
type.
Exactly
one
lease-database
section
#
should
be
present.
Make
sure
you
uncomment
only
one.
//
We
need
to
specify
lease
type.
Exactly
one
lease-database
section
//
should
be
present.
Make
sure
you
uncomment
only
one.
#
1
.
memfile
backend.
Leases
information
will
be
stored
in
flat
CSV
file.
#
This
is
the
easiest
backend
to
use
as
it
does
not
require
any
extra
#
dependencies
or
services
running.
//
1
.
memfile
backend.
Leases
information
will
be
stored
in
flat
CSV
file.
//
This
is
the
easiest
backend
to
use
as
it
does
not
require
any
extra
//
dependencies
or
services
running.
"lease-database"
:
{
"type"
:
"memfile"
,
"persist"
:
true
,
"lfc-interval"
:
3600
},
#
2
.
MySQL
backend.
Leases
will
be
stored
in
MySQL
database.
Make
sure
it
#
is
up
,
running
and
properly
initialized.
See
kea-admin
documentation
#
for
details
on
how
to
initialize
the
database.
The
only
strictly
required
#
parameters
are
type
and
name.
If
other
parameters
are
not
specified
,
#
Kea
will
assume
the
database
is
available
on
localhost
,
that
user
and
#
password
is
not
necessary
to
connect
and
that
timeout
is
5
seconds.
#
Kea
must
be
compiled
with
--with-dhcp-mysql
option
to
use
this
backend.
#
"lease-database"
:
{
#
"type"
:
"mysql"
,
#
"name"
:
"keatest"
,
#
"host"
:
"localhost"
,
#
"port"
:
3306
,
#
"user"
:
"keatest"
,
#
"password"
:
"secret1"
,
#
"connect-timeout"
:
3
#
},
//
2
.
MySQL
backend.
Leases
will
be
stored
in
MySQL
database.
Make
sure
it
//
is
up
,
running
and
properly
initialized.
See
kea-admin
documentation
//
for
details
on
how
to
initialize
the
database.
The
only
strictly
required
//
parameters
are
type
and
name.
If
other
parameters
are
not
specified
,
//
Kea
will
assume
the
database
is
available
on
localhost
,
that
user
and
//
password
is
not
necessary
to
connect
and
that
timeout
is
5
seconds.
//
Kea
must
be
compiled
with
--with-dhcp-mysql
option
to
use
this
backend.
//
"lease-database"
:
{
//
"type"
:
"mysql"
,
//
"name"
:
"keatest"
,
//
"host"
:
"localhost"
,
//
"port"
:
3306
,
//
"user"
:
"keatest"
,
//
"password"
:
"secret1"
,
//
"connect-timeout"
:
3
//
},
#
3
.
PostgreSQL
backend.
Leases
will
be
stored
in
PostgreSQL
database.
Make
#
sure
it
is
up
,
running
and
properly
initialized.
See
kea-admin
documentation
#
for
details
on
how
to
initialize
the
database.
The
only
strictly
required
#
parameters
are
type
and
name.
If
other
parameters
are
not
specified
,
#
Kea
will
assume
the
database
is
available
on
localhost
,
that
user
and
#
password
is
not
necessary
to
connect
and
that
timeout
is
5
seconds.
#
Kea
must
be
compiled
with
--with-dhcp-pgsql
option
to
use
this
backend.
#
"lease-database"
:
{
#
"type"
:
"pgsql"
,
#
"name"
:
"keatest"
,
#
"host"
:
"localhost"
,
#
"port"
:
5432
,
#
"user"
:
"keatest"
,
#
"password"
:
"secret1"
,
#
"connect-timeout"
:
3
#
},
//
3
.
PostgreSQL
backend.
Leases
will
be
stored
in
PostgreSQL
database.
Make
//
sure
it
is
up
,
running
and
properly
initialized.
See
kea-admin
documentation
//
for
details
on
how
to
initialize
the
database.
The
only
strictly
required
//
parameters
are
type
and
name.
If
other
parameters
are
not
specified
,
//
Kea
will
assume
the
database
is
available
on
localhost
,
that
user
and
//
password
is
not
necessary
to
connect
and
that
timeout
is
5
seconds.
//
Kea
must
be
compiled
with
--with-dhcp-pgsql
option
to
use
this
backend.
//
"lease-database"
:
{
//
"type"
:
"pgsql"
,
//
"name"
:
"keatest"
,
//
"host"
:
"localhost"
,
//
"port"
:
5432
,
//
"user"
:
"keatest"
,
//
"password"
:
"secret1"
,
//
"connect-timeout"
:
3
//
},
#
4
.
CQL
(Cassandra)
backend.
Leases
will
be
stored
in
Cassandra
database.
Make
#
sure
it
is
up
,
running
and
properly
initialized.
See
kea-admin
documentation
#
for
details
on
how
to
initialize
the
database.
The
only
strictly
required
#
parameters
are
type
,
keyspace
and
contact-points.
At
least
one
contact
point
#
must
be
specified
,
but
more
than
one
is
required
for
redundancy.
Make
sure
#
you
specify
the
contact
points
without
spaces.
Kea
must
be
compiled
with
#
--with-cql
option
to
use
this
backend.
#
"lease-database"
:
{
#
"type"
:
"cql"
,
#
"keyspace"
:
"keatest"
,
#
"contact-points"
:
"192.0.2.1,192.0.2.2,192.0.2.3"
,
#
"port"
:
9042
#
},
//
4
.
CQL
(Cassandra)
backend.
Leases
will
be
stored
in
Cassandra
database.
Make
//
sure
it
is
up
,
running
and
properly
initialized.
See
kea-admin
documentation
//
for
details
on
how
to
initialize
the
database.
The
only
strictly
required
//
parameters
are
type
,
keyspace
and
contact-points.
At
least
one
contact
point
//
must
be
specified
,
but
more
than
one
is
required
for
redundancy.
Make
sure
//
you
specify
the
contact
points
without
spaces.
Kea
must
be
compiled
with
//
--with-cql
option
to
use
this
backend.
//
"lease-database"
:
{
//
"type"
:
"cql"
,
//
"keyspace"
:
"keatest"
,
//
"contact-points"
:
"192.0.2.1,192.0.2.2,192.0.2.3"
,
//
"port"
:
9042
//
},
#
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).
//
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.
//
The
following
list
defines
subnets.
Each
subnet
consists
of
at
//
least
subnet
and
pool
entries.
"subnet6"
:
[
{
"pools"
:
[
{
"pool"
:
"2001:db8:1::/80"
}
],
...
...
@@ -96,8 +96,8 @@
]
},
#
The
following
configures
logging.
It
assumes
that
messages
with
at
least
#
informational
level
(info
,
warn
,
error
and
fatal)
should
be
logged
to
stdout.
//
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"
:
[
{
...
...
doc/examples/kea6/classify.json
View file @
b2ba456f
#
This
is
an
example
configuration
file
for
the
DHCPv
4
server
in
Kea.
#
The
purpose
of
this
example
is
to
showcase
how
clients
can
be
classified.
//
This
is
an
example
configuration
file
for
the
DHCPv
4
server
in
Kea.
//
The
purpose
of
this
example
is
to
showcase
how
clients
can
be
classified.
{
"Dhcp6"
:
{
#
Kea
is
told
to
listen
on
ethX
interface
only.
//
Kea
is
told
to
listen
on
ethX
interface
only.
"interfaces-config"
:
{
"interfaces"
:
[
"ethX"
]
},
#
Let's
use
the
simplest
backend:
memfile
and
use
some
reasonable
values
#
for
timers.
They
are
of
no
concern
for
the
classification
demonstration.
//
Let's
use
the
simplest
backend:
memfile
and
use
some
reasonable
values
//
for
timers.
They
are
of
no
concern
for
the
classification
demonstration.
"lease-database"
:
{
"type"
:
"memfile"
,
"lfc-interval"
:
3600
...
...
@@ -20,11 +20,11 @@
"preferred-lifetime"
:
3000
,
"valid-lifetime"
:
4000
,
#
This
list
defines
several
classes
that
incoming
packets
can
be
assigned
to.
#
One
packet
can
belong
to
zero
or
more
classes.
//
This
list
defines
several
classes
that
incoming
packets
can
be
assigned
to.
//
One
packet
can
belong
to
zero
or
more
classes.
"client-classes"
:
[
#
The
first
class
attempts
to
match
all
packets
coming
in
on
ethX
interface.
//
The
first
class
attempts
to
match
all
packets
coming
in
on
ethX
interface.
{
"name"
:
"lab"
,
"test"
:
"pkt.iface == 'ethX'"
,
...
...
@@ -34,16 +34,16 @@
}]
},
#
Let's
classify
all
incoming
RENEW
(message
type
5
)
to
a
separate
#
class.
//
Let's
classify
all
incoming
RENEW
(message
type
5
)
to
a
separate
//
class.
{
"name"
:
"renews"
,
"test"
:
"pkt6.msgtype == 5"
},
#
Let's
pick
cable
modems.
In
this
simple
example
we'll
assume
the
device
#
is
a
cable
modem
if
it
sends
a
vendor
option
with
enterprise-id
equal
#
to
4491
.
//
Let's
pick
cable
modems.
In
this
simple
example
we'll
assume
the
device
//
is
a
cable
modem
if
it
sends
a
vendor
option
with
enterprise-id
equal
//
to
4491
.
{
"name"
:
"cable-modems"
,
"test"
:
"vendor.enterprise == 4491"
...
...
@@ -52,8 +52,8 @@
],
#
The
following
list
defines
subnets.
Each
subnet
consists
of
at
#
least
subnet
and
pool
entries.
//
The
following
list
defines
subnets.
Each
subnet
consists
of
at
//
least
subnet
and
pool
entries.
"subnet6"
:
[
{
"pools"
:
[
{
"pool"
:
"2001:db8:1::/80"
}
],
...
...
@@ -61,9 +61,9 @@
"client-class"
:
"cable-modems"
,
"interface"
:
"ethX"
},
#
The
following
subnet
contains
a
class
reservation
for
a
client
using
#
DUID
01
:
02
:
03
:
04
:
05
:
0
A:
0
B:
0
C:
0
D:
0
E.
This
client
will
always
be
assigned
#
to
this
class.
//
The
following
subnet
contains
a
class
reservation
for
a
client
using
//
DUID
01
:
02
:
03
:
04
:
05
:
0
A:
0
B:
0
C:
0
D:
0
E.
This
client
will
always
be
assigned
//
to
this
class.
{
"pools"
:
[
{
"pool"
:
"2001:db8:2::/80"
}
],
"subnet"
:
"2001:db8:2::/64"
,
...
...
@@ -77,8 +77,8 @@
]
},
#
The
following
configures
logging.
It
assumes
that
messages
with
at
least
#
informational
level
(info
,
warn
,
error
and
fatal)
should
be
logged
to
stdout.
//
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"
:
[
{
...
...
doc/examples/kea6/duid.json
View file @
b2ba456f
#
This
is
an
example
configuration
file
for
DHCPv
6
server
in
Kea.
#
It
demonstrates
how
to
configure
Kea
to
use
DUID-LLT
with
some
#
values
specified
explicitly.
//
This
is
an
example
configuration
file
for
DHCPv
6
server
in
Kea.
//
It
demonstrates
how
to
configure
Kea
to
use
DUID-LLT
with
some
//
values
specified
explicitly.
{
"Dhcp6"
:
{
#
Configure
server
identifier
(DUID-LLT).
The
hexadecimal
value
of
the
#
identifier
will
be
used
as
link
layer
address
component
of
the
DUID.
#
The
link
layer
type
will
be
ethernet.
The
value
of
time
is
set
to
0
#
which
indicates
that
the
server
must
generate
this
value
,
i.e.
use
#
current
time.
Note
that
it
is
easy
to
move
from
this
configuration
#
to
DUID-EN
or
DUID-LL.
It
would
require
changing
the
"type"
value
#
to
"EN"
or
"LL"
respectively.
The
"identifier"
would
hold
a
#
DUID-EN
variable
length
identifier
or
DUID-LL
link
layer
address.
#
The
values
of
"time"
and
"htype"
would
be
ignored
for
DUID-EN.
#
If
one
wanted
to
use
a
non-default
enterprise-id
for
DUID-EN
,
the
#
"enterprise-id"
parameter
would
need
to
be
added.
Note
that
only
#
a
"type"
parameter
is
mandatory
while
specifying
"server-id"
map.
//
Configure
server
identifier
(DUID-LLT).
The
hexadecimal
value
of
the
//
identifier
will
be
used
as
link
layer
address
component
of
the
DUID.
//
The
link
layer
type
will
be
ethernet.
The
value
of
time
is
set
to
0
//
which
indicates
that
the
server
must
generate
this
value
,
i.e.
use
//
current
time.
Note
that
it
is
easy
to
move
from
this
configuration
//
to
DUID-EN
or
DUID-LL.
It
would
require
changing
the
"type"
value
//
to
"EN"
or
"LL"
respectively.
The
"identifier"
would
hold
a
//
DUID-EN
variable
length
identifier
or
DUID-LL
link
layer
address.
//
The
values
of
"time"
and
"htype"
would
be
ignored
for
DUID-EN.
//
If
one
wanted
to
use
a
non-default
enterprise-id
for
DUID-EN
,
the
//
"enterprise-id"
parameter
would
need
to
be
added.
Note
that
only
//
a
"type"
parameter
is
mandatory
while
specifying
"server-id"
map.
"server-id"
:
{
"type"
:
"LLT"
,
"identifier"
:
"12C4D5AF870C"
,
...
...
@@ -25,33 +25,33 @@
"htype"
:
1
},
#
Kea
is
told
to
listen
on
ethX
interface
only.
//
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.
//
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).
//
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.
//
The
following
list
defines
subnets.
Each
subnet
consists
of
at
//
least
subnet
and
pool
entries.
"subnet6"
:
[
{
"pools"
:
[
{
"pool"
:
"2001:db8:1::/80"
}
],
...
...
@@ -61,8 +61,8 @@
]
},
#
The
following
configures
logging.
It
assumes
that
messages
with
at
least
#
informational
level
(info
,
warn
,
error)
will
will
be
logged
to
stdout.
//
The
following
configures
logging.
It
assumes
that
messages
with
at
least
//
informational
level
(info
,
warn
,
error)
will
will
be
logged
to
stdout.
"Logging"
:
{
"loggers"
:
[
{
...
...
doc/examples/kea6/leases-expiration.json
View file @
b2ba456f
#
This
is
an
example
configuration
file
for
DHCPv
6
server
in
Kea.
#
It
provides
parameters
controlling
processing
of
expired
leases,
#
a.k.a.
leases
reclamation.
//
This
is
an
example
configuration
file
for
DHCPv
6
server
in
Kea.
//
It
provides
parameters
controlling
processing
of
expired
leases,
//
a.k.a.
leases
reclamation.
{
"Dhcp6"
:
{
#
Kea
is
told
to
listen
on
ethX
interface
only.
//
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.
//
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
},
#
The
following
parameters
control
processing
expired
leases.
Expired
leases
#
will
be
reclaimed
periodically
according
to
the
"reclaim-timer-wait-time"
#
parameter.
Reclaimed
leases
will
be
held
in
the
database
for
1800
s
to
#
facilitate
lease
affinity.
After
this
period
the
leases
will
be
removed.
#
The
frequency
of
removal
is
controlled
by
the
"flush-reclaimed-timer-wait-time"
#
parameter.
The
lease
reclamation
routine
will
process
at
most
500
leases
#
or
will
last
for
at
most
100
ms
,
during
a
single
run.
If
there
are
still
#
some
unreclaimed
leases
after
10
attempts
,
a
warning
message
is
issued.
//
The
following
parameters
control
processing
expired
leases.
Expired
leases
//
will
be
reclaimed
periodically
according
to
the
"reclaim-timer-wait-time"
//
parameter.
Reclaimed
leases
will
be
held
in
the
database
for
1800
s
to
//
facilitate
lease
affinity.
After
this
period
the
leases
will
be
removed.
//
The
frequency
of
removal
is
controlled
by
the
"flush-reclaimed-timer-wait-time"
//
parameter.
The
lease
reclamation
routine
will
process
at
most
500
leases
//
or
will
last
for
at
most
100
ms
,
during
a
single
run.
If
there
are
still
//
some
unreclaimed
leases
after
10
attempts
,
a
warning
message
is
issued.
"expired-leases-processing"
:
{
"reclaim-timer-wait-time"
:
5
,
"hold-reclaimed-time"
:
1800
,
...
...
@@ -36,19 +36,19 @@
"unwarned-reclaim-cycles"
:
10
},
#
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).
//
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.
//
The
following
list
defines
subnets.
Each
subnet
consists
of
at
//
least
subnet
and
pool
entries.
"subnet6"
:
[
{
"pools"
:
[
{
"pool"
:
"2001:db8:1::/80"
}
],
...
...
@@ -58,8 +58,8 @@
]
},
#
The
following
configures
logging.
It
assumes
that
messages
with
at
least
#
informational
level
(info
,
warn
,
error
and
fatal)
should
be
logged
to
stdout.
//
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"
:
[
{
...
...
doc/examples/kea6/mysql-reservations.json
View file @
b2ba456f
#
This
is
an
example
configuration
file
for
the
DHCPv
6
server
in
Kea.
#
It
contains
configuration
of
the
MySQL
host
database
backend,
used
#
to
retrieve
reserved
addresses,
host
names,
DHCPv
4
message
fields
#
and
DHCP
options
from
MySQL
database.
//
This
is
an
example
configuration
file
for
the
DHCPv
6
server
in
Kea.
//
It
contains
configuration
of
the
MySQL
host
database
backend,
used
//
to
retrieve
reserved
addresses,
host
names,
DHCPv
4
message
fields
//
and
DHCP
options
from
MySQL
database.
{
"Dhcp6"
:
{
#
Kea
is
told
to
listen
on
ethX
interface
only.
//
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.
//
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
},
#
This
is
pretty
basic
stuff
,
it
has
nothing
to
do
with
reservations.
//
This
is
pretty
basic
stuff
,
it
has
nothing
to
do
with
reservations.
"preferred-lifetime"
:
3000
,
"valid-lifetime"
:
4000
,
"renew-timer"
:
1000
,
"rebind-timer"
:
2000
,
#
Kea
supports
two
types
of
identifiers
in
DHCPv
6
:
hw-address
(hardware/MAC
address
#
of
the
client)
and
duid
(DUID
inserted
by
the
client).
When
told
to
do
so
,
Kea
can
#
check
for
each
of
these
identifier
types
,
but
it
takes
a
costly
database
lookup
#
to
do
so.
It
is
therefore
useful
from
a
performance
perspective
to
use
only
#
the
reservation
types
that
are
actually
used
in
a
given
network.
//
Kea
supports
two
types
of
identifiers
in
DHCPv
6
:
hw-address
(hardware/MAC
address
//
of
the
client)
and
duid
(DUID
inserted
by
the
client).
When
told
to
do
so
,
Kea
can
//
check
for
each
of
these
identifier
types
,
but
it
takes
a
costly
database
lookup
//
to
do
so.
It
is
therefore
useful
from
a
performance
perspective
to
use
only
//
the
reservation
types
that
are
actually
used
in
a
given
network.
"host-reservation-identifiers"
:
[
"duid"
,
"hw-address"
],
#
Specify
connection
to
the
database
holding
host
reservations.
The
type
#
specifies
that
the
MySQL
database
is
used.
user
and
password
are
the
#
credentials
used
to
connect
to
the
database.
host
and
name
specify
#
location
of
the
host
where
the
database
instance
is
running
,
and
the
#
name
of
the
database
to
use.
The
server
processing
a
packet
will
first
#
check
if
there
are
any
reservations
specified
for
this
client
in
the
#
reservations
list
,
within
the
subnet
(configuration
file).
If
there
are
#
no
reservations
there
,
the
server
will
try
to
retrieve
reservations
#
from
this
database.
//
Specify
connection
to
the
database
holding
host
reservations.
The
type
//
specifies
that
the
MySQL
database
is
used.
user
and
password
are
the
//
credentials
used
to
connect
to
the
database.
host
and
name
specify
//
location
of
the
host
where
the
database
instance
is
running
,
and
the
//
name
of
the
database
to
use.
The
server
processing
a
packet
will
first
//
check
if
there
are
any
reservations
specified
for
this
client
in
the
//
reservations
list
,
within
the
subnet
(configuration
file).
If
there
are
//
no
reservations
there
,
the
server
will
try
to
retrieve
reservations
//
from
this
database.
"hosts-database"
:
{
"type"
:
"mysql"
,
"name"
:
"kea"
,
...
...
@@ -51,11 +51,11 @@
"readonly"
:
true
},
#
Define
a
subnet
with
a
pool
of
dynamic
addresses
and
a
pool
of
dynamic
#
prefixes.
Addresses
and
prefixes
from
those
pools
will
be
assigned
to
#
clients
which
don't
have
reservations
in
the
database.
Subnet
identifier
#
is
equal
to
1
.
If
this
subnet
is
selected
for
the
client
,
this
subnet
#
id
will
be
used
to
search
for
the
reservations
within
the
database.
//
Define
a
subnet
with
a
pool
of
dynamic
addresses
and
a
pool
of
dynamic
//
prefixes.
Addresses
and
prefixes
from
those
pools
will
be
assigned
to
//
clients
which
don't
have
reservations
in
the
database.
Subnet
identifier
//
is
equal
to
1
.
If
this
subnet
is
selected
for
the
client
,
this
subnet