User Tools

Site Tools


guides:reference:infoblox:plugin_infoblox_dns

Infoblox DNS API plugin

This functionality is dependent on the Infoblox license key.

Based on the original NetYCE - Infoblox integration module, a new API plugin module has been developed. The new module XML payload differs only in details, bit offers greatly more control over the Infoblox objects being created.

Identified by the new set of requirements and the original hard-coded validations, an extensive set of customizable policies have been defined to control the process further.

The assignment of Infoblox Extensible-attibutes is fully supported.

Integration configuration

The Infoblox integration is setup using the configuration file “YCE Infoblox integration” available through the “Admin - System - Edit configs” tool and uses the file /opt/yce/etc/<hostname>_dhcp.conf.

This configuration file defines:

  • GridMaster ip-address
  • userid of the Infoblox functional user
  • password of the functional user
  • the default view name
  • the default custom DHCP option space name
  • the Vip-addresses of the GridMembers for HK's and BK's

Transaction types

This module supports the following request types:

RequestPurpose
Add_hostCreate a DNS Host-record or A-record using a fixed ip-address, or finds a free address given a set of IPAM subnets. Optionally creates Host-aliases or Cnames. Ip-address migration is supported using add_host
Clear_hostRemove a Host-record or A-record from the DNS. For Host records, a specific ip-address can be removed too. Optionally removes any Cnames where the fqdn is used a the canonical
Clear_ipRemoves Host-records, A-records or Cnames from the DNS using or is a canonical to a given ip-address.
Set_hostUpdate attributes of an existing Host, A-record or Cname. Supported attributes are 'comment', 'disable', 'ttl' and 'extensible_attributes'
Add_aliasCreate one or more Host-aliases or Cnames for an existing Host-record or A-record
Clear_aliasRemove one or more Host-aliases from a Host-record or Cnames using the canonical fqdn
Show_hostReturns the current settings and attributes of an existing Host-record, A-record or Cname
Show_subnetReturns the current set of settings and attributes of an IPAM subnet, including a list of its addresses and their DNS or DHCP allocation
Subnet_reportReturns a full IPAM export of all subnets and their attributes
Host_reportReturns a full DNS report, cross-referenced with IPAM subnets and ip-addresses for Host-records, A-records and Cnames
Dns_reportIs an alternate name to the 'host_report' request
Subnet_reportReturns a full IPAM export of all subnets and their attributes
Extattr_reportReturns all Extensible Attributes with their definitions as defined on the Gridmaster
Add_static_dhcpAdds a new static dhcp
Clear_static_dhcpClears a static dhcp

Add_host

Add Host or A-record with optional aliases (as Cnames) using predetermined or hunted ip-address

There are several variations of this request. The basic request specifies a new DNS hostname and zone (domain), the record type and a pre-determined address.

<task response="">
  <head
        passwd="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
        task_name="infoblox_dns"
        task_type="xml-request"
        userid="loginid"
  />
  <request action_type="add_host">
    <host
        host_domain="some.domain.name"
        host_name="new-hostname"
        record_type="host"
        comment="RFC C000123001"
       >
       <ipv4_addr>10.33.44.10/25</ipv4_addr>
    </host>
  </request>
</task>

An extensive version adds some returned logging, a series of extensible-attributes to be defined for this record, and two aliases to be created too. The type of aliases (host or cname) depends on policy settings.

<task response="">
  <head
        passwd="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
        task_name="infoblox_dns"
        task_type="xml-request"
        userid="loginid"
        log_level="1"
  />
  <request action_type="add_host">
    <host
        host_domain="some.domain.name"
        host_name="new-hostname"
        record_type="host"
        comment="RFC C000123002"
       >
        <ext_attr rfc="T000123" />
        <ext_attr srv="DSN002078" />
        <ext_attr site="ASD-NY01" />
        <ext_attr ReferenceCode="ASD-DC" />
        <ext_attr building="across the street" />
        <ext_attr NetworkEnv="Ota" />
       <ipv4_addr>10.33.43.10/25</ipv4_addr>
       <alias>new-hostname-ref.some.domain.name</alias>
       <alias>alternate-name.another.domain.name</alias>
    </host>
  </request>
</task>

And as another example, a basic A-record is created where the ip-address will be allocated from the first free address in a set of subnets.

<task response="">
  <head
        passwd="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
        task_name="infoblox_dns"
        task_type="xml-request"
        userid="loginid"
  />
  <request action_type="add_host">
    <host
        host_domain="some.domain.name"
        host_name="new-hostname"
        record_type="arec"
        comment="RFC T000123003"
       >
       <subnet_addr>10.66.77.0/25</subnet_addr>
       <subnet_addr>10.66.77.0/28</subnet_addr>
    </host>
  </request>
