对于给定的 Azure 子网,如何找到前两个可用的私有 IP 地址?

huangapple go评论61阅读模式
英文:

For a given Azure subnet how to find the first two available private IPs?

问题

我有一个子网,显示如下的3个可用IP地址。是否有一种快速获取前两个可用IP地址的方法?

英文:

I have subnet that shows 3 available IPs as below. Is there a quick way to fetch the first 2 available IPs?

对于给定的 Azure 子网,如何找到前两个可用的私有 IP 地址?

答案1

得分: 0

给定一个Azure子网,如何找到前两个可用的私有IP?

我在我的环境中尝试过,并得到了以下结果:

在我的环境中,我有58个可用的IP地址。

对于给定的 Azure 子网,如何找到前两个可用的私有 IP 地址?

您可以使用下面的Azure CLI命令获取前两个可用的IP地址。

命令:

az network vnet subnet list-available-ips --resource-group <你的资源组> --vnet-name vnet01 -n subnet-1 --query [0:2]

输出:

[
  "10.1.6.5",
  "10.1.6.6"
]

对于给定的 Azure 子网,如何找到前两个可用的私有 IP 地址?

参考链接:

az network vnet subnet | Microsoft Learn

英文:

> For a given Azure subnet how to find the first two available private IPs?

I tried in my environment and got the below results:

In my environment, I have 58 available IP addresses.

对于给定的 Azure 子网,如何找到前两个可用的私有 IP 地址?

You can use the azure cli command below to fetch the first 2 available Ip addresses.

Command:

az network vnet subnet list-available-ips --resource-group &lt;your-resource-grp&gt; --vnet-name vnet01 -n subnet-1 --query [0:2] 

Output:

[
  &quot;10.1.6.5&quot;,
  &quot;10.1.6.6&quot;
]

对于给定的 Azure 子网,如何找到前两个可用的私有 IP 地址?

Reference:

az network vnet subnet | Microsoft Learn

huangapple
  • 本文由 发表于 2023年6月29日 18:48:19
  • 转载请务必保留本文链接:https://go.coder-hub.com/76580319.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定