Reply
Highlighted
Accepted Solution

Help to create script to change multiple dhcp ranges member assignment at once

Posts: 4
427     0

I have two DHCP members – both in HA.  Both DHCP members are serving different networks without any failover association configured.

 

If one DHCP member completely fails – meaning both HA nodes go down – I need to quickly assign the DHCP ranges for those networks to the other DHCP member.  I am not great in the programming area and would like some assistance in to:

  1. Needing to retrieve the grid member that has all dhcp ranges assigned to that grid member
  2. If it is one member, change it to the other member

Re: Help to create script to change multiple dhcp ranges member assignment at once

TTiscareno Community Manager
Community Manager
Posts: 340
428     0

You actually don't need any scripting or programming to accomplish this. The CSV Job Manager makes this easy to accomplish.

 

  1. Use the CSV Job Manager to export all of your networks and ranges.You can find this in the vertical toolbar on the right-hand side of the page on any screen under the Data Management tab.
  2. Remove all of the columns that you do not need (any required columns are noted with an asterisk).
  3. Update the dhcp_members and member columns. If using DHCP Failover, update the failover_association column. Save this to a new file.
  4. Using the CSV Job Manager, create a new CSV import job with the job type set to override.
  5. Browse to the updated CSV file.
  6. Optional: Set the "On error" action to "Skip to the next row and continue".
  7. Run the import.
  8. Restart services once the import is complete.

Note: If all your doing is changing the member assignment, the CSV syntax will look like the following:

 

header-dhcprange,end_address*,start_address*,failover_association,member,network_view
header-reservedrange,end_address*,start_address*,,,
dhcprange,10.60.27.175,10.60.27.160,,server.infoblox.local,default
reservedrange,23.1.1.100,23.1.1.3,,,
dhcprange,192.168.100.160,192.168.100.150,,server.infoblox.local,default
dhcprange,172.31.1.200,172.31.1.100,,server.infoblox.local,default
reservedrange,82.85.82.3,82.85.82.1,,,

 

If you only have a single Network View, that column can be ommitted. If in doubt or you have multiple Network Views, include it and specify the Network View for the networks and ranges you want to update. Navigate to Administration -> Network Views to review any existing Network Views. The Network View is selected using a dropdown menu found at the top left-hand side of your Grid Manager GUI window.

 

Good luck!

 

-Tony

Re: Help to create script to change multiple dhcp ranges member assignment at once

Posts: 4
428     0

Sweet!  I don't use the export function all that much and had forgotten about it.  I tried this on a test dhcp range and it worked.  Thank you, that's exactly what I was looking for.

Showing results for 
Search instead for 
Do you mean 

Recommended for You