</task>
IP-migration

The Add_host call can be used to migrate the ip-address of an existing Host-record or A-record by setting the optional attribute new_ip_addr=“yes”. When set yo “yes”, it will determine the new ip-address from the ipv4_addr=“..” attribute or from the subnet_addr=“..”, identical to the regular Add_host call. Only the validation of the fqdn is reversed: with the new_ip_addr=“yes” the fqdn must exist as the record type specified, when new_ip_addr=“no” the fqdn may not exist.

This example also demonstrates the use of the attributes disable and ttl.

<task response="">
  <head
        passwd="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
        task_name="infoblox_dns"
        task_type="xml-request"
        userid="loginid"
        log_level="1"
  />
  <request action_type="add_host">
    <host
        host_domain="some.domain.name"
        host_name="existing-hostname"
        record_type="host"
        new_ip_addr="yes"
        comment="RFC T000123004"
        disable="no"
        ttl="500"
       >
       <ext_attr
           rfc="T000123004"
       />
       <ipv4_addr>10.66.44.12/25</ipv4_addr>
    </host>
  </request>
</task>
Views

The Infoblox environment uses names to identify IPAM-views and DNS-views. The DNS-views are hierarchically associated with the IPAM-view. The IPAM-view contains the ipv4 and ipv6 subnet definitions that may be used in that view, the DNS-views associated with an IPAM-view contain the DNS domain-names that can be used.

Any Infoblox DNS operation needs to have both views specified and must match their association. For both views defaults are defined in the NetYCE configuration file etc/<server>_dhcp.conf, the same file that has the Infoblox GridMaster address and credentials.

When not using the default views, they can be specified using the ipam_view and dns_view attributes.

<task>
  <head
        passwd="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
        task_name="infoblox_dns"
        task_type="xml-request"
        userid="loginid"
        log_level="1"
  />
  <request action_type="add_host">
    <host
        host_domain="acme.com"
        host_name="foo"
        record_type="host"
        ipam_view="Internet"
        dns_view="Exposed"
      >
     <ipv4_addr>80.90.100.200/18</ipv4_addr>
     <ipv6_addr>baba:bebe:3100::200/120</ipv6_addr>
    </host>
  </request>
</task>
Attributes
Attribute nameObjectValuesDescription
log_levelhead'0' or '1'When set to a value greater than 0, a full set of log messages is included in the XML response
host_namehosthost nameThe hostname part of the new DNS record fqdn (full qualified domain name). Many policies exist that define the host-name validation.
host_domainhostzone nameThe domain part of the new record fqdn. Many policies exist that define the domain-name validation.
record_typehost'host' or 'arec'The record type, 'Host-record' or 'A-record', to be created.
commenthoststringThe text to be assigned to the “comment” of the new record. If the string length allows, a timestamp in brackets will be appended
disablehost'yes' or 'no'When set to 'yes' the host record will be disabled, otherwise it will be enabled. Attribute is optional, default is “no”
ttlhost'0' thru '4294967295' or 'inherit'Determines the 'time-to-live' in seconds that the entry my be cached. '0' denotes no caching. the value 'inherit' removes the ttl value from the record which will then be inherited
ipv4_addrhostipv4-address with prefixThe fixed ipv4-address for the new DNS record including its subnet prefix. The subnet must exist in the IPAM which network-address is calculated from the ip-address and the prefix. When an ipv4_addr attribute is present, any subnet_addr attribute is ignored. Only the first ipv4-addr specified will be used. » CHECK If the address is in use, the request will be rejected
subnet_addrhostnetwork-address with prefixThe first free ip-address is used for the new DNS record. Multiple subnet_addr attributes may be added to allow for continued searching for a free address should they be exhausted. Policies define if and what addresses should be skipped. A address is considered free when it is not assigned an fqdn or is part of a DHCP scope. These attributes will be ignored when an ipv4_addr attribute is present.
ipv6_addrhostipv6-address with prefixThe fixed ipv6-address for the new DNS record including its subnet prefix. The ipv6-subnet must exist in the IPAM-view which network-address is calculated from the ip-address and the prefix. Only the first ipv6-addr specified will be used. The ipv6_address can only be used for 'host' records at this time, AAAA-record support is planned. The IPAM-view of the ipv4 and ipv6 addresses must match.
aliashostfqdnThe full qualified domain name of the 'Host-alias' or 'Cname-record' to be created. The fqdn may not exist in the DNS. Various policies control the validation of the alias names (hostname and zone).
ext_attrhostname-value pairExtensible attributes must be pre-defined in the Infoblox GridMaster. The name must match an existing extensible-attribute (and applicable to the the record-type) or will be ignored. The value will be validated against its definition. When value fails to match a listed value, the request will be rejected. Attribute name and value validations will be case-insensitive (and corrected). When an existing-attribute is marked as required but is missing, the request is rejected.
ipam_viewhostIPAM-view namespecify the Infoblox IPAM-view. The default is configured in 'etc/<server>_dhcp.conf' which is normally 'Default'
dns_viewhostDNS-view namespecify the Infoblox DNS-view. The default is configured in 'etc/<server>_dhcp.conf' which is normally 'Intern'. The DNS-view is hierarchically dependent on the IPAM-view

