Infoblox Community
Reply
Highlighted
Accepted Solution

Problems with WAPI searching for record:host

Techie
Posts: 6
Registered: ‎10-10-2016
jncarter
Techie
Posts: 6

I have a workflow that creates a record:host for a domain controller when it is deployed. The zone is configured to allow unsigned updates from the domain controllers. We then install the ad domain and the domain controller adds the ad.domain.com and gc._msdcs.ad.domain.com A records to the existing host record. After this when I search for the record:host by name or ipv4addr I do not get any results back. Are the records somehow locked or otherwise hidden?

 

The end result is that I need to find the record:host for the domain controller so that I can remove it when the domain controller is removed.

 

Thanks!

Re: Problems with WAPI searching for record:host

Employee
Posts: 189
Registered: ‎09-16-2008
DSmith Employee
Employee
Posts: 189
Are you allowing updates to the parent AD zone? If so, your issue is likely that the HOST record is getting squashed when the DC does its DDNS updates. When a DDNS update occurs and the HOST record is not specifically protected, it will be converted to A and PTR records. The HOST object in the Infoblox database is a unique contrast and the DDNS transactions work on specific record types (A and PTR for example). When you attempt to find the record later, since it got broken into the A and PTR records, your HOST search will not return anything.

You have a few options on how to address this.

First, allow the DC to only update the underscore zones (delegate those to separate zones using the checkbox or manually doing so). Don’t allow the DC to update the parent zone.

Second, protect the HOST record so it can’t be squashed by a DDNS update. How to do so depends on the version of NIOS you are using but you can simply add a MAC address (even 00:00:00:00:00:00) to the IP.

Third, leverage DNS scavenging and have it do all of the clean up after whatever time period you set for the policy. (This isn’t the best option…but it may help.)

Re: Problems with WAPI searching for record:host

Techie
Posts: 6
Registered: ‎10-10-2016
jncarter
Techie
Posts: 6

Thanks for the info and options! Option #2 sounds like it would be best for us. However I am not certain how to add the mac to the record:host. We are creating the records by searching for extensible attributes and using next available ip like so.

 

var content = {
   "name":"",
   "ipv4addrs":[
      {
         "ipv4addr":{
            "_object_function":"next_available_ip",
            "_object_field":"value",
            "_object":"network",
            "_result_field":"ips"
         }
      }
   ],
   "view":""
};

 

According to the docs the mac field is only for searching...

 

This is NIOS version 7.3.5.

Re: Problems with WAPI searching for record:host

Employee
Posts: 189
Registered: ‎09-16-2008
DSmith Employee
Employee
Posts: 189

Re: Problems with WAPI searching for record:host

Techie
Posts: 6
Registered: ‎10-10-2016
jncarter
Techie
Posts: 6

Thanks! I followed the examples but the mac address seemed to be ignored or throw an error depending on where in the objet I tried to add it.

 

I ended up finding the ddns_protected attribute. Will that accomplish the same thing of locking the record?

Re: Problems with WAPI searching for record:host

Employee
Posts: 189
Registered: ‎09-16-2008
DSmith Employee
Employee
Posts: 189
Yes, that should work.

For the MAC, you’d add that as part of the IP address rather than separately.

ipv4addrs {
{ ip, mac }
}


That’s a quick hack but you should get the idea.

Re: Problems with WAPI searching for record:host

Community Manager
Posts: 232
Registered: ‎09-15-2008
GHorne Community Manager
Community Manager
Posts: 232

you're mixing a few problems here beacuse you're trying to assign the ipv4addr via the 'next_available' function, but that has errors, and you still haven't specified the mac address.

 

So this:

 

 {
   "name":"",
   "ipv4addrs":[
      {
         "ipv4addr":{
            "_object_function":"next_available_ip",
            "_object_field":"value",
            "_object":"network",
            "_result_field":"ips"
         }
      }
   ],
   "view":""
}

really needs to have the MAC addresses added, thus

 

 {
   "name":"",
   "ipv4addrs":[
      {
         "mac" : "00:00:00:00:00:00",
         "ipv4addr":{
            "_object_function":"next_available_ip",
            "_object_field":"value",
            "_object":"network",
            "_result_field":"ips"
         }
      }
   ],
   "view":""
}

BUT, your next_available_ip syntax is broken because you haven't said which network to get an address from,

And it really should look like this:

{
   "name":"",
   "ipv4addrs":[
      {
         "mac" : "00:00:00:00:00:00",
         "ipv4addr":{
            "_object_function": "next_available_ip",
            "_result_field": "ips",
            "_parameters": {
                "exclude": ["9.0.0.1", "9.0.0.2"],
            },
            "_object": "network",
            "_object_parameters": {
                "network": "9.0.0.0/8",
                "network_view": "newdefaultnv",
            }
         }
      }
   ],
   "view":""
}