Incorrect output of the `az network vnet subnet list-available-ips` command
See original GitHub issueI was checking the number of available ip addresses in the subnet where an application gateway is deployed using this:
schowdhu@schowdhu-mn1 ~ % az network vnet subnet list-available-ips --resource-group aag-rg --vnet-name aagVnet -n AAG1Subnet This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus [ "10.0.36.244", "10.0.36.245", "10.0.36.246", "10.0.36.247", "10.0.36.248" ]
Following shows my subnet size and the app gw instances deployed.
[schowdhu@schowdhu-ld3 ~]$ az network vnet subnet show -g aag-rg -n AAG1Subnet --vnet-name aagVnet | jq '.addressPrefix' "10.0.36.240/28"
[schowdhu@schowdhu-ld3 ~]$ az network application-gateway list -g aag-rg | jq '.[] | .name,.sku,.operationalState' "aag01" { "capacity": 8, "name": "Standard_Medium", "tier": "Standard" } "Running"
Based on the app gw documentation (https://docs.microsoft.com/en-us/azure/application-gateway/configuration-infrastructure#size-of-the-subnet), app gw uses one private IP address per instance, plus another private IP address if a private front-end IP is configured. Azure also reserves five IP addresses in each subnet for internal use: the first four and the last IP addresses. Taking the above example for reference, total available ip addresses in the subnet 10.0.36.240/28 is 16. Azure uses 5 ip addresses and app gw has 8 instances. There should be only 3 ip addresses remaining. However, the az network vnet subnet list-available-ips
command shown above shows 5 ip addresses available.
https://learn.microsoft.com/en-us/cli/azure/network/vnet/subnet?view=azure-cli-latest#az-network-vnet-subnet-list-available-ips – This is the example in the documentation. It mentions “List some available ips in the subnet.”. Does it mean it shows free ip addresses which are not used yet in the subnet or just it just display a few ip addresses belonging to the subnet irrespective of weather they are being used or not.
Am I missing something here or is there an issue with what the command is showing.
Issue Analytics
- State:
- Created a year ago
- Comments:19 (16 by maintainers)
Top GitHub Comments
@navba-MSFT : I will get back next week on this.
@subhasishdc Thanks for your reply. I am adding the Service team to look into this ask and assist you further.
@aznetsuppgithub Could you please look into this ask and provide an update ? Thanks in advance.