Extensible attributes may be included in the request using two distinct XML formats. In addition to the example above, this format is available too. Note however, that this last form will cause XML parsing errors if duplicate name attributes are present.

    <ext_attr
        rfc="C000123001"
        srv="DNS002078"
        site="ASD-NY01"
        ReferenceCode="ASD-DC"
        building="across the street"
        Netwerkomgeving="Ota"
    />

Clear_host

Remove Host-record or A-record. Optionally remove referring Cnames too.

<task response="">
  <head
        passwd="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
        task_name="infoblox_dns"
        task_type="xml-request"
        userid="loginid"
        log_level="1"
  />
  <request action_type="clear_host">
    <host
        host_domain="some.domain.name"
        host_name="some-hostname"
        record_type="host"
        clear_cnames="yes"
        comment="RFC T000123005"
       >
    </host>
  </request>
</task>
Attributes
Attribute nameObjectValuesDescription
log_levelhead'0' or '1'When set to a value greater than 0, a full set of log messages is included in the XML response
host_namehosthost nameThe hostname part of the existing DNS record fqdn (full qualified domain name).
host_domainhostzone nameThe domain part of the existing record fqdn.
record_typehost'host' or 'arec'The record type, 'Host-record' or 'A-record', to be removed. The record-type must match the existing record. If the record does not exist as the type specified, the request will be rejected.
commenthoststringAttribute will be ignored
clear_cnameshost'yes' or 'no'when set to 'yes', any Cname-records with a canonical name matching the host fqdn will be removed too.
aliashostfqdnAttribute will be ignored
ext_attrhostname-value pairExtensible attributes will be ignored

Clear_ip

Removes Host-records, A-record or Cnames using or pointing to a given ip-address.

<task response="">
  <head
        passwd="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
        task_name="infoblox_dns"
        task_type="xml-request"
        userid="loginid"
        log_level="1"
  />
  <request action_type="clear_ip">
    <host
       ipv4addr="172.17.0.21"
       view="Intern"
      >
    </host>
  </request>
</task>
Attributes
Attribute nameObjectValuesDescription
log_levelhead'0' or '1'When set to a value greater than 0, a full set of log messages is included in the XML response
ipv4addrhost_addressip-addressThe IPv4 address to remove from DNS Host, A-rec and Cname records. The ip-address should not include the prefix.
viewDNS view nameInternOptional attribute that specifies the DNS view where the ip-address will be searched in. Defaults to 'Intern'
network_viewIPAM view nameDefaultOptional attribute that specifies the IPAM view where the ip-address will be searched in. Defaults to 'Default'

Set_host

Update attributes of a Host-record, A-record, or Cname.

The available DNS record attributes are: 'comment', 'disable', 'ttl', and 'extensible_attributes'.

<task response="">
  <head
        passwd="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
        task_name="infoblox_dns"
        task_type="xml-request"
        userid="loginid"
        log_level="1"
  />
  <request action_type="set_host">
    <host
        host_domain="some.domain.name"
        host_name="existing_hostname"
        record_type="host"
        comment="RFC T000123006"
        disable="no"
        ttl="1000"
       >
       <ext_attr
           rfc="T000123006"
           site="ASD-NY01"
           ReferenceCode="1006"
           NetworkEnv="Ota"
       />
    </host>
  </request>
