Virtual Infrastructure Tips - VMware and Azure 09月29日
Azure子网地址前缀配置限制
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

在Azure中,虚拟网络子网的地址前缀配置存在限制。尽管Bicep和ARM模板支持使用数组形式定义多个地址前缀,但Azure未默认启用'Microsoft.Network/AllowMultipleAddressPrefixesOnSubnet'功能。通过Azure CLI注册该功能后,状态会停留在'pending',无法成功启用。此功能仅限MSFT内部开发者使用,未公开或预览,反映该功能需求不高。

🔍 在Azure中,虚拟网络子网地址前缀配置仅支持单一范围,默认未启用支持数组形式的多范围配置。通过Bicep或ARM模板定义时,若使用数组将触发错误。

🚫 尝试通过Azure门户手动添加子网额外IP范围失败,部署ARM模板时同样报错。错误信息指向订阅未注册'Microsoft.Network/AllowMultipleAddressPrefixesOnSubnet'功能。

🖥️ 使用Azure CLI注册该功能后,状态卡在'pending'无法完成注册。该功能仅限MSFT内部开发者使用,未公开或预览,反映市场需求有限。

⚠️ 该功能未在资源提供者中可配置,需通过CLI命令注册但存在状态卡顿问题。MSFT内部测试表明此功能未开放给公众或预览用户。

 We were having a look today at the Azure documentation for virtual networks and subnets specifically. Both for Bicep and ARM there are two options to specify the addressprefix (address space) for a subnet. The first one is "addressPrefix" which takes a string as input and the second one is "addressPrefixes" which takes an array, see below. This leads one to expect that you can provide multiple IP address ranges for the subnet in the array in the same way that it can be done for VNets.


If you try to manually add an additional IP range to an existing subnet via the portal, it will show an error.

If you try to deploy multiple ranges via an ARM template, it still throws an error but we get a bit more information in the error message, see below:


The error states that the subscription is not registered for the following feature:

Microsoft.Network/AllowMultipleAddressPrefixesOnSubnet

This is usually handled under Resource Providers for the subscription. If you go to subscriptions -> resource providers in the Portal, this feature is not there to enable, though.


It is possible however, to register the feature via Azure CLI. But when you run the command, this feature goes from "not registered" to "pending" and then it will just stay like that and never move to registered.

It looks like below:



The commands are:

az feature register --namespace Microsoft.Network -n AllowMultipleAddressPrefixesOnSubnet --subscription <subscriptionId>

and:

az feature show --namespace Microsoft.Network -n AllowMultipleAddressPrefixesOnSubnet --subscription <subscriptionId>

It turns out that this feature is available only to MSFT developers and is not available either in public or private preview. There is not much info around this, as I suppose it is not really a sought after feature.

I found this explanation and also response from MSFT, see link here.

And then another person had the same issue as late as Jan 8, 2024, see link here.

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

Azure 虚拟网络 子网配置 地址前缀 功能限制
相关文章