你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
使用 Azure CLI 创建和预配网络结构
本文介绍如何使用 Azure 命令行接口 (AzCLI) 创建 Network Fabric。 本文档还演示如何更新或删除 Network Fabric,或检查其状态。
先决条件
- 具有活动订阅的 Azure 帐户。
- 安装最新版本的 CLI 命令。 有关安装 CLI 命令的信息,请参阅安装 Azure CLI
- Network Fabric 控制器管理同一 Azure 区域中的多个 Network Fabric。
- 物理 Operator-Nexus 实例,按 BoM 版本布线。
- NFC 实例与 Operator-Nexus 实例之间的快速路由连接。
- 安装和配置了预配置用户名和密码的终端服务器
- 预配置了必要的 VLAN、路由目标和 IP 地址的 PE 设备。
- 此处列出了支持的 SKU 信息
预配 Fabric 和机架的步骤
- 通过提供机架、服务器计数、SKU 和网络配置来创建 Network Fabric。
- 通过提供第 2 层和第 3 层参数创建网络到网络互连
- 使用设备上的实际序列号更新 networkDevice 资源中的序列号。
- 使用所有设备的序列号配置终端服务器。
- 预配网络 Fabric。
Fabric 配置
下表指定用于创建 Network Fabric 的参数,
$prefix: /subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers
参数 | 说明 | 示例 | 必须 | 类型 |
---|---|---|---|---|
resource-group | 资源组的名称 | "NFResourceGroup" | True | |
location | Operator-Nexus Azure 区域 | “eastus” | True | |
resource-name | FabricResource 的名称 | NF-ResourceName | True | |
nf-sku | Fabric SKU ID 是订购的 BoM 版本的 SKU。 请参阅网络结构 SKU。 | M4-A400-A100-C16-ab | True | 字符串 |
nfc-id | Network Fabric 控制器“ARM 资源 ID” | $prefix/NFCName | True | |
机架数 | 每个结构的计算机架数。 可能的值为 2 到 8 | 8 | True | |
serverCountPerRack | 每个机架的计算服务器数。 可能的值为 4、8、12 或 16 | 16 | True | |
ipv4Prefix | 管理网络的 IPv4 前缀。 此前缀在 Network Fabric 控制器中所有的 Network Fabric 中应是唯一的。 前缀长度应至少为 19(不允许为 /20,可为 /18 或更低) | 10.246.0.0/19 | True | |
ipv6Prefix | 管理网络的 IPv6 前缀。 此前缀在 Network Fabric 控制器中所有的 Network Fabric 中应是唯一的。 | 10:5:0:0::/59 | True | |
management-network-config | 管理网络的详细信息 | True | ||
infrastructureVpnConfiguration | 管理 VPN 连接的详细信息;此连接为 Network Fabric 与 Network Fabric 控制器中基础结构服务之间的连接 | True | ||
optionBProperties | MPLS 选项 10B 的详细信息用于 Network Fabric 与 Network Fabric 控制器之间的连接 | True | ||
importRouteTargets | 目前特定的 IP 子网类(例如 IPv4 和 IPv6)有为其定义的路由目标。 需要在 CE 进行配置的导入路由目标的值,以便通过 MPLS 选项 10B 在 CE 和 PE 之间交换路由, | 例如 65048:10039 | True(如果已启用 OptionB) | |
exportRouteTargets | 目前特定的 IP 子网类(例如 IPv4 和 IPv6)有为其定义的路由目标。 需要在 CE 进行配置的导出路由目标的值,以便通过 MPLS 选项 10B 在 CE 和 PE 之间交换路由 | 例如 65048:10039 | True(如果已启用 OptionB) | |
workloadVpnConfiguration | 工作负载 VPN 连接的详细信息;此连接为 Network Fabric 与 Network Fabric 控制器中工作负载服务之间的连接 | |||
optionBProperties | MPLS 选项 10B 的详细信息用于 Network Fabric 与 Network Fabric 控制器之间的连接 | |||
importRouteTargets | 目前特定的 IP 子网类(例如 IPv4 和 IPv6)有为其定义的路由目标。 需要在 CE 进行配置的导入路由目标的值,以便通过 MPLS 选项 10B 在 CE 和 PE 之间交换路由 | 例如 65048:10050 | True(如果已启用 OptionB) | |
exportRouteTargets | 目前特定的 IP 子网类(例如 IPv4 和 IPv6)有为其定义的路由目标。 需要在 CE 进行配置的导出路由目标的值,以便通过 MPLS 选项 10B 在 CE 和 PE 之间交换路由 | 例如 65048:10050 | True(如果已启用 OptionB) | |
ts-config | 终端服务器配置详细信息 | True | ||
primaryIpv4Prefix | 应为终端服务器 Net1 接口分配前缀中的第一个可用 IP,并为 PE 上的相应接口分配第二个可用地址 | 20.0.10.0/30,应为 TS Net1 接口分配 20.0.10.1,为 PE 接口分配 20.0.10.2 | True | |
secondaryIpv4Prefix | TS 和 PE2 之间连接性的 IPv4 前缀。 应为终端服务器 Net2 接口分配前缀中的第一个可用 IP,并为 PE 上的相应接口分配第二个可用地址 | 20.0.0.4/30,应为 TS Net2 接口分配 20.0.10.5,并为 PE 接口分配 20.0.10.6 | True | |
username | 服务用于配置 TS 的终端服务器上配置的用户名 | username | True | |
password | 服务用于配置 TS 的终端服务器上配置的密码 | password | True | |
serialNumber | 终端服务器的序列号 | 终端服务器的序列号 |
创建 Network Fabric
创建 Network Fabric 之前必须先创建资源组。 建议为每个 Network Fabric 创建单独的资源组。 可以通过以下命令创建资源组:
az group create -n NFResourceGroup -l "East US"
运行以下命令以创建 Network Fabric:
az networkfabric fabric create \
--resource-group "NFResourceGroupName"
--location "<Location>" \
--resource-name "NFName" \
--nf-sku "NFSKU" \
--nfc-id "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/NFCName"
--fabric-asn 65048
--ipv4-prefix 10.2.0.0/19
--ipv6-prefix fda0:d59c:da02::/59
--rack-count 4
--server-count-per-rack 8
--ts-config '{"primaryIpv4Prefix":"20.0.1.0/30", "secondaryIpv4Prefix":"20.0.0.0/30", "username":"****", "password": "****", "serialNumber":"TerminalServerSerialNumber"}'
--managed-network-config '{"infrastructureVpnConfiguration":{"peeringOption":"OptionB","optionBProperties":{"routeTargets": {"importIpv4RouteTargets":["65048:10039"], "importIpv6RouteTargets":["65048:10039"], "exportIpv4RouteTargets":["65048:10039"], "exportIpv6RouteTargets":["65048:10039"]}}},"workloadVpnConfiguration":{"peeringOption":"OptionB","optionBProperties":{"routeTargets": {"importIpv4RouteTargets":["65048:10050"], "importIpv6RouteTargets":["65048:10039"], "exportIpv4RouteTargets":["65048:10039"], "exportIpv6RouteTargets":["65048:10039"]}}}}
注意
- 如果是 4 个机架的设置,则机架计数将为 4
- 如果是 8 个机架的设置,则机架计数将为 8
预期输出:
{
"id": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/microsoft.managednetworkfabric/networkfabrics/NFName",
"name": "NFName",
"type": "microsoft.managednetworkfabric/networkfabrics",
"location": "<Location>",
"systemData": {
"createdBy": "97fdd529-68de-4ba5-aa3c-adf86bd564bf",
"createdByType": "Application",
"createdAt": "2023-XX-XXT18:29:58.3785568Z",
"lastModifiedBy": "97fdd529-68de-4ba5-aa3c-adf86bd564bf",
"lastModifiedByType": "Application",
"lastModifiedAt": "2023-XX-XXT18:29:58.3785568Z"
},
"properties": {
"fabricVersion": "1.0.0",
"networkFabricSku": "NFSKU",
"networkFabricControllerId": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFCResourceGroup/providers/microsoft.managednetworkfabric/networkfabriccontrollers/NFCName",
"terminalServerConfiguration": {
"username": "XXXX",
"serialNumber": "TerminalServerSerialNumber",
"primaryIpv4Prefix": "20.0.1.0/30",
"secondaryIpv4Prefix": "20.0.0.0/30"
},
"managementNetworkConfiguration": {
"infrastructureVpnConfiguration": {
"administrativeState": "Enabled",
"peeringOption": "OptionB",
"optionBProperties": {
"routeTargets": {
"importIpv4RouteTargets": [
"65048:10039"
],
"importIpv6RouteTargets": [
"65048:10039"
],
"exportIpv4RouteTargets": [
"65048:10039"
],
"exportIpv6RouteTargets": [
"65048:10039"
]
}
}
},
"workloadVpnConfiguration": {
"administrativeState": "Enabled",
"peeringOption": "OptionB",
"optionBProperties": {
"routeTargets": {
"importIpv4RouteTargets": [
"65048:10039"
],
"importIpv6RouteTargets": [
"65048:10039"
],
"exportIpv4RouteTargets": [
"65048:10039"
],
"exportIpv6RouteTargets": [
"65048:10039"
]
}
}
}
},
"provisioningState": "Updating",
"rackCount": 4,
"serverCountPerRack": 8,
"ipv4Prefix": "10.30.0.0/19",
"ipv6Prefix": "fda0:d59c:df02::/59",
"fabricASN": 65048
}
}
显示网络结构
az networkfarbic fabric show --resource-group "NFResourceGroupName" --resource-name "NFName"
预期输出:
{
"configurationState": "Provisioned",
"fabricASN": 65048,
"fabricVersion": "1.0.0",
"id": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/microsoft.managednetworkfabric/networkfabrics/NFName",
"ipv4Prefix": "10.2.0.0/19",
"ipv6Prefix": "fda0:d59c:df02::/59",
"l2IsolationDomains": [],
"l3IsolationDomains": [],
"location": "<Location>",
"managementNetworkConfiguration": {
"infrastructureVpnConfiguration": {
"administrativeState": "Enabled",
"optionBProperties": {
"routeTargets": {
"exportIpv4RouteTargets": [
"65048:10039"
],
"exportIpv6RouteTargets": [
"65048:10039"
],
"importIpv4RouteTargets": [
"65048:10039"
],
"importIpv6RouteTargets": [
"65048:10039"
]
}
},
"peeringOption": "OptionB"
},
"workloadVpnConfiguration": {
"administrativeState": "Enabled",
"optionBProperties": {
"routeTargets": {
"exportIpv4RouteTargets": [
"65048:10039"
],
"exportIpv6RouteTargets": [
"65048:10039"
],
"importIpv4RouteTargets": [
"65048:10039"
],
"importIpv6RouteTargets": [
"65048:10039"
]
}
},
"peeringOption": "OptionB"
}
},
"name": "NFName",
"networkFabricControllerId": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFCResourceGroupName/providers/microsoft.managednetworkfabric/networkfabriccontrollers/NFCName",
"networkFabricSku": "NFSKU",
"provisioningState": "Succeeded",
"rackCount": 4,
"racks": [
"/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourcegroups/NFResourceGroup/providers/microsoft.managednetworkfabric/networkracks/NFName-aggrack",
"/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourcegroups/NFResourceGroup/providers/microsoft.managednetworkfabric/networkracks/NFName-comprack1",
"/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourcegroups/NFResourceGroup/providers/microsoft.managednetworkfabric/networkracks/NFName-comprack2",
"/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourcegroups/NFResourceGroup/providers/microsoft.managednetworkfabric/networkracks/NFName-comprack3",
"/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourcegroups/NFResourceGroup/providers/microsoft.managednetworkfabric/networkracks/NFName-comprack4"
],
"resourceGroup": "NFResourceGroup",
"serverCountPerRack": 8,
"systemData": {
"createdAt": "2023-XX-XXT18:29:58.3785568Z",
"createdBy": "97fdd529-68de-4ba5-aa3c-adf86bd564bf",
"createdByType": "Application",
"lastModifiedAt": "2023-XX-XXT04:32:02.7129198Z",
"lastModifiedBy": "d1bd24c7-b27f-477e-86dd-939e107873d7",
"lastModifiedByType": "Application"
},
"terminalServerConfiguration": {
"primaryIpv4Prefix": "20.0.1.0/30",
"secondaryIpv4Prefix": "20.0.0.0/30",
"serialNumber": "TerminalServerSerialNumber",
"username": "XXXX"
},
"type": "microsoft.managednetworkfabric/networkfabrics"
}
列出资源组中的所有网络结构
az networkfabric fabric list --resource-group "NFResourceGroup"
预期输出:
{
"configurationState": "Provisioned",
"fabricASN": 65048,
"fabricVersion": "1.0.0",
"id": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/microsoft.managednetworkfabric/networkfabrics/NFName",
"ipv4Prefix": "10.2.0.0/19",
"ipv6Prefix": "fda0:d59c:df02::/59",
"l2IsolationDomains": [],
"l3IsolationDomains": [],
"location": "<Location>",
"managementNetworkConfiguration": {
"infrastructureVpnConfiguration": {
"administrativeState": "Enabled",
"optionBProperties": {
"routeTargets": {
"exportIpv4RouteTargets": [
"65048:10039"
],
"exportIpv6RouteTargets": [
"65048:10039"
],
"importIpv4RouteTargets": [
"65048:10039"
],
"importIpv6RouteTargets": [
"65048:10039"
]
}
},
"peeringOption": "OptionB"
},
"workloadVpnConfiguration": {
"administrativeState": "Enabled",
"optionBProperties": {
"routeTargets": {
"exportIpv4RouteTargets": [
"65048:10039"
],
"exportIpv6RouteTargets": [
"65048:10039"
],
"importIpv4RouteTargets": [
"65048:10039"
],
"importIpv6RouteTargets": [
"65048:10039"
]
}
},
"peeringOption": "OptionB"
}
},
"name": "NFName",
"networkFabricControllerId": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFCResourceGroupName/providers/microsoft.managednetworkfabric/networkfabriccontrollers/NFCName",
"networkFabricSku": "NFSKU",
"provisioningState": "Succeeded",
"rackCount": 4,
"racks": [
"/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourcegroups/NFResourceGroup/providers/microsoft.managednetworkfabric/networkracks/NFName-aggrack",
"/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourcegroups/NFResourceGroup/providers/microsoft.managednetworkfabric/networkracks/NFName-comprack1",
"/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourcegroups/NFResourceGroup/providers/microsoft.managednetworkfabric/networkracks/NFName-comprack2",
"/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourcegroups/NFResourceGroup/providers/microsoft.managednetworkfabric/networkracks/NFName-comprack3",
"/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourcegroups/NFResourceGroup/providers/microsoft.managednetworkfabric/networkracks/NFName-comprack4"
],
"resourceGroup": "NFResourceGroup",
"serverCountPerRack": 8,
"systemData": {
"createdAt": "2023-XX-XXT18:29:58.3785568Z",
"createdBy": "97fdd529-68de-4ba5-aa3c-adf86bd564bf",
"createdByType": "Application",
"lastModifiedAt": "2023-XX-XXT04:32:02.7129198Z",
"lastModifiedBy": "d1bd24c7-b27f-477e-86dd-939e107873d7",
"lastModifiedByType": "Application"
},
"terminalServerConfiguration": {
"primaryIpv4Prefix": "20.0.1.0/30",
"secondaryIpv4Prefix": "20.0.0.0/30",
"serialNumber": "TerminalServerSerialNumber",
"username": "XXXX"
},
"type": "microsoft.managednetworkfabric/networkfabrics"
}
配置 NNI
下表指定用于创建网络到网络互连的参数。
参数 | 说明 | 示例 | 必须 | 类型 |
---|---|---|---|---|
isMangementType | 用于使 NNI 可用于管理 Fabric 的配置。 默认值为 true。 可能的值包括 True 和 False | True | True | |
useOptionB | 用于启用 optionB 的配置。 可能的值包括 True 和 False | True | True | |
layer2Configuration | 第 2 层配置 | |||
portCount | 属于端口通道的端口数。 最大值基于 Fabric SKU | 3 | ||
mtu | CE 和 PE 之间的最大传输单位。 | 1500 | ||
layer3Configuration | CE 和 PE 之间的第 3 层配置 | True | ||
primaryIpv4Prefix | CE1 和 PE1 之间连接性的 IPv4 前缀。 为 CE1 端口通道接口分配前缀中的第一个可用 IP,并应为 PE1 上的相应接口分配第二个可用地址 | 10.246.0.124/31,CE1 端口通道接口分配 10.246.0.125,PE1 端口通道接口分配 10.246.0.126 | 字符串 | |
secondaryIpv4Prefix | CE2 和 PE2 之间连接性的 IPv4 前缀。 为 CE2 端口通道接口分配前缀中的第一个可用 IP,并应为 PE2 上的相应接口分配第二个可用地址 | 10.246.0.128/31,CE2 端口通道接口应分配 10.246.0.129,PE2 端口通道接口分配 10.246.0.130 | 字符串 | |
primaryIpv6Prefix | CE1 和 PE1 之间连接性的 IPv6 前缀。 为 CE1 端口通道接口分配前缀中的第一个可用 IP,并应为 PE1 上的相应接口分配第二个可用地址 | 3FFE:FFFF:0:CD30::a1 分配给 CE1,3FFE:FFFF:0:CD30::a2 分配给 PE1。 默认值为 3FFE:FFFF:0:CD30::a0/127 | 字符串 | |
secondaryIpv6Prefix | CE2 和 PE2 之间连接性的 IPv6 前缀。 为 CE2 端口通道接口分配前缀中的第一个可用 IP,并应为 PE2 上的相应接口分配第二个可用地址 | 3FFE:FFFF:0:CD30::a5 分配给 CE2,3FFE:FFFF:0:CD30::a6 分配给 PE2。 默认值为 3FFE:FFFF:0:CD30::a4/127。 | 字符串 | |
fabricAsn | CE 上分配的 ASN 编号,用以和 PE 进行 BGP 对等互连 | 65048 | ||
peerAsn | PE 上分配的 ASN 编号,用以和 CE 进行 BGP 对等互连。 对于 PE/CE 之间的 iBGP,该值应与 fabricAsn 相同,对于 eBGP,该值应不同于 fabricAsn | 65048 | True | |
fabricAsn | CE 上分配的 ASN 编号,用以和 PE 进行 BGP 对等互连 | 65048 | ||
vlan-Id | NNI 的 Vlan。范围介于 501-4095 之间 | 501 | ||
importRoutePolicy | 导入路由策略的详细信息。 | |||
exportRoutePolicy | 导出路由策略的详细信息。 | |||
nni-type | 默认值为 CE。 可选项为 CE 和 NPB | CE、PE |
创建网络到网络互连 (NNI)
必须先创建资源组和 Network Fabric,然后才能创建网络到网络互连。
运行以下命令以创建网络到网络互连(默认 nni 类型为 CE):
az networkfabric nni create \
--resource-group "NFResourceGroup" \
--location "<Location>" \
--resource-name "NFNNIName" \
--fabric "NFFabric" \
--is-management-type "True" \
--use-option-b "False" \
--layer2-configuration '{"portCount": 3, "mtu": 1500}' \
--layer3-configuration '{"peerASN": 65048, "vlanId": 501, "primaryIpv4Prefix": "10.2.0.124/30", "secondaryIpv4Prefix": "10.2.0.128/30", "primaryIpv6Prefix": "10:2:0:124::400/127", "secondaryIpv6Prefix": "10:2:0:124::402/127"}'
预期输出:
{
"id": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroupName/providers/microsoft.managednetworkfabric/networkfabrics/NFName/networkToNetworkInterconnects/NFNNIName",
"name": "NFNNIName",
"type": "microsoft.managednetworkfabric/networkfabrics/networktonetworkinterconnects",
"systemData": {
"createdBy": "97fdd529-68de-4ba5-aa3c-adf86bd564bf",
"createdByType": "Application",
"createdAt": "2023-XX-XXT18:30:14.613498Z",
"lastModifiedBy": "97fdd529-68de-4ba5-aa3c-adf86bd564bf",
"lastModifiedByType": "Application",
"lastModifiedAt": "2023-XX-XXT18:30:14.613498Z"
},
"properties": {
"administrativeState": "Enabled",
"nniType": "CE",
"isManagementType": "True",
"useOptionB": "False",
"layer2Configuration": {
"mtu": 1500
},
"optionBLayer3Configuration": {
"peerASN": 65050,
"vlanId": 501,
"fabricASN": 0,
"primaryIpv4Prefix": "10.2.0.124/30",
"primaryIpv6Prefix": "10:2:0:124::400/127"
"secondaryIpv4Prefix": "10.2.0.128/30"
"secondaryIpv6Prefix": "10:2:0:124::402/127"
},
"provisioningState": "Accepted",
"configurationState": "Succeeded"
}
}
显示 Network Fabric NNI(网络到网络接口)
az networkfabric nni show -g "NFResourceGroup" --resource-name "NFNNIName" --fabric "NFFabric"
预期输出:
{
"administrativeState": "Enabled",
"configurationState": "Succeeded",
"id": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroupName/providers/microsoft.managednetworkfabric/networkfabrics/NFName/networkToNetworkInterconnects/NFNNIName",
"isManagementType": "True",
"layer2Configuration": {
"mtu": 1500
},
"name": "nffab2lab180723-nni",
"nniType": "CE",
"optionBLayer3Configuration": {
"fabricASN": 0,
"peerASN": 65050,
"primaryIpv4Prefix": "10.2.0.124/30",
"primaryIpv6Prefix": "10:2:0:124::400/127"
"secondaryIpv4Prefix": "10.2.0.128/30"
"secondaryIpv6Prefix": "10:2:0:124::402/127"
"vlanId": 501
},
"provisioningState": "Succeeded",
"resourceGroup": "NFResourceGroupName",
"systemData": {
"createdAt": "2023-XX-XXT18:30:14.613498Z",
"createdBy": "97fdd529-68de-4ba5-aa3c-adf86bd564bf",
"createdByType": "Application",
"lastModifiedAt": "2023-XX-XXT18:30:14.613498Z",
"lastModifiedBy": "97fdd529-68de-4ba5-aa3c-adf86bd564bf",
"lastModifiedByType": "Application"
},
"type": "microsoft.managednetworkfabric/networkfabrics/networktonetworkinterconnects",
"useOptionB": "False"
}
列出或获取 Network Fabric NNI(网络到网络接口)
az networkfabric nni list -g NFResourceGroup --fabric NFFabric
预期输出:
{
"administrativeState": "Enabled",
"configurationState": "Succeeded",
"id": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroupName/providers/microsoft.managednetworkfabric/networkfabrics/NFName/networkToNetworkInterconnects/NFNNIName",
"isManagementType": "True",
"layer2Configuration": {
"mtu": 1500
},
"name": "nffab2lab180723-nni",
"nniType": "CE",
"optionBLayer3Configuration": {
"fabricASN": 0,
"peerASN": 65050,
"primaryIpv4Prefix": "10.2.0.124/30",
"primaryIpv6Prefix": "10:2:0:124::400/127"
"secondaryIpv4Prefix": "10.2.0.128/30"
"secondaryIpv6Prefix": "10:2:0:124::402/127"
"vlanId": 501
},
"provisioningState": "Succeeded",
"resourceGroup": "NFResourceGroupName",
"systemData": {
"createdAt": "2023-XX-XXT18:30:14.613498Z",
"createdBy": "97fdd529-68de-4ba5-aa3c-adf86bd564bf",
"createdByType": "Application",
"lastModifiedAt": "2023-XX-XXT18:30:14.613498Z",
"lastModifiedBy": "97fdd529-68de-4ba5-aa3c-adf86bd564bf",
"lastModifiedByType": "Application"
},
"type": "microsoft.managednetworkfabric/networkfabrics/networktonetworkinterconnects",
"useOptionB": "False"
}
后续步骤
- 使用设备上的实际序列号更新 networkDevice 资源中的序列号。 设备将序列号作为 DHCP 请求的一部分发送。
- 使用所有设备的序列号配置终端服务器(同时托管 DHCP 服务器)
- 通过零接触预配模式预配网络设备。根据 DHCP 请求中的序列号,DHCP 服务器使用相应设备的启动配置文件进行响应
更新 Network Fabric 设备
运行以下命令以更新 Network Fabric 设备:
az networkfabric device update \
--resource-group "NFResourceGroup" \
--resource-name "Network-Device-Name" \
--host-name "example-hostname" \
--serial-number "xxxx"
预期输出:
{
"id": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkDevices/Network-Device-Name",
"name": "Network-Device-Name",
"type": "microsoft.managednetworkfabric/networkdevices",
"location": "<Location>",
"systemData": {
"createdBy": "d1bd24c7-b27f-477e-86dd-939e107873d7",
"createdByType": "Application",
"createdAt": "2023-XX-XXT18:30:03.11544Z",
"lastModifiedBy": "97fdd529-68de-4ba5-aa3c-adf86bd564bf",
"lastModifiedByType": "Application",
"lastModifiedAt": "2023-XX-XXT18:30:29.1296291Z"
},
"properties": {
"networkRackId": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/Network-Device-Name",
"networkDeviceSku": "DefaultSku",
"networkDeviceRole": "XX",
"hostName": "example-hostname",
"serialNumber": "AXXXX;DCS-XXXXX-24;XX.XX;JXXXXXXX",
"version": "",
"configurationState": "Succeeded",
"administrativeState": "Enabled",
"provisioningState": "Succeeded"
}
注意
上述代码仅用作示例。 应更新属于AggrRack
和computeRacks
这两者的所有设备
例如,AggrRack
包括:
CE01
CE02
TOR17
TOR18
MgmtSwitch01
MgmtSwitch02
(等等,对于其他交换机)
列出或获取 Network Fabric 设备
运行以下命令,列出资源组中的网络结构设备:
az networkfabric device list --resource-group "NFResourceGroup"
预期输出:
[
{
"administrativeState": "Enabled",
"configurationState": "Succeeded",
"hostName": "example-hostname",
"id": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkDevices/Network-Device-Name",
"location": "<Location>",
"name": "Network-Device-Name",
"networkDeviceRole": "CE",
"networkDeviceSku": "DefaultSku",
"networkRackId": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/Network-Device-Name-aggrack",
"provisioningState": "Succeeded",
"resourceGroup": "NFResourceGroup",
"serialNumber": "AXXXX;DCS-XXXXX-24;XX.XX;JXXXXXXX",
"systemData": {
"createdAt": "2023-XX-XXT18:30:00.5266816Z",
"createdBy": "d1bd24c7-b27f-477e-86dd-939e107873d7",
"createdByType": "Application",
"lastModifiedAt": "2023-XX-XXT18:30:23.2231751Z",
"lastModifiedBy": "97fdd529-68de-4ba5-aa3c-adf86bd564bf",
"lastModifiedByType": "Application"
},
"type": "microsoft.managednetworkfabric/networkdevices",
"version": ""
},
{
"administrativeState": "Enabled",
"configurationState": "Succeeded",
"hostName": "AR-MGMT2",
"id": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkDevices/Network-Device-Name",
"location": "<Location>",
"name": "Network-Device-Name",
"networkDeviceRole": "TS",
"networkDeviceSku": "DefaultSku",
"networkRackId": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/Network-Device-Name-aggrack",
"provisioningState": "Succeeded",
"resourceGroup": "NFResourceGroup",
"serialNumber": "AXXXX;DCS-XXXXX-24;XX.XX;JXXXXXXX",
"systemData": {
"createdAt": "2023-XX-XXT18:30:00.727495Z",
"createdBy": "d1bd24c7-b27f-477e-86dd-939e107873d7",
"createdByType": "Application",
"lastModifiedAt": "2023-XX-XXT18:30:33.7864881Z",
"lastModifiedBy": "97fdd529-68de-4ba5-aa3c-adf86bd564bf",
"lastModifiedByType": "Application"
},
"type": "microsoft.managednetworkfabric/networkdevices",
"version": ""
},
{
"administrativeState": "Enabled",
"configurationState": "Succeeded",
"hostName": "example-hostname",
"id": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkDevices/Network-Device-Name",
"location": "<Location>",
"name": "Network-Device-Name",
"networkDeviceRole": "NPB",
"networkDeviceSku": "DefaultSku",
"networkRackId": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/Network-Device-Name-aggrack",
"provisioningState": "Succeeded",
"resourceGroup": "NFResourceGroup",
"serialNumber": "AXXXX;DCS-XXXXX-24;XX.XX;JXXXXXXX",
"systemData": {
"createdAt": "2023-XX-XXT18:30:00.7582997Z",
"createdBy": "d1bd24c7-b27f-477e-86dd-939e107873d7",
"createdByType": "Application",
"lastModifiedAt": "2023-XX-XXT18:30:34.9110792Z",
"lastModifiedBy": "97fdd529-68de-4ba5-aa3c-adf86bd564bf",
"lastModifiedByType": "Application"
},
"type": "microsoft.managednetworkfabric/networkdevices",
"version": ""
},
{
"administrativeState": "Enabled",
"configurationState": "Succeeded",
"hostName": "example-hostname",
"id": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkDevices/Network-Device-Name",
"location": "<Location>",
"name": "Network-Device-Name",
"networkDeviceRole": "CE",
"networkDeviceSku": "DefaultSku",
"networkRackId": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/Network-Device-Name-aggrack",
"provisioningState": "Succeeded",
"resourceGroup": "NFResourceGroup",
"serialNumber": "AXXXX;DCS-XXXXX-24;XX.XX;JXXXXXXX",
"systemData": {
"createdAt": "2023-XX-XXT18:30:00.7210136Z",
"createdBy": "d1bd24c7-b27f-477e-86dd-939e107873d7",
"createdByType": "Application",
"lastModifiedAt": "2023-XX-XXT18:30:24.426339Z",
"lastModifiedBy": "97fdd529-68de-4ba5-aa3c-adf86bd564bf",
"lastModifiedByType": "Application"
},
"type": "microsoft.managednetworkfabric/networkdevices",
"version": ""
},
{
"administrativeState": "Enabled",
"configurationState": "Succeeded",
"hostName": "example-hostname",
"id": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkDevices/Network-Device-Name",
"location": "<Location>",
"name": "Network-Device-Name",
"networkDeviceRole": "TS",
"networkDeviceSku": "DefaultSku",
"networkRackId": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/Network-Device-Name-aggrack",
"provisioningState": "Succeeded",
"resourceGroup": "NFResourceGroup",
"serialNumber": "AXXXX;DCS-XXXXX-24;XX.XX;JXXXXXXX",
"systemData": {
"createdAt": "2023-XX-XXT18:30:00.7722959Z",
"createdBy": "d1bd24c7-b27f-477e-86dd-939e107873d7",
"createdByType": "Application",
"lastModifiedAt": "2023-XX-XXT18:30:25.7076346Z",
"lastModifiedBy": "97fdd529-68de-4ba5-aa3c-adf86bd564bf",
"lastModifiedByType": "Application"
},
"type": "microsoft.managednetworkfabric/networkdevices",
"version": ""
},
{
"administrativeState": "Enabled",
"configurationState": "Succeeded",
"hostName": "example-hostname",
"id": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkDevices/Network-Device-Name",
"location": "<Location>",
"name": "Network-Device-Name",
"networkDeviceRole": "ToR",
"networkDeviceSku": "DefaultSku",
"networkRackId": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/nffab2lab180723-comprack1",
"provisioningState": "Succeeded",
"resourceGroup": "NFResourceGroup",
"serialNumber": "AXXXX;DCS-XXXXX-24;XX.XX;JXXXXXXX",
"systemData": {
"createdAt": "2023-XX-XXT18:30:03.0049164Z",
"createdBy": "d1bd24c7-b27f-477e-86dd-939e107873d7",
"createdByType": "Application",
"lastModifiedAt": "2023-XX-XXT18:30:28.0046231Z",
"lastModifiedBy": "97fdd529-68de-4ba5-aa3c-adf86bd564bf",
"lastModifiedByType": "Application"
},
"type": "microsoft.managednetworkfabric/networkdevices",
"version": ""
},
{
"administrativeState": "Enabled",
"configurationState": "Succeeded",
"hostName": "example-hostname",
"id": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkDevices/Network-Device-Name",
"location": "<Location>",
"name": "Network-Device-Name",
"networkDeviceRole": "TS",
"networkDeviceSku": "DefaultSku",
"networkRackId": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/nffab2lab180723-comprack1",
"provisioningState": "Succeeded",
"resourceGroup": "NFResourceGroup",
"serialNumber": "AXXXX;DCS-XXXXX-24;XX.XX;JXXXXXXX",
"systemData": {
"createdAt": "2023-XX-XXT18:30:03.11544Z",
"createdBy": "d1bd24c7-b27f-477e-86dd-939e107873d7",
"createdByType": "Application",
"lastModifiedAt": "2023-XX-XXT18:30:29.1296291Z",
"lastModifiedBy": "97fdd529-68de-4ba5-aa3c-adf86bd564bf",
"lastModifiedByType": "Application"
},
"type": "microsoft.managednetworkfabric/networkdevices",
"version": ""
},
{
"administrativeState": "Enabled",
"configurationState": "Succeeded",
"hostName": "example-hostname",
"id": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkDevices/Network-Device-Name",
"location": "<Location>",
"name": "Network-Device-Name",
"networkDeviceRole": "ToR",
"networkDeviceSku": "DefaultSku",
"networkRackId": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/nffab2lab180723-comprack1",
"provisioningState": "Succeeded",
"resourceGroup": "NFResourceGroup",
"serialNumber": "AXXXX;DCS-XXXXX-24;XX.XX;JXXXXXXX",
"systemData": {
"createdAt": "2023-XX-XXT18:30:03.1893834Z",
"createdBy": "d1bd24c7-b27f-477e-86dd-939e107873d7",
"createdByType": "Application",
"lastModifiedAt": "2023-XX-XXT18:30:26.7545474Z",
"lastModifiedBy": "97fdd529-68de-4ba5-aa3c-adf86bd564bf",
"lastModifiedByType": "Application"
},
"type": "microsoft.managednetworkfabric/networkdevices",
"version": ""
},
{
"administrativeState": "Enabled",
"configurationState": "Succeeded",
"hostName": "example-hostname",
"id": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkDevices/Network-Device-Name",
"location": "<Location>",
"name": "Network-Device-Name",
"networkDeviceRole": "ToR",
"networkDeviceSku": "DefaultSku",
"networkRackId": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/nffab2lab180723-comprack2",
"provisioningState": "Succeeded",
"resourceGroup": "NFResourceGroup",
"serialNumber": "AXXXX;DCS-XXXXX-24;XX.XX;JXXXXXXX",
"systemData": {
"createdAt": "2023-XX-XXT18:30:05.4237868Z",
"createdBy": "d1bd24c7-b27f-477e-86dd-939e107873d7",
"createdByType": "Application",
"lastModifiedAt": "2023-XX-XXT18:30:31.5047457Z",
"lastModifiedBy": "97fdd529-68de-4ba5-aa3c-adf86bd564bf",
"lastModifiedByType": "Application"
},
"type": "microsoft.managednetworkfabric/networkdevices",
"version": ""
},
{
"administrativeState": "Enabled",
"configurationState": "Succeeded",
"hostName": "example-hostname",
"id": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkDevices/Network-Device-Name",
"location": "<Location>",
"name": "Network-Device-Name",
"networkDeviceRole": "TS",
"networkDeviceSku": "DefaultSku",
"networkRackId": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/nffab2lab180723-comprack2",
"provisioningState": "Succeeded",
"resourceGroup": "NFResourceGroup",
"serialNumber": "AXXXX;DCS-XXXXX-24;XX.XX;JXXXXXXX",
"systemData": {
"createdAt": "2023-XX-XXT18:30:05.4580643Z",
"createdBy": "d1bd24c7-b27f-477e-86dd-939e107873d7",
"createdByType": "Application",
"lastModifiedAt": "2023-XX-XXT18:30:32.6766268Z",
"lastModifiedBy": "97fdd529-68de-4ba5-aa3c-adf86bd564bf",
"lastModifiedByType": "Application"
},
"type": "microsoft.managednetworkfabric/networkdevices",
"version": ""
},
{
"administrativeState": "Enabled",
"configurationState": "Succeeded",
"hostName": "example-hostname",
"id": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkDevices/Network-Device-Name",
"location": "<Location>",
"name": "Network-Device-Name",
"networkDeviceRole": "ToR",
"networkDeviceSku": "DefaultSku",
"networkRackId": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/nffab2lab180723-comprack2",
"provisioningState": "Succeeded",
"resourceGroup": "NFResourceGroup",
"serialNumber": "AXXXX;DCS-XXXXX-24;XX.XX;JXXXXXXX",
"systemData": {
"createdAt": "2023-XX-XXT18:30:05.4906233Z",
"createdBy": "d1bd24c7-b27f-477e-86dd-939e107873d7",
"createdByType": "Application",
"lastModifiedAt": "2023-XX-XXT18:30:30.4265486Z",
"lastModifiedBy": "97fdd529-68de-4ba5-aa3c-adf86bd564bf",
"lastModifiedByType": "Application"
},
"type": "microsoft.managednetworkfabric/networkdevices",
"version": ""
}
]
运行以下命令以获取或显示 Network Fabric 设备的详细信息:
az networkfabric device show --resource-group "NFResourceGroup" --resource-name "Network-Device-Name"
预期输出:
{
"administrativeState": "Enabled",
"configurationState": "Succeeded",
"hostName": "example-hostname",
"id": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkDevices/Network-Device-Name",
"location": "<Location>",
"name": "Network-Device-Name",
"networkDeviceRole": "ToR",
"networkDeviceSku": "DefaultSku",
"networkRackId": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/nffab2lab180723-comprack2",
"provisioningState": "Succeeded",
"resourceGroup": "NFResourceGroup",
"serialNumber": "AXXXX;DCS-XXXXX-24;XX.XX;JXXXXXXX",
"systemData": {
"createdAt": "2023-XX-XXT18:30:05.4906233Z",
"createdBy": "d1bd24c7-b27f-477e-86dd-939e107873d7",
"createdByType": "Application",
"lastModifiedAt": "2023-XX-XXT18:30:30.4265486Z",
"lastModifiedBy": "97fdd529-68de-4ba5-aa3c-adf86bd564bf",
"lastModifiedByType": "Application"
},
"type": "microsoft.managednetworkfabric/networkdevices",
"version": ""
}
预配网络结构
更新设备序列号后,运行以下命令预配并显示 Fabric:
az networkfabric fabric provision --resource-group "NFResourceGroup" --resource-name "NFName"
az networkfabric fabric show --resource-group "NFResourceGroup" --resource-name "NFName"
预期输出:
{
"configurationState": "Provisioned",
"fabricASN": 65048,
"fabricVersion": "1.0.0",
"id": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/microsoft.managednetworkfabric/networkfabrics/NFName",
"ipv4Prefix": "10.2.0.0/19",
"ipv6Prefix": "fda0:d59c:df02::/59",
"l2IsolationDomains": [],
"l3IsolationDomains": [],
"location": "<Location>",
"managementNetworkConfiguration": {
"infrastructureVpnConfiguration": {
"administrativeState": "Enabled",
"routeTargets": {
"exportIpv4RouteTargets": [
"65048:10039"
],
"exportIpv6RouteTargets": [
"65048:10039"
],
"importIpv4RouteTargets": [
"65048:10039"
],
"importIpv6RouteTargets": [
"65048:10039"
]
}
},
"peeringOption": "OptionB"
},
"workloadVpnConfiguration": {
"administrativeState": "Enabled",
"optionBProperties": {
"routeTargets": {
"exportIpv4RouteTargets": [
"65048:10050"
],
"exportIpv6RouteTargets": [
"65048:10050"
],
"importIpv4RouteTargets": [
"65048:10050"
],
"importIpv6RouteTargets": [
"65048:10050"
]
}
},
"peeringOption": "OptionB"
}
},
"name": "NFName",
"networkFabricControllerId": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFCResourceGroup/providers/microsoft.managednetworkfabric/networkfabriccontrollers/NFCName",
"networkFabricSku": "NFSKU",
"provisioningState": "Succeeded",
"rackCount": 4,
"racks": [
"/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFCResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/NFName-aggrack",
"/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFCResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/NFName-comprack1",
"/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFCResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/NFName-comprack2",
"/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFCResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/NFName-comprack3",
"/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFCResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/NFName-comprack4"
],
"resourceGroup": "NFResourceGroup",
"serverCountPerRack": 8,
"systemData": {
"createdAt": "2023-XX-XXT18:29:58.3785568Z",
"createdBy": "97fdd529-68de-4ba5-aa3c-adf86bd564bf",
"createdByType": "Application",
"lastModifiedAt": "2023-XX-XXT04:32:02.7129198Z",
"lastModifiedBy": "d1bd24c7-b27f-477e-86dd-939e107873d7",
"lastModifiedByType": "Application"
},
"terminalServerConfiguration": {
"primaryIpv4Prefix": "20.0.1.0/30",
"secondaryIpv4Prefix": "20.0.0.0/30",
"serialNumber": "XXXXXXXXXXXXXX",
"username": "XXXX"
},
"type": "microsoft.managednetworkfabric/networkfabrics"
}
取消预配 Fabric
若要取消预配结构,请确保该结构为已预配的操作状态,停止终端服务器上的 dhcp 服务,然后运行以下命令:
az networkfabric fabric deprovision --resource-group "NFResourceGroup" --resource-name "NFName"
预期输出:
{
"configurationState": "Deprovisioned",
"fabricASN": 65048,
"fabricVersion": "1.0.0",
"id": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/microsoft.managednetworkfabric/networkfabrics/NFName",
"ipv4Prefix": "10.2.0.0/19",
"ipv6Prefix": "fda0:d59c:df02::/59",
"l2IsolationDomains": [],
"l3IsolationDomains": [],
"location": "<Location>",
"managementNetworkConfiguration": {
"infrastructureVpnConfiguration": {
"administrativeState": "Enabled",
"optionBProperties": {
"routeTargets": {
"exportIpv4RouteTargets": [
"65048:10039"
],
"exportIpv6RouteTargets": [
"65048:10039"
],
"importIpv4RouteTargets": [
"65048:10039"
],
"importIpv6RouteTargets": [
"65048:10039"
]
}
},
"peeringOption": "OptionB"
},
"workloadVpnConfiguration": {
"administrativeState": "Enabled",
"optionBProperties": {
"routeTargets": {
"exportIpv4RouteTargets": [
"65048:10050"
],
"exportIpv6RouteTargets": [
"65048:10050"
],
"importIpv4RouteTargets": [
"65048:10050"
],
"importIpv6RouteTargets": [
"65048:10050"
]
}
},
"peeringOption": "OptionB"
}
},
"name": "NFName",
"networkFabricControllerId": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFCResourceGroup/providers/microsoft.managednetworkfabric/networkfabriccontrollers/NFCName",
"networkFabricSku": "NFSKU",
"provisioningState": "Succeeded",
"rackCount": 4,
"racks": [
"/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFCResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/NFName-aggrack",
"/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFCResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/NFName-comprack1",
"/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFCResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/NFName-comprack2",
"/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFCResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/NFName-comprack3",
"/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFCResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/NFName-comprack4"
],
"resourceGroup": "NFResourceGroup",
"serverCountPerRack": 8,
"systemData": {
"createdAt": "2023-XX-XXT18:29:58.3785568Z",
"createdBy": "97fdd529-68de-4ba5-aa3c-adf86bd564bf",
"createdByType": "Application",
"lastModifiedAt": "2023-XX-XXT04:32:02.7129198Z",
"lastModifiedBy": "d1bd24c7-b27f-477e-86dd-939e107873d7",
"lastModifiedByType": "Application"
},
"terminalServerConfiguration": {
"primaryIpv4Prefix": "20.0.1.0/30",
"secondaryIpv4Prefix": "20.0.0.0/30",
"serialNumber": "XXXXXXXXXXXXXX",
"username": "XXXX"
},
"type": "microsoft.managednetworkfabric/networkfabrics"
}
删除 Fabric
若要删除 Fabric,请运行以下命令。 在执行此操作之前,请确保:
- Fabric 处于已取消预配的操作状态。 如果 Fabric 处于预配状态,请运行
deprovision
命令。 - 没有与 Fabric 关联的机架。
az networkfabric fabric delete --resource-group "NFResourceGroup" --resource-name "NFName"
示例输出:
{
"configurationState": "Deleting",
"fabricASN": 65048,
"fabricVersion": "1.0.0",
"id": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFResourceGroup/providers/microsoft.managednetworkfabric/networkfabrics/NFName",
"ipv4Prefix": "10.2.0.0/19",
"ipv6Prefix": "fda0:d59c:df02::/59",
"l2IsolationDomains": [],
"l3IsolationDomains": [],
"location": "<Location>",
"managementNetworkConfiguration": {
"infrastructureVpnConfiguration": {
"administrativeState": "Enabled",
"optionBProperties": {
"routeTargets": {
"exportIpv4RouteTargets": [
"65048:10039"
],
"exportIpv6RouteTargets": [
"65048:10039"
],
"importIpv4RouteTargets": [
"65048:10039"
],
"importIpv6RouteTargets": [
"65048:10039"
]
}
},
"peeringOption": "OptionB"
},
"workloadVpnConfiguration": {
"administrativeState": "Enabled",
"optionBProperties": {
"routeTargets": {
"exportIpv4RouteTargets": [
"65048:10050"
],
"exportIpv6RouteTargets": [
"65048:10050"
],
"importIpv4RouteTargets": [
"65048:10050"
],
"importIpv6RouteTargets": [
"65048:10050"
]
}
},
"peeringOption": "OptionB"
}
},
"name": "NFName",
"networkFabricControllerId": "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFCResourceGroup/providers/microsoft.managednetworkfabric/networkfabriccontrollers/NFCName",
"networkFabricSku": "NFSKU",
"provisioningState": "Deleting",
"rackCount": 4,
"racks": [
"/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFCResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/NFName-aggrack",
"/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFCResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/NFName-comprack1",
"/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFCResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/NFName-comprack2",
"/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFCResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/NFName-comprack3",
"/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/NFCResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkRacks/NFName-comprack4"
],
"resourceGroup": "NFResourceGroup",
"serverCountPerRack": 7,
"systemData": {
"createdAt": "2023-XX-XXT18:29:58.3785568Z",
"createdBy": "97fdd529-68de-4ba5-aa3c-adf86bd564bf",
"createdByType": "Application",
"lastModifiedAt": "2023-XX-XXT04:32:02.7129198Z",
"lastModifiedBy": "d1bd24c7-b27f-477e-86dd-939e107873d7",
"lastModifiedByType": "Application"
},
"terminalServerConfiguration": {
"primaryIpv4Prefix": "20.0.1.0/30",
"secondaryIpv4Prefix": "20.0.0.0/30",
"serialNumber": "XXXXXXXXXXXXXX",
"username": "XXXX"
},
"type": "microsoft.managednetworkfabric/networkfabrics"
}
成功删除 Network Fabric 后,运行同一 Fabric 的显示时,将找不到任何可用资源。
az networkfabric fabric show --resource-group "NFResourceGroup" --resource-name "NFName"
预期输出:
(ResourceNotFound) The Resource 'Microsoft.ManagedNetworkFabric/NetworkFabrics/NFName' under resource group 'NFResourceGroup' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix
Code: ResourceNotFound
后续步骤
成功创建网络结构后,下一步是创建群集。