</task>
Attributes
Attribute nameObjectValuesDescription
log_levelhead'0' or '1'When set to a value greater than 0, a full set of log messages is included in the XML response
host_namehosthost nameThe hostname part of the existing DNS record fqdn (full qualified domain name).
host_domainhostzone nameThe domain part of the existing record fqdn.
record_typehost'host' or 'arec' or 'cname'The record type to update. The record-type must match the existing record. If the record does not exist as the type specified, the request will be rejected.
commenthoststringThe text to be assigned to the “comment” of the new record. If the string length allows, a timestamp in brackets will be appended
disablehost'yes' or 'no'When set to 'yes' the host record will be disabled, otherwise it will be enabled. Attribute is optional, default is “no”
ttlhost'0' thru '4294967295' or 'inherit'Determines the 'time-to-live' in seconds that the entry my be cached. '0' denotes no caching. the value 'inherit' removes the ttl value from the record which will then be inherited
ext_attrhostname-value pairExtensible attributes must be pre-defined in the Infoblox GridMaster. The name must match an existing extensible-attribute (and applicable to the the record-type) or will be ignored. The value will be validated against its definition. When value fails to match a listed value, the request will be rejected. Attribute name and value validations will be case-insensitive (and corrected). When an existing-attribute is marked as required but is missing, the request is rejected.
The extensible attributes specified in the request will be merged with those of the existing record where the specified values will overwrite the existing.

Add_alias

Create multiple Cnames or Host-aliases for an existing canonical (an existing A-record or Host-record)

<task response="">
  <head
        passwd="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
        task_name="infoblox_dns"
        task_type="xml-request"
        userid="loginid"
        log_level="1"
  />
  <request action_type="add_alias">
    <host
        host_domain="some.domain.name"
        host_name="some-hostname"
        record_type="cname"
        comment="RFC T000123007"
       >
       <ext_attr
          rfc="T000123007"
          srv="DSN002078"
          site="ASD-NY01"
          ReferenceCode="ASD-DC"
          building="across the street"
          Netwerkomgeving="Ota"
       />
       <alias>some-hostname-ref.some.domain.name</alias>
       <alias>alternate-name.another.domain.name</alias>
    </host>
  </request>
</task>
Attributes
Attribute nameObjectValuesDescription
log_levelhead'0' or '1'When set to a value greater than 0, a full set of log messages is included in the XML response
host_namehosthost nameThe hostname part of the existing DNS record fqdn (full qualified domain name).
host_domainhostzone nameThe domain part of the existing record fqdn.
record_typehost'cname' or 'host'The alias type to be created, a Cname or Host-alias. The specified host fqdn must exist as either a Host-record or an A-record or the request will be rejected. When specifying 'host'-type alias on a Host-record type host, the policy default_alias_type must be alias to create a Host-alias, in ALL other cases a Cname-record is created
commenthoststringThe text to be assigned to the “comment” of the new record. If the string length allows, a timestamp in brackets will be appended
disablehost'yes' or 'no'When set to 'yes' the host record will be disabled, otherwise it will be enabled. Attribute is optional, default is “no”
ttlhost'0' thru '4294967295' or 'inherit'Determines the 'time-to-live' in seconds that the entry my be cached. '0' denotes no caching. the value 'inherit' removes the ttl value from the record which will then be inherited
aliashostfqdnThe full qualified domain name of the 'Host-alias' or 'Cname-record' to be created. The fqdn may not exist in the DNS or will be skipped. There is no (practical) limit to the number of alias attributes in the request. An alias (Host or Cname) will be created for each alias attribute. Various policies control the validation of the alias names (hostname and zone).
ext_attrhostname-value pairExtensible attributes must be pre-defined in the Infoblox GridMaster. The name must match an existing extensible-attribute (and applicable to the the record-type) or will be ignored. The value will be validated against its definition. When value fails to match a listed value, the request will be rejected. Attribute name and value validations will be case-insensitive (and corrected). When an existing-attribute is marked as required but is missing, the request is rejected.

Clear_alias

Remove Cnames or Host-aliases from an existing canonical reference record.

<task response="">
  <head
        passwd="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
        task_name="infoblox_dns"
        task_type="xml-request"
        userid="loginid"
        log_level="1"
  />
  <request action_type="clear_alias">
    <host
        host_domain="some.domain.name"
        host_name="some-hostname"
        record_type="cname"
        dns_view="Internal"
       >
       <alias>some-hostname-ref.some.domain.name</alias>
       <alias>alternate-name.another.domain.name</alias>
    </host>
  </request>
</task>

The <record_type> value controls if a “host”-alias or “cname” is to be be removed. Default is “cname”.

Multiple C-names/host-aliases can be removed for the canonical name by including multiple <alias> definitions

Attempting to remove an “host”-alias from an A-record as canonical is impossible. The request will be rejected.

