DNS DHCP IPAM

Reply
Accepted Solution

Assigning unmanaged addresses via REST

maximovka
Techie
Posts: 9
639     0

Dear Infoblox team,

 

 

I am currently using an Infoblox appliance's v1.6.1 WAPI.

I am trying to assign some addresses in my IP range to be marked as unmanaged using WAPI, but the API guide I have managed to put my hands on offers no instructions on how should it be done.

Any help on the issue of marking an address as unmanaged using WAPI v1.6.1 would be appreciated.

 

 

Thanks,

D.

Re: Assigning unmanaged addresses via REST

Adviser
Posts: 213
639     0
What exactly are you trying to accomplish by setting an address as “unmanaged” in DDI? Only discovered objects are unmanaged if there are no additional records. It’s not a setting that you can assign to an IP address. It would help to understand what you are attempting to achieve and what you think setting unmanaged will do for you. We can then provide some suggestions that offer you the best approach.

Re: Assigning unmanaged addresses via REST

maximovka
Techie
Posts: 9
639     0

I am working on an infrastucture virtualization platform, the adresses of which will be managed by an Infoblox appliance.

While creating a virutal server, my virtualization platform allocates an address to an orchestrator using one of your marvelous appliances.

After the server is ready and has the given address, it will register a DNS entry for itself by communicating with the domain controller, which in turn will update the Infoblox's database.

The theoretical purpose of marking an address as unmanaged is to have it reserved by Infoblox with an entry for the short term between the address' allocation by the appliance and the acknowledgment about our fresh DNS entry for the new server.

This way I can avoid double allocation of the same address.

Creating a regular host entry for those addresses is impossible due to the fact that the network segment is managed by microsoft servers who conflict with the appliance's authority, hence the need for an alternative marking.

 

Sincere gratutide,

D.

Re: Assigning unmanaged addresses via REST

Adviser
Posts: 213
639     0
Okay…then “unmanaged” is actually not what you want. You still have to have something “managed” for the reservation. In your case, you have a few options.


1. Create a “reservation” at the IP address which tells the system there is an object there even without any DHCP or DNS related info.

2. Create a “host not in DNS” at the IP address to reflect the IP is in use even though the script is not entering it into DNS or DHCP.

3. Create a “host” but put it into a “placeholder” DNS zone (one that is either not used at all or is used but has nothing to do with the AD zone).

4. Leverage the cloud API (if you have the CNA license or a CP member) and leverage the reservation that way.

Any of these will ensure that the IP is not assigned elsewhere and also ensures that the IP is actually managed (since it is from your API call).


Unmanaged would effectively mean that the object data is not managed even though you’ve defined the subnet for management. As soon as you try to do something with the data (via API or via sync with MSFT), then you’re working with a “managed” object.

Re: Assigning unmanaged addresses via REST

maximovka
Techie
Posts: 9
639     0

I do seem to like option number 1.

Could you give me a hint about how would an HTTP query for the creation of such reservation look like?

Re: Assigning unmanaged addresses via REST

Adviser
Posts: 213
639     0
Use the “fixed address” object but specify the “match_client” value to be RESERVED. This minimizes the information you need to supply. For the IP address, use the get_next_available function and the returned data will be the IP address that was reserved. There’s no need to do multiple trips to “find” the IP and then reserve it. Instead, let the API take care of all of that for you in one shot.

Re: Assigning unmanaged addresses via REST

gpryzby
Techie
Posts: 2
639     0

How can I free/release the IP once is it reserved? 

 

Because DNS is not used on the appliance, the add_host fails so delete_host isn't possible.

Highlighted

Re: Assigning unmanaged addresses via REST

Adviser
Posts: 62
639     0

I know this is a really late reply, but incase some is looking for this information, an IP address once reserved can be freed/reclaimed by using the DELETE method on the ipv4address object.

This deletes all objects associated with the IP address.

 

Step1: Use GET to get the reference URI of the object (text in red color in response).

$ curl -k -u sr:123infobloxA -X GET https://10.192.33.22/wapi/v1.6/ipv4address?ip_address=10.192.32.14
[
    {
        "_ref": "ipv4address/Li5pcHY0X2FkZHJlc3MkMTAuMTkyLjMyLjE0LzA:10.192.32.14",
        "ip_address": "10.192.32.14",
        "is_conflict": false,
        "mac_address": "",
        "names": [
            "testing.test.com"
        ],
        "network": "10.192.32.0/24",
        "network_view": "default",
        "objects": [
            "record:host/ZG5zLmhvc3QkLl9kZWZhdWx0LmNvbS50ZXN0LnRlc3Rpbmc:testing.test.com/default"
        ],
        "status": "USED",
        "types": [
            "HOST"
        ],
        "usage": [
            "DNS"
        ]
    }

Step 2: Use the reference URI of the object in the WAPI call with DELETE method.

 

$ curl -k -u sr:123infobloxA -X DELETE https://10.192.33.
220/wapi/v1.6/ipv4address/Li5pcHY0X2FkZHJlc3MkMTAuMTkyLjMyLjE0LzA:10.192.32.14
"ipv4address/Li5pcHY0X2FkZHJlc3MkMTAuMTkyLjMyLjE0LzA:10.192.32.14"

Step 3: Use GET again to confirm 'status' is now 'UNUSED' (text in red color in response).

$ curl -k -u sr:123infobloxA -X GET https://10.192.33.22/wapi/v1.6/ipv4address?ip_address=10.192.32.14
[
    {
        "_ref": "ipv4address/Li5pcHY0X2FkZHJlc3MkMTAuMTkyLjMyLjE0LzA:10.192.32.14",
        "ip_address": "10.192.32.14",
        "is_conflict": false,
        "mac_address": "",
        "names": [],
        "network": "10.192.32.0/24",
        "network_view": "default",
        "objects": [],
        "status": "UNUSED",
        "types": [],
        "usage": []
    }
]

Hope someone finds this useful.

 

- Sandeep

Showing results for 
Search instead for 
Do you mean 

Recommended for You