VMware Cloud Community
IB_IT
Expert
Expert

Gateway IP sub-allocation --can I list these contents?

All,

Just getting into powercli for vcloud...wondering if there is a command that will list the IP range of all the gateways.  The field I want in the gui is under manage and monitor, cloud resources, external networks, gateway ip sub-allocation tab.  I am looking the range of all IPs I have assigned or perhaps an easy way to export this list in GUI would also work, but haven't found that yet.  I just want to get a handle on what IPs are assigned on the network so I can cross reference what we have available. 

Is this something I can get with the get-externalnetwork cmdlet?

Thanks all!!

Reply
0 Kudos
5 Replies
LucD
Leadership
Leadership

Thread moved to vCloud Director PowerCLIvCloud Director PowerCLI community


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
BastiaanvanH
Contributor
Contributor

I'm trying to accomplisch the same, any luck finding the IP allocations in PowerCLI?

Reply
0 Kudos
IB_IT
Expert
Expert

Not exactly...the get-externalnetworks cmdlet when run against my env will give me the UsedIpCount and TotalIpCount, so it helps me to know when I am running low on available IP's, but what I really want is a nice, neat table that lists every Org and their Sub-allocate IP Pool list.  I think I am looking in the wrong place...since this is Org specific, it must be something that can be provided in one of the other cmdlets

Reply
0 Kudos
jtfox76
Contributor
Contributor

I know this is an old thread but did you ever find your answer? I can list the allocated IP addresses but need to also list the sub-allocated IP addresses. My goal is to have a powercli script that will show me the available IP addresses on the external network. I have found some documentation in the API but I am not versed enough with API to know how to do so. Here is what I have done in powercli / powershell to list the allocated IPs:.

#Variable Declaration

$vcloud = Read-Host "enter your vCloud address"

$externalnetwork = Read-Host "enter your external network name"

#Connect to vCloud

Connect-CIServer -Server $vcloud

#Get-External Network

$ExtNet = Get-ExternalNetwork -Name $externalnetwork

#Get Allocated IP Addresses

$ExtNet.ExtensionData.Configuration.IpScopes.IpScope.allocatedipaddresses.IpAddress

jtfox76
Contributor
Contributor

Found this URL that is very helpful.

http://www.justavmwblog.com/2015/05/vcloud-next-free-ip/

Reply
0 Kudos