For 'host'-records the host details (host_fqdn or host_name and host_domain) are mandatory, for 'cname'-records the host details are optional. For a 'host'-record this is a hard dependency.

When clearing a cname record and the host-fqdn is present in the request, the canonical must exist and match the cname. Attempting to remove a host-alias or a cname that is not referring to the canonical (host) will have no effect.

Including <comment> or <ext_attr> tags are hardly worth the trouble: the record to attach them to will be deleted. However, for process tracking, its use could be desirable

Attribute nameObjectValuesDescription
log_levelhead'0' or '1'When set to a value greater than 0, a full set of log messages is included in the XML response
host_namehosthost nameThe hostname part of the existing DNS record fqdn (full qualified domain name).
host_domainhostzone nameThe domain part of the existing record fqdn.
host_fqdnhosthost+zone nameThe fqdn of the existing record.
dns_viewhostDNS view nameThe infoblox DNS view name. Default is defined in etc/<server>_dhcp.conf.
record_typehost'cname' or 'host'The alias type to be removed: a Cname or Host-alias. The specified host fqdn must exist as either a Host-record or an A-record or the request will be rejected.
aliashostfqdnThe full qualified domain name of the 'Host-alias' or 'Cname-record' to be removed. The alias fqdn must be the canonical of a Host-record or A-record. If host details are present and the alias lacks a domain, the host domain will be used. There is no (practical) limit to the number of alias attributes in the request.

Show_host

Returns the various attributes for the record requested. The record_type must match the fqdn of the specified host name and zone.

The response includes a list of Cnames (if any) that have a canonical matching the requested record. In case of a Cname record, these are indirect references.

<task response="">
  <head
        passwd="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
        task_name="infoblox_dns"
        task_type="xml-request"
        userid="loginid"
        log_level="1"
  />
  <request action_type="show_host">
    <host
        host_domain="some.domain.name"
        host_name="some-hostname"
        record_type="host"
       >
    </host>
  </request>
</task>
Attribute nameObjectValuesDescription
host_namehosthost nameThe hostname part of the existing DNS record fqdn (full qualified domain name).
host_domainhostzone nameThe domain part of the existing record fqdn.
record_typehost'host', 'arec' or 'cname'The record_type of the requested fqdn

Show_subnet

Reports on attributes of an IPAM subnet and its addresses. For each ip-address the name (associated fqdn) and its use (dns or dhcp) is given. Infoblox cannot report these details for more than 2000 ip-addresses.

The Subnet must exist in the IPAM with the matching prefix or the request will be rejected.

<task response="">
  <head
        passwd="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
        task_name="infoblox_dns"
        task_type="xml-request"
        userid="loginid"
        log_level="1"
  />
  <request action_type="show_subnet">
    <subnet
        net_address="10.33.44.0"
        net_prefix="25"
       >
    </subnet>
  </request>
</task>

Subnet_report

The Infoblox subnet report delivers an XML report on all active subnets defined in the Infoblox IPAM.

<task response="">
  <head 
	passwd="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 
	task_name="infoblox_dns" 
  	task_type="xml-request" 
  	userid="loginid" 
  />
  <request 
     action_type="subnet_report"
     network_view="Default"
  />
</task>

The report uses information retrieved by a separate process that continuously extracts IPAM, Zone and DNS data from the Infoblox GridMaster at a gentle pace. This setup allows for instant reporting at moderately aged data (a few hours).

The subnets records reported include any Infoblox ‘Extensible Attributes’ that are defined for that subnet.

Sample response (a very small section):

<task>
  <head 
    error="0000" 
    passwd="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 
    status="completed" 
    task_name="infoblox_dns" 
    task_type="xml-request" 
    userid="xml" 
/>
  <request 
    action_type="subnet_report" 
    auth_agent="yce" 
    request_id="101" 
    task_module="xch_ib_dns.pl" 
    task_sub="ib_dns" 
    user_level="2" 
/>
  <response 
    gridmaster="172.17.0.34"
