DHCPv6 database
The db_filev6.dhcpo database is used to track clients and addresses and for access control.
Options are also stored in the database for retrieval and delivery to clients. The database is implemented as a dynamically-loadable object.
Using the information in the configuration file, the database is primed and verified for consistency. The database also contains the address and option pools
The main storage file and its back up are ASCII files. The format
for the database main storage files are as follows:
Note: Do not manually
edit these files.
DB6-1.0
Client-Info {
duid 1-0006085b68e20004ace491d3
state 7
authinfo {
protocol 2
algorithm 1
rdm 0
replay 1206567640
}
Interface 0 {
Inoptions {
interface-id "en1"
policies 2
maxopcode 16
numiana 1
Ianalist {
option 3 40 00000001000000320000005000050018deaddeadaaaaaaaa000000000000000600000064000000c8
}
numiata 0
Optiontable {
option 6 10 00030004001700180237
option 8 2 e659
option 15 14 000369626d000373756e00026870
option 16 18 000004d2000730783131313131000369626d
}
}
Ianarec {
IAID 1
t1 50
t2 80
Addrec {
Address dead:dead:aaaa:aaaa::6
state 3
starttime 1087592918
preferred-lifetime 100
valid-lifetime 200
}
}
}
}
The first line is a version identifier for the file:
DB6-1.0
.
The lines that follow are client record definition lines. The server
reads from the second line to the end of the file. (The parameters
in quotes must be enclosed in quotes.) - duid
- The ID the client uses to represent itself to the server.
- Interface
- A client can have multiple interfaces. If a client has a single interface and creates individual SOLICIT messages for each IA_NA or IA_TA, the file will contain multiple interfaces for this client.
- Inoptions
- The incoming options from the client.
- policies
- Flag to identify unicast, reconfig-option, and rapid-commit.
- maxopcode
- The largest option code.
- numiana
- The number of IA_NAs for this interface.
- Ianalist
- The list of IA_NA options incoming from the client.
- numiata
- Number of IA_TAs for this interface.
- Optiontable
- The list of options requested by the client excluding the IA_NA and IA_TA options.
- Ianarec
- The saved IA_NA record container from the server database.
- IAID
- The ID of the IA_NA.
- t1
- The preferred-lifetime percent for this IA_NA.
- t2
- The valid-lifetime percent for this IA_NA.
- Addrec
- The address record container from the server database.
- Address
- Address given to the client for this address record.
- state
- The current state of the client. The DHCP protocol engine
contains the allowable set, and the states are maintained in the DHCP database.
The number next to state represents its value.
The states can be:
- (1) FREE
- Represents addresses that are available for use. In general, clients
do not have this state unless they have no address assigned. The dadmin and lssrc commands
report this state as
Free
. - (2) BOUND
- Indicates client and address are tied and that the client has
been assigned this address for some amount of time. The dadmin and lssrc commands
report this state as
Leased
. - (3) EXPIRED
- Indicates the client and address are tied together, but only for
informational purposes, in a similar manner to released addresses.
The expired state, however, represents clients that let their leases
expire. An expired address is available for use and is reassigned
after all free addresses are unavailable and before released addresses
are reassigned. The dadmin and lssrc commands
report this state as
Expired
. - (4) RELEASED
- Indicates the client and address are tied for informational purposes
only. The DHCP protocol suggests that DHCP servers maintain
information about the clients it has served for future reference (mainly
to try giving the same address to that client that has been assigned
that address in the past). This state indicates that the client has
released the address. The address is available for use by other clients,
if no other addresses are available. The dadmin and lssrc commands
report this state as
Released
. - (5) RESERVED
- Indicates client and address are tied, but loosely. The client
has issued a DHCP discover message and the DHCP server
has responded, but the client has not yet responded with a DHCP request
for that address. The dadmin and lssrc commands
report this state as
Reserved
. - (6) BAD
- Represents an address that is in use in the network but has not
been handed out by the DHCP server. This state also represents
addresses that clients have rejected. This state does not apply to
clients. The dadmin command reports this state
as
Used
, and the lssrc command reports this stateBad
.
- Starttime
- The time that this address was handed out, represented as seconds since January 1, 2000.
- preferred-lifetime
- Number in seconds before this address needs to be renewed.
- valid-lifetime
- Number in seconds before this address becomes invalid and can no longer be used.
- protocol
- The authentication protocol the client is using:
- (1) DELAYED
- The client is using delayed authentication.
- (2) RECONFIGURE KEY
- The client is using reconfigure key authentication.
- algorithm
- The authentication algorithm the client is using:
- (1) HMAC-MD5
- The client is using the keyed MD5 algorithm to create the message digest.
- rdm
- The replay detection method the client is using:
- (0) Monotonically increasing counter
- The client is using a monotonically increasing counter to modify the replay value.
- replay
- The current value of the replay field.
The syntax for the checkpoint files is not specified. If the server
crashes or you have to shut down and cannot do a normal closing of
the database, the server can process the checkpoint and backup files
to reconstruct a valid database. Any client not written to the checkpoint
file when the server crashes is lost. Currently, there are no intermittent
saves when a client is processed. The default files are:
- /etc/dhcpv6/db_file6.cr
- Normal database operation
- /etc/dhcpv6/db_file6.crbk
- Backups for the database