To define the IPAM / DHCP tree for an ip-plan, the table
NMS.Dhcp_tree must be created and filled. since this table is a “custom” table, it is for the customer to maintain it. Common SQL management tools can be used to create the tables and maintain them.
The credentials to access the netYCE databases with read-write permissions:
The credentials to access the netYCE databases with read-only permissions:
The 'root' user and password is generally not shared with customers, but for the purpose of creating and modifying tables in the NMS database a customer-specific 'root-like' user can be created on request.
Three tables are required for the Infoblox DHCP / IPAM functionality that all reside in the
Dhcp_tree table contains a tree definition per ip-plan. Each row in the table defines a container, network or scope and has columns that define its attributes and position in the hierarchy. It is maintained manually by the application manager.
Dhcp_history table contains the XML definition of a full supernet as it was last successfully used in an IPAM/DHCP create or update. It is used as a shadow administration of the Infoblox IPAM supernet configuration. This is a necessity because the Infoblox API is too slow to extract all relevant information in order to locate the differences between the life IPAM and the generated IPAM. This table is fully maintained by the NetYCE Infoblox integration module.
Dhcp_clients table contains many variables that are assigned in the various DHCP scopes and networks that are specific to a Client. Per ClientCode one row is added manually by the application manager.
BASE TABLE: NMS.Dhcp_tree
CREATE TABLE `NMS`.`Dhcp_tree` ( `Dhcp_id` INT(11) NOT NULL AUTO_INCREMENT, `Plan_id` INT(11) NOT NULL DEFAULT '0', `Net_name` VARCHAR(20) DEFAULT '', `Net_offset` VARCHAR(20) DEFAULT '', `Net_mask` VARCHAR(20) DEFAULT '', `Net_size` INT(11) DEFAULT '24', `Net_tier` INT(11) NOT NULL DEFAULT '1', `Net_type` VARCHAR(20) DEFAULT '', `Net_index` INT(11) DEFAULT '0', `Scope_start` VARCHAR(20) DEFAULT '', `Scope_end` VARCHAR(20) DEFAULT '', `Dhcp_options` VARCHAR(50) DEFAULT '', `Features` VARCHAR(200) DEFAULT '', `Net_remark` VARCHAR(100) DEFAULT '', `Timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`Dhcp_id`), KEY `Net_index` (`Plan_id`,`Net_name`,`Net_index`), KEY `Net_name` (`Plan_id`,`Net_name`) ) ENGINE=MyISAM AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8
BASE TABLE: NMS.Dhcp_history
CREATE TABLE `NMS`.`Dhcp_history` ( `Supernet` VARCHAR(20) NOT NULL DEFAULT '', `Xml_data` longtext, `Timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`Supernet`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
BASE TABLE: NMS.Dhcp_clients
CREATE TABLE `NMS`.`Dhcp_clients` ( `ClientCode` VARCHAR(30) NOT NULL DEFAULT '', `Lease_time` INT(11) NOT NULL DEFAULT '0', `Ddns_enable` INT(11) NOT NULL DEFAULT '0', `Dhcpsrv1_feature` VARCHAR(20) DEFAULT '', `Dhcpsrv2_feature` VARCHAR(20) DEFAULT '', `Domain1_feature` VARCHAR(50) DEFAULT '', `Domain2_feature` VARCHAR(50) DEFAULT '', `Domain3_feature` VARCHAR(50) DEFAULT '', `Lease1_feature` INT(11) NOT NULL DEFAULT '0', `Lease2_feature` INT(11) NOT NULL DEFAULT '0', `Dns_pri` VARCHAR(20) DEFAULT '', `Dns_sec` VARCHAR(20) DEFAULT '', `Dns_tert` VARCHAR(20) DEFAULT '', `Wins_pri` VARCHAR(20) DEFAULT '', `Wins_sec` VARCHAR(20) DEFAULT '', `Timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`ClientCode`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
In an IPAM/DHCP tree three types of objects are used to build a structured, hierarchical representation of an ip-space called supernet. The tree consists of “containers”, “networks” and “scopes”.
The “containers” serve no technical purpose but provide an elegant way to group network and scope objects. They are created to provide aggregation and therefore have an prefix and netmask.
The “networks” form the actual IPAM ip-space allocation and are identical to subnets. They are the purpose of the IPAM. Multiple networks are usually grouped in a container'.
The “scopes” objects form the DHCP ranges and are associated with a “network”. Multiple scopes can exist in a network.
The definition of a IPAM/DHCP tree is closely related to the definition of an IP-plan. The tree is structured around the subnets defined in the supernet's ip-plan. Where the ip-plan laid down the “networks”, the IPAM tree will envelop them in appropriate hierarchical containers and add the scopes where desired.
Along with structuring the ip-plan's supernet, the tree will therefore add the DHCP scopes and assign the DHCP options. These DHCP options can be assigned to both networks and scopes since Infoblox allows inheritance of most options.
To represent the hierarchy of each object in the tree, a “tier” is used. The supernet itself always has tier
0 assigned. For each level deeper the tier is increased by one. So a container grouping for example all 'user' subnets has tier
1 and those 'user' networks have tier
2. Any scopes for those 'user' subnets have tier
3 and so on. The tree can co as deep as circumstances demand.
To allow supernets to be grouped the tier can also be made negative - but only for “containers”. A tier of
-1 groups a certain level of aggregation of supernets in a container, which might itself be grouped in a higher level of aggregation using a container of level
The example below shows how a simple tree is created using two groups of subnets, 'Users' and 'IPT'. The containers of the 'users' and the 'IPT' uses a /21 aggregation but start at different offsets from the starting-address of the supernet.
In the example above, the
scope object types did not have their network offset or prefixes defined in the tree. But they do have an
This “index” is what links the network object to the subnet of the ip-plan. Where the network name and index of the tree and ip-plan match, these details become automatically available for the tree.
The example tree above was built around this (partial) ip-plan.
The tree can have subnets and scopes defined that are not part of the ip-plan. But then these details need to be added to the tree. Likewise, the tree does not need to have to include all subnets in the ip-plan. As in the case of a large range of Loopback /32 “subnets”, the IPAM is better served with a container or a single aggregation subnet for all the loopbacks.
The definition of the DHCP scopes is not complete until the dhcp range is added. The offsets for the first and the last ip-address of each scope must be added. Their values must reside within the subnet itself. If more than one scope is added to a subnet, their ranges may not overlap.
If the Scope_start or Scope_end is missing default values will be calculated. The default Scope_start is
0.0.0.2. The default Scope_end is calculated by subtracting 2 addresses from the network range.
The final part of the tree definition is the assignment of the required DHCP options and their values. This is a complex topic in itself, requiring a separate article.
See the detailed article on DHCP options configuration