>
    <subnet 
      name="167772160" 
      comment="OTA Omgeving Beheer Vl199" 
      disable="false" 
      net_end="167772415" 
      net_range="10.0.0.255" 
      net_start="167772160" 
      netmask="255.255.255.0" 
      network="10.0.0.0" 
      network_container="10.0.0.0/23" 
      network_view="Default" 
      prefix="24" 
      subnet="10.0.0.0/24"
    >
      <ext_attr name="Subnetstatus" value="In gebruik" />
      <ext_attr name="Netwerkomgeving" value="OTA" />
    </subnet>
    <subnet 
      name="167772416" 
      comment="OTA Omgeving PtP Best" 
      disable="false" 
      net_end="167772419" 
      net_range="10.0.1.3" 
      net_start="167772416" 
      netmask="255.255.255.252" 
      network="10.0.1.0" 
      network_container="10.0.1.0/24" 
      network_view="Default" 
      prefix="30" 
      subnet="10.0.1.0/30" 
    />
   :::
    <subnet 
      name="4022566912" 
      comment="NetYCE - PIM SSM" 
      disable="false" 
      net_end="4022599679" 
      net_range="239.195.255.255" 
      net_start="4022566912" 
      netmask="255.255.128.0" 
      network="239.195.128.0" 
      network_container="239.0.0.0/8" 
      network_view="Default" 
      prefix="17" 
      subnet="239.195.128.0/17"
    >
      <options name="domain-name" num="15" val="netyce.net" />
      <options name="nameservers" num="6" val="80.90.100.200,80.90.101.200" />
    </subnet>
    <timestamps 
      current="2022-01-13 13:58:08" 
      hosts="2022-01-30 13:35:45" 
      subnets="2022-01-30 13:35:45" 
      zones="2022-01-30 13:35:45" 
    />
  </response>
</task>

Host_report

The Infoblox host report delivers an XML report on all DNS registrations of all zones. Separate records are created for Hosts, Aliases, A-records and C-names. For each of these records the ip-address is resolved to its corresponding ip-address and IPAM subnet (when available).

<task response="">
  <head 
  	passwd="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 
	task_name="infoblox_dns" 
  	task_type="xml-request" 
  	userid="loginid" 
  />
  <request 
     action_type="host_report"
     network_view="Default"
  />
</task>

The report uses information retrieved by a separate process that continuously extracts IPAM, zone and DNS data from the Infoblox GridMaster at a gentle pace. This setup allows for instant reporting at moderately aged data (a few hours).

The host records reported include any Infoblox ‘Extensible Attributes’ that are defined for that record.

Sample report (section):

<task>
  <head 
    error="0000" 
    passwd="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 
    req_app="./subnet_report.pl" 
    req_host="specter" 
    status="completed" 
    task_name="infoblox_dns" 
    task_type="xml-request" userid="myuserid" 
  />
  <request 
    action_type="host_report" 
    auth_agent="yce" 
    request_id="101" 
    task_module="xch_ib_dns.pl" 
    task_sub="ib_dns" 
    user_level="2" 
  />
  <response gridmaster="172.17.0.34">
    <host 
      name="camtech.a3478.netyce.net" 
      comment="T00243218" 
      ipv4addr="10.44.55.52" 
      subnet="10.44.55.48/28" 
      type="Host_record" 
      zone="blox.netyce.net"
    >
      <ext_attr name="OUD-RFC" value="243218" />
      <ext_attr name="RFC" value="T000243218" />
    </host>
    <host 
      name="camtech-nijkerk.blox.netyce.net" 
      comment="T000378225 " 
      ipv4addr="10.44.55.148" 
      subnet="10.44.55.0/22" 
      type="Host_record" 
      zone="blox.netyce.net" 
    />
    :::
    <host 
      name="ntts04.a9026.netyce.net" 
      comment="" 
      ipv4addr="10.214.132.58" 
      subnet="10.214.132.0/22" 
      type="Host_alias" 
      zone="a9026.netyce.net" 
    />
    <timestamps 
      current="2020-09-13 14:01:02" 
      hosts="2020-08-30 13:35:45" 
      subnets="2020-08-30 13:35:45" 
      zones="2020-08-30 13:35:45" 
    />
  </response>
</task>

ExtAttr_report

Note: This report is not yet available for production (oct 2015)

Report all Extensible Attributes and their definitions as defined in the GridMaster.

The report is primarily intended to retrieve the list of value items that the Attribute will allow and integrate it in a custom-built user-interface where an appropriate value can be selected.

<task response="">
  <head 
  	passwd="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 
	task_name="infoblox_dns" 
  	task_type="xml-request" 
  	userid="loginid" 
  />
  <request 
     action_type="extattr_report"
  />
</task>

Add_static_dhcp

Adds a new static dhcp address

<task response="">
  <head
        passwd="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
        task_name="infoblox_dns"
        task_type="xml-request"
        userid="loginid"
        log_level="1"
  />
  <request 
        action_type="add_static_dhcp"
        ipv4addr="172.17.0.21"
        mac="00:00:5e:00:53:00"
   />
  </request>
</task>
Attributes
Attribute nameValuesMandatoryDescription
ipv4addrip-addressnoThe IPv4 address of the static dhcp address to add
macmac-addressnothe MAC address value of the DHCP Fixed Address

Clear_static_dhcp

Clears a static dhcp address

<task response="">
  <head
        passwd="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
        task_name="infoblox_dns"
        task_type="xml-request"
        userid="loginid"
        log_level="1"
  />
  <request 
        action_type="clear_static_dhcp"
        ipv4addr="172.98.0.23"
        mac="00:00:5e:00:53:00"
  />
  </request>
</task>
Attributes
Attribute nameValuesMandatoryDescription
log_level'0' or '1'yesWhen set to a value greater than 0, a full set of log messages is included in the XML response
macmac-addressnothe MAC address value of the DHCP Fixed Address
network_view'Default'noAttribute that specifies the IPAM view where the ip-address will be searched in. Defaults to 'Default'

Policies

The module has a section that defines the many policies that can be customized to alter the validation and behaviour of the module.

    default_host_type => 'host',     # use 'host' or 'arec' as default
    default_alias_type => 'cname',   # use 'cname' or 'alias' as default
    default_clear_cnames => 'yes',   # use 'yes' or 'no' as default (when deleting Host/Arecords)
    unique_addresses => '1',         # 1=reject multiple addresses per host, 0=allow TODO (not needed?)
    unique_fqdn => '1',              # 1=reject multiple records per fqdn, 0=allow
    reject_host_alias => '1',        # 1=reject any host-alias >>>TODO
    fqdn_max_length => '255',        # reject when exceeds
    comment_max_length => '255',     # reject when comment too long
    hostname_min_length => '2',      # reject when shorter
    hostname_underscore => '0',      # replace _ for - when 1
    hostname_dotted_hosts => '0',    # 0=reject, 1=allow
    hostname_special_chars => '1',   # 1=reject, 0=replace special chars
    hostname_start_letter => '1',    # 1=reject unless starting letter, 0=allow
    hostname_trailing_dash => '0',   # 1=reject, 0=allow
    domain_min_length => '2',        # reject when any segment in domain is shorter
    domain_underscore => '0',        # replace _ for - when 1
    domain_special_chars => '1',     # 1=reject, 0=replace special chars
    domain_start_letter => '1',      # 1=reject unless starting letter, 0=allow
    domain_dotted => '1',            # minimum nr of dots in domain
    domain_trailing_dash => '1',     # 1=allow, 0=reject
    domain_must_exist => '1',        # 1=reject unless exists, 0=allow
    subnet_must_exist => '1',        # 1=reject unless in IPAM, 0=allow
    free_addr_skip => {
        26 => 10,                    # /26 skips first 10 addr
        27 => 5,                     # /27 skips first 5 addr
        28 => 5,                     # you got it
        29 => 1,
        30 => 1,
        31 => 0,
    },
    free_addr_skip_default => '10',  # all other prefixes skip 10
    free_addr_skip_last => '1',      # 1=skip the last '1' addresses, 0=use it
    fixed_addr_free => '1',          # 1=reject addr in use, 0=use it

Error Codes

The following error codes and messages can be returned by this module in the response attributes ib_status and ib_status_msg:

FunctionError-codeMessage format
add_host0000Succesful completed 'host_name'
add_host0104Signin to Infoblox failed
add_host0201Invalid record type 'record_type'
add_host0202Invalid hostname 'host_name'
add_host0203Invalid domain name 'host_domain'
add_host0204domain 'host_domain' does not exist
add_host0205Invalid fqdn 'fqdn'
add_host0206fqdn 'fqdn' exists
add_host0207Invalid ipv4 address 'net/prefix'
add_host0208subnet of ipv4 address 'net/prefix' does not exist
add_host0209ipv4 address 'ipv4_address' is not free
add_host0210Invalid subnet 'net/prefix'
add_host0211Missing address or subnet(s) 'fqdn'
add_host0212No free addres found in the subnet(s) 'fqdn'
add_host0213Validation of ext-attr for Arec failed
add_host0214Validation of ext-attr for Host failed
add_host0215Missing alias domain in fqdn 'alias'
add_host0216Invalid alias hostname 'alias'
add_host0217Invalid alias domain 'alias'
add_host0218alias domain does not exist 'alias'
add_host0219Invalid alias fqdn 'alias'
add_host0220Validation of ext-attr for Cname failed
add_host0221Cname could not be created: 'fail reason'
add_host0222No A-record found for ip-migration 'fqdn'
add_host0223Validation of ext-attr for Host failed
add_host0224Updating Arec 'fqdn' ip-address failed
add_host0225No Host-record found for ip-migration 'fqdn'
add_host0226Host-record has too many addresses for ip-migration 'fqdn'
add_host0227Validation of ext-attr for Host failed
add_host0228Updating Host 'fqdn' ip-address failed
clear_host0000Succesful completed 'host_name'
clear_host0104Signin to Infoblox failed
clear_host0301Invalid record type 'record_type'
clear_host0302Invalid fqdn 'fqdn'
clear_host0303Invalid host ip-address 'address'
set_host0000Succesful completed 'host_name'
set_host0104Signin to Infoblox failed
set_host0351Invalid record type 'record_type'
set_host0352Invalid fqdn 'fqdn'
set_host0353No 'record_type' found for fqdn 'fqdn'
set_host0354Validation of ext-attr for Host failed
set_host0355Validation of ext-attr for Arec failed
set_host0356Validation of ext-attr for Cname failed
set_host0357Updating 'record_type' 'fqdn' failed
add_alias0000Succesful completed 'host_name'
add_alias0104Signin to Infoblox failed
add_alias0401Invalid record type 'record_type'
add_alias0402Invalid hostname 'host_name'
add_alias0403Invalid domain name 'host_domain'
add_alias0404domain 'host_domain' does not exist
add_alias0405Invalid fqdn 'fqdn'
add_alias0406fqdn 'fqdn' does not exist
add_alias0407no alias to add to canonical 'fqdn'
add_alias0408Missing alias domain in fqdn 'alias'
add_alias0409Invalid alias hostname 'alias'
add_alias0410Invalid alias domain 'alias'
add_alias0411alias domain does not exist 'alias'
add_alias0412Invalid alias fqdn 'alias'
add_alias0413Validation of ext-attr for Cname failed
add_alias0414Cname could not be created: 'fail reason'
clear_alias0000Succesful completed 'host_name'
clear_alias0104Signin to Infoblox failed
clear_alias0501Invalid record type 'record_type'
clear_alias0502Invalid fqdn 'host_fqdn'
clear_alias0503no alias to clear
clear_alias0504No Cnames found for 'host_fqdn'
clear_alias0505no Cnames removed
show_host0000Succesful completed 'host_name'
show_host0104Signin to Infoblox failed
show_host0601Invalid record type 'record_type'
show_host0602Invalid fqdn 'host_fqdn'
show_host0603No Host-record found for 'host_fqdn'
show_host0604No A-record found for 'host_fqdn'
show_host0605No Cname-record found for 'host_fqdn'
show_subnet0000Succesful completed 'subnet_addr'
show_subnet0104Signin to Infoblox failed
show_subnet0701Invalid ipv4 subnet address 'subnet_addr'
show_subnet0702subnet 'subnet_addr' does not exist
make_host0801Create Host for 'fqdn' with address 'ip_address' failed
make_host0802Adding Host for 'fqdn' with address 'ip_addr' failed
make_arec0811Create Arecord for 'fqdn' at 'ip_address' failed
make_arec0812Add Arecord for 'fqdn' at 'ip_address' failed
make_cname0821Create Cname 'fqdn' on canonical 'canonical_fqdn' failed
make_cname0822Adding Cname 'fqdn' on canonical 'canonical_fqdn' failed
make_host_alias0831No Host-record found for 'fqdn'
make_host_alias0832Validation of ext-attr for Host failed
make_host_alias0833Updating Host 'fqdn' aliases failed
del_host0841Removing complete Host for 'fqdn' at 'ip_address' failed
del_host0842Updating Host 'fqdn' addresses failed
del_host0843Removing Host for 'fqdn' at 'ip_address' failed
del_host0844No Host for 'fqdn' matched 'ip_address'
del_host0845No Host found for 'fqdn'
del_arec0901Remove Arecord for 'fqdn' at 'ip_address' failed
del_arec0902Remove Arecord for 'fqdn' at 'ip_address' failed
del_arec0903No Arecords for 'fqdn' matched 'ip_address'
del_arec0904No Arecord found for 'fqdn'
del_cname0911No Cname found for 'fqdn'
del_cname0912Remove Cname for 'fqdn' failed
del_host_alias0921No Host found for 'fqdn'
del_host_alias0922Updating Host 'fqdn' aliases failed
guides/reference/infoblox/plugin_infoblox_dns.txt · Last modified: 2024/07/03 12:31 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki