Skip to content

Reservation

The Reservation object provides permanent DHCP IP address assignments in DRP. Unlike dynamic Lease allocations from a subnet pool, a Reservation creates a fixed binding between a client identity Token (determined by the Strategy, currently MAC address) and a specific IP address (Addr). This ensures that a particular device always receives the same address.

A Reservation can optionally be bound to a specific Subnet via the Scoped flag, which ties the reservation to the subnet that contains its address. When scoped, the reservation inherits default options from its subnet. When unscoped, the reservation can operate independently of any subnet, though it must then specify its own netmask (DHCP option 1) at minimum. Reservations carry their own list of DHCP Option entries and a NextServer address that override or augment whatever the parent subnet provides.

Several fields support advanced use cases. The Duration field overrides the subnet's default reserved lease time. The Allocated flag marks the reservation as reapable, used by automated allocation workflows. The Machine field associates the reservation with a specific Machine object, and when Parameter or PrefixParameter are set, the assigned address is automatically stored back into the machine's parameters. The SkipDAD flag disables duplicate address detection via ping during DHCP discovery, which can speed up address assignment in environments where conflicts are impossible.

Reservations are what the DRP DHCP service uses to ensure that an IP address is always issued to the same device.

Fields

Field Definition
Addr Addr is the IP address permanently assigned to the strategy/token combination.

required: true
swagger:strfmt ipv4
Allocated Allocated indicates this is a reapable reservation
Description Description is a string for providing a simple description
Documentation Documentation is a string for providing additional in depth information.
Duration Duration is the time in seconds for which a lease can be valid.
ExpireTime is calculated from Duration.
Machine Machine is the associated machine
Meta Meta contains the meta data of the object.

The type of this field is a key / value map/dictionary.
The key type is string.
The value type is also string.

The general content of the field is undefined and can be an arbritary store.
There are some common known keys:

color - The color the UX uses when displaying
icon - The icon the UX uses when displaying
* title - The UX uses this for additional display information. Often the source of the object.

Specific Object types use additional meta data fields. These are described at:
https://docs.rackn.io/stable/redirect/?ref=rs_object_metadata
NextServer NextServer is the address the server should contact next. You
should only set this if you want to talk to a DHCP or TFTP server
other than the one provided by dr-provision.

required: false
swagger:strfmt ipv4
Options Options is the list of DHCP options that apply to this Reservation
Options/Code Code is a DHCP Option Code.

required: true
Options/Value Value is a text/template that will be expanded
and then converted into the proper format
for the option code

required: true
Parameter Parameter is the parameter that this address should be stored in for the machine if specified
Params Params holds the values of parameters on the object.

The field is a key / value store of the parameters.
The key is the name of a parameter. The key is of type string.
The value is the value of the parameter. The type of the value is defined
by the parameter object. If the key doesn't reference a parameter, the
type of the object can be anything.

The system will enforce the named parameter's value's type.

Go calls the "anything" parameters as "interface {}". Hence, the type
of this field is a map[string]interface{}.
PrefixParameter PrefixParameter a string that should be the beginning of a set of option-based parameters
Profiles Profiles is an array of profiles to apply to this object in order when looking
for a parameter during rendering.
Scoped Scoped indicates that this reservation is tied to a particular Subnet,
as determined by the reservation's Addr.

required: true
SkipDAD SkipDAD will cause the DHCP server to skip duplicate address detection via ping testing
when in discovery phase. Only set this if you know this reservation can never conflict
with any other system.
Strategy Strategy is the leasing strategy that will be used determine what to use from
the DHCP packet to handle lease management.

required: true
Subnet Subnet is the name of the Subnet that this Reservation is associated with.
This property is read-only.
Token Token is the unique identifier that the strategy for this Reservation should use.

required: true

Note

If you create a static reservation, DRP will always respond to the request even if the subnet is disabled.

Note

If the reservation and its subnet, if present, define both option 12 and option 15, this will be used to find a matching DNS Zone for automatic A and PTR record creation.