Remove/Update network IP pool range in SDDC Manager
search cancel

Remove/Update network IP pool range in SDDC Manager

book

Article ID: 396783

calendar_today

Updated On:

Products

VMware Cloud Foundation

Issue/Introduction

You cannot remove an existing IP address range from the SDDC UI if it is the only range within the network pool or if it is currently in use.

This article provides guidance on removing the IP range using the public API.

Environment

  • VMware Cloud Foundation 4.x
  • VMware Cloud Foundation 5.x
  • VMware Cloud Foundation 9.x

Resolution

Note: Ensure a valid snapshot of the SDDC virtual machine is taken before proceeding with the steps below.

  1. Review the networking pools in the SDDC Manager UI to identify unused IP Pool.


  2. Connect to the SDDC Manager appliance via an SSH session.

  3. Enter su to switch to the root user and enter the password.

  4. Obtain the authentication token, because we are using the Public API we need to get an authentication token from SDDC Manager. We will do this by capturing the token to a variable that we can then use for each subsequent API call as this simplifies the command for us.

    TOKEN=`curl -X POST -H "Content-Type: application/json" -d '{"username": "[email protected]","password": "VMw@re1!"}' -k https://localhost/v1/tokens | awk -F "\"" '{ print $4}'`

  5. Obtain the ID of the Network Pool. Make a note of this ID as we will use it in the next step.

    curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -k https://localhost/v1/network-pools | json_pp

  6. Obtain the ID of the IP Pool. Make a note of this ID also as it will be used in the next step.

    curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -k https://localhost/v1/network-pools/93e10949-e841-40d6-a0c2-3cf95b33dd5d/networks | json_pp

  7. Delete the IP range we no longer require. Here we use the Network Pool ID from Step 5 and the IP Pool ID from Step 6 as well as passing a JSON spec containing the actual IP range that we want to delete.

    curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -k https://localhost/v1/network-pools/<I.D from step 5>/networks/I.D from step 6/ip-pools -d '{"start" : ###.##.##.##>", "end" : "###.###.##.##" }'

  8. Return to the SDDC Manager UI, and refresh and the IP Pool Range will have been deleted.