共用方式為


使用 Azure CLI 建立和佈建網路網狀架構

本文說明如何使用 Azure 命令列介面 (AzCLI) 來建立網路網狀架構。 本文也將示範如何檢查狀態、更新或刪除網路網狀架構。

必要條件

  • 具有有效訂用帳戶的 Azure 帳戶。
  • 安裝最新版的 CLI 命令。 如需安裝 CLI 命令的資訊,請參閱安裝 Azure CLI
  • 網路網狀架構控制器可在同一個 Azure 區域中管理多個網路網狀架構。
  • 根據 BoM 版本,具有纜線的實體運算元-Nexus 實例。
  • NFC 與運算子連接器執行個體之間的 Express Route 連線。
  • 已安裝和設定終端伺服器,並預先設定使用者名稱和密碼
  • 預先設定必要 VLAN、路由目標和 IP 位址的 PE 裝置。
  • 此處已清查支援的 SKU 資訊

佈建網狀架構與機架的步驟

  • 提供機架、伺服器計數、SKU 與網路設定,以建立網路網狀架構。
  • 提供第 2 層與第 3 層參數,以建立網路對網路互連
  • 將 networkDevice 資源中的序號更新為裝置上的實際序號。
  • 使用所有裝置的序號設定終端伺服器。
  • 佈建網路網狀架構。

網狀架構設定

下表指定用來建立網路網狀架構的參數:

$prefix: /subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers

參數 描述 範例 必要 類型
資源群組 資源群組的名稱 <NFResourceGroup> True
location Azure 運算子連接點區域 "eastus" True
resource-name FabricResource 的名稱 <NFName> True
nf-sku 網狀架構 SKU 標識碼是已排序 BoM 版本的 SKU。 請參閱 網路網狀架構 SKU M4-A400-A100-C16-ab True String
nfc-id 網路網狀架構控制器的「ARM 資源識別碼」 $prefix/NFCName True
rackcount 每個網狀架構的計算機架數目。 可能的值為 2-8 8 True
serverCountPerRack 每個機架的計算伺服器數目。 可能的值為 4、8、12 或 16 16 True
ipv4Prefix 管理網路的 IPv4 首碼。 此首碼對於網路網狀架構控制器中的所有網路網狀架構都應該是唯一的。 前置長度應至少為 19 (不允許/20、允許 /18 和更低) 10.246.0.0/19 True
ipv6Prefix 管理網路的 IPv6 首碼。 此首碼對於網路網狀架構控制器中的所有網路網狀架構都應該是唯一的。 10:5:0:0::/59 True
management-network-config 管理網路的詳細資料 True
infrastructureVpnConfiguration 網路網狀架構與網路網狀架構控制器中基礎結構服務之間管理 VPN 連線的詳細資料 True
optionBProperties MPLS 選項 10B 的詳細資料會用於進行網路網狀架構與網路網狀架構控制器之間的連線 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 連線的詳細資料
optionBProperties MPLS 選項 10B 的詳細資料會用於進行網路網狀架構與網路網狀架構控制器之間的連線
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 終端伺服器的序號 終端伺服器的 SN
subscription_id 客戶訂用帳戶標識碼 xxxxxxx-xxxx-xxxx-xxxx-xxxxxx

建立網路網狀架構

建立網路網狀架構之前,必須先建立資源群組。 建議為每個網路網狀架構建立個別資源群組。 您可以透過下列命令來建立資源群組:

az group create -n <NFResourceGroup> -l "East US"

執行下列命令來建立網路網狀架構:


az networkfabric fabric create \ 
--resource-group "<NFResourceGroup>" 
--location "<Location>" \
--resource-name "<NFName>" \
--nf-sku "<NFSKU>" \
--nfc-id "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/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
  • 如果這是八個機架的設定,則機架計數會是 8

預期輸出:

{
  "id": "/subscriptions/<subscription_id>/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/<subscription_id>/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 "<NFResourceGroup>" --resource-name "<NFName>"

預期輸出:


{
  "configurationState": "Provisioned",
  "fabricASN": 65048,
  "fabricVersion": "1.0.0",
  "id": "/subscriptions/<subscription_id>/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/<subscription_id>/resourceGroups/<NFCResourceGroup>/providers/microsoft.managednetworkfabric/networkfabriccontrollers/<NFCName>",
  "networkFabricSku": "<NFSKU>",
  "provisioningState": "Succeeded",
  "rackCount": 4,
  "racks": [
    "/subscriptions/<subscription_id>/resourcegroups/<NFResourceGroup>/providers/microsoft.managednetworkfabric/networkracks/<NFName-aggrack>",
    "/subscriptions/<subscription_id>/resourcegroups/<NFResourceGroup>/providers/microsoft.managednetworkfabric/networkracks/<NFName-comprack1>",
    "/subscriptions/<subscription_id>/resourcegroups/<NFResourceGroup>/providers/microsoft.managednetworkfabric/networkracks/<NFName-comprack2>",
    "/subscriptions/<subscription_id>/resourcegroups/<NFResourceGroup>/providers/microsoft.managednetworkfabric/networkracks/<NFName-comprack3>",
    "/subscriptions/<subscription_id>/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/<subscription_id>/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/<subscription_id>/resourceGroups/<NFCResourceGroup>/providers/microsoft.managednetworkfabric/networkfabriccontrollers/<NFCName>",
  "networkFabricSku": "<NFSKU>",
  "provisioningState": "Succeeded",
  "rackCount": 4,
  "racks": [
    "/subscriptions/<subscription_id>/resourcegroups/<NFResourceGroup>/providers/microsoft.managednetworkfabric/networkracks/<NFName-aggrack>",
    "/subscriptions/<subscription_id>/resourcegroups/<NFResourceGroup>/providers/microsoft.managednetworkfabric/networkracks/<NFName-comprack1>",
    "/subscriptions/<subscription_id>/resourcegroups/<NFResourceGroup>/providers/microsoft.managednetworkfabric/networkracks/<NFName-comprack2>",
    "/subscriptions/<subscription_id>/resourcegroups/<NFResourceGroup>/providers/microsoft.managednetworkfabric/networkracks/<NFName-comprack3>",
    "/subscriptions/<subscription_id>/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

下表指定用來建立網路對網路互連的參數。

參數 描述 範例 必要 類型
isManagementType 讓 NNI 用於管理網狀架構的設定。 預設值為 True。 可能的值為 True/False True True
useOptionB 用於啟用 optionB 的設定。 可能的值為 True/False True True
layer2Configuration 第 2 層設定
interfaces 定義多個 CE-PE 介面。 最大值會視網狀架構 SKU 而定 /subscriptions/subscription_id/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/NFName-aggrack-CEXX/networkInterfaces/EthernetX-X”
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 String
secondaryIpv4Prefix CE2 與 PE2 之間連線的 IPv4 首碼。 CE2 連接埠通道介面應獲指派首碼中的第一個可用 IP,而 PE2 上的對應介面應獲指派第二個可用位址 10.246.0.128/31,CE2 連接埠通道介面應獲指派 10.246.0.129,而 PE2 連接埠通道介面應獲指派 10.246.0.130 String
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 String
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。 String
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.Range 的 Vlan 介於 501-4095 501
importRoutePolicy 匯入路由原則的詳細資料。
exportRoutePolicy 匯出路由原則的詳細資料。
nni-type 預設值為 CE。 選項包括 CE 和 NPB CE、PE

建立網路對網路互連 (NNI)

建立網路對網路互連之前,必須先建立資源群組與網路網狀架構。

執行下列命令來建立網路對網路互連 (預設 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 '{"interfaces": ["/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE1>/networkInterfaces/Ethernet1-1",
"/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE2>/networkInterfaces/Ethernet1-1",
"/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE1>/networkInterfaces/Ethernet2-1",
"/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE2>/networkInterfaces/Ethernet2-1",
"/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE1>/networkInterfaces/Ethernet3-1",
"/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE2>/networkInterfaces/Ethernet3-1",
"/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE1>/networkInterfaces/Ethernet4-1",
"/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE2>/networkInterfaces/Ethernet4-1",
"/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE1>/networkInterfaces/Ethernet5-1",
"/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE2>/networkInterfaces/Ethernet5-1",
"/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE1>/networkInterfaces/Ethernet6-1",
"/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE2>/networkInterfaces/Ethernet6-1"], "mtu": <mtu>}' \
--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/<subscription_id>/resourceGroups/<NFResourceGroup>/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": {
      "interfaces": [
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE1>/networkInterfaces/Ethernet1-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE2>/networkInterfaces/Ethernet1-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE1>/networkInterfaces/Ethernet2-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE2>/networkInterfaces/Ethernet2-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE1>/networkInterfaces/Ethernet3-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE2>/networkInterfaces/Ethernet3-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE1>/networkInterfaces/Ethernet4-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE2>/networkInterfaces/Ethernet4-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE1>/networkInterfaces/Ethernet5-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE2>/networkInterfaces/Ethernet5-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE1>/networkInterfaces/Ethernet6-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE2>/networkInterfaces/Ethernet6-1"
      ],
      "mtu": <mtu>
    },
    "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"
  }
}

顯示網路網狀架構 NNI (網路對網路介面)

az networkfabric nni show -g "<NFResourceGroup>" --resource-name "<NFNNIName>" --fabric "<NFFabric>"

預期輸出:

{
  "administrativeState": "Enabled",
  "configurationState": "Succeeded",
  "id": "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/microsoft.managednetworkfabric/networkfabrics/NFName/networkToNetworkInterconnects/<NFNNIName>",
  "isManagementType": "True",
  "layer2Configuration": {
    "interfaces": [
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE1>/networkInterfaces/Ethernet1-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE2>/networkInterfaces/Ethernet1-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE1>/networkInterfaces/Ethernet2-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE2>/networkInterfaces/Ethernet2-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE1>/networkInterfaces/Ethernet3-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE2>/networkInterfaces/Ethernet3-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE1>/networkInterfaces/Ethernet4-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE2>/networkInterfaces/Ethernet4-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE1>/networkInterfaces/Ethernet5-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE2>/networkInterfaces/Ethernet5-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE1>/networkInterfaces/Ethernet6-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE2>/networkInterfaces/Ethernet6-1"
      ],
      "mtu": <mtu>
  },
  "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": "NFResourceGroup",
  "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"
}

列出或取得網路網狀架構 NNI (網路對網路介面)

az networkfabric nni list -g <NFResourceGroup> --fabric <NFFabric>

預期輸出:

{
  "administrativeState": "Enabled",
  "configurationState": "Succeeded",
  "id": "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/microsoft.managednetworkfabric/networkfabrics/<NFName>/networkToNetworkInterconnects/<NFNNIName>",
  "isManagementType": "True",
  "layer2Configuration": {
      "interfaces": [
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE1>/networkInterfaces/Ethernet1-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE2>/networkInterfaces/Ethernet1-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE1>/networkInterfaces/Ethernet2-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE2>/networkInterfaces/Ethernet2-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE1>/networkInterfaces/Ethernet3-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE2>/networkInterfaces/Ethernet3-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE1>/networkInterfaces/Ethernet4-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE2>/networkInterfaces/Ethernet4-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE1>/networkInterfaces/Ethernet5-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE2>/networkInterfaces/Ethernet5-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE1>/networkInterfaces/Ethernet6-1",
      "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/<NFName-aggrack-CE2>/networkInterfaces/Ethernet6-1"
      ],
      "mtu": <mtu>
  },
  "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": "<NFResourceGroup>",
  "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 伺服器會以對應裝置的開機設定檔回應

更新網路網狀架構裝置

執行下列命令來更新網路網狀架構裝置:


az networkfabric device update \
--resource-group "<NFResourceGroup>" \
--resource-name "<Network-Device-Name>" \
--host-name "<example-hostname>" \
--serial-number "<xxxx>"

預期輸出:

{
  "id": "/subscriptions/<subscription_id>/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/<subscription_id>/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"
  }

注意

上述程序碼僅作為範例。 您應該更新屬於 AggrRackcomputeRacks 的所有裝置

例如,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/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/Network-Device-Name",
    "location": "<Location>",
    "name": "Network-Device-Name",
    "networkDeviceRole": "CE",
    "networkDeviceSku": "DefaultSku",
    "networkRackId": "/subscriptions/<subscription_id>/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/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/Network-Device-Name",
    "location": "<Location>",
    "name": "Network-Device-Name",
    "networkDeviceRole": "TS",
    "networkDeviceSku": "DefaultSku",
    "networkRackId": "/subscriptions/<subscription_id>/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/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/Network-Device-Name",
    "location": "<Location>",
    "name": "Network-Device-Name",
    "networkDeviceRole": "NPB",
    "networkDeviceSku": "DefaultSku",
    "networkRackId": "/subscriptions/<subscription_id>/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/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/Network-Device-Name",
    "location": "<Location>",
    "name": "Network-Device-Name",
    "networkDeviceRole": "CE",
    "networkDeviceSku": "DefaultSku",
    "networkRackId": "/subscriptions/<subscription_id>/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/<subscription_id>/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkDevices/Network-Device-Name",
    "location": "<Location>",
    "name": "Network-Device-Name",
    "networkDeviceRole": "TS",
    "networkDeviceSku": "DefaultSku",
    "networkRackId": "/subscriptions/<subscription_id>/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/<subscription_id>/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkDevices/Network-Device-Name",
    "location": "<Location>",
    "name": "Network-Device-Name",
    "networkDeviceRole": "ToR",
    "networkDeviceSku": "DefaultSku",
    "networkRackId": "/subscriptions/<subscription_id>/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/<subscription_id>/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkDevices/Network-Device-Name",
    "location": "<Location>",
    "name": "Network-Device-Name",
    "networkDeviceRole": "TS",
    "networkDeviceSku": "DefaultSku",
    "networkRackId": "/subscriptions/<subscription_id>/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/<subscription_id>/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkDevices/Network-Device-Name",
    "location": "<Location>",
    "name": "Network-Device-Name",
    "networkDeviceRole": "ToR",
    "networkDeviceSku": "DefaultSku",
    "networkRackId": "/subscriptions/<subscription_id>/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/<subscription_id>/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkDevices/Network-Device-Name",
    "location": "<Location>",
    "name": "Network-Device-Name",
    "networkDeviceRole": "ToR",
    "networkDeviceSku": "DefaultSku",
    "networkRackId": "/subscriptions/<subscription_id>/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/<subscription_id>/resourceGroups/NFResourceGroup/providers/Microsoft.ManagedNetworkFabric/networkDevices/Network-Device-Name",
    "location": "<Location>",
    "name": "Network-Device-Name",
    "networkDeviceRole": "TS",
    "networkDeviceSku": "DefaultSku",
    "networkRackId": "/subscriptions/<subscription_id>/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/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/Network-Device-Name",
    "location": "<Location>",
    "name": "Network-Device-Name",
    "networkDeviceRole": "ToR",
    "networkDeviceSku": "DefaultSku",
    "networkRackId": "/subscriptions/<subscription_id>/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": ""
  }
]

執行下列命令來取得或顯示網路網狀架構裝置的詳細資料:

az networkfabric device show --resource-group "<NFResourceGroup>" --resource-name "<Network-Device-Name>"

預期輸出:

{
  "administrativeState": "Enabled",
  "configurationState": "Succeeded",
  "hostName": "example-hostname",
  "id": "/subscriptions/<subscription_id>/resourceGroups/<NFResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkDevices/Network-Device-Name",
  "location": "<Location>",
  "name": "Network-Device-Name",
  "networkDeviceRole": "ToR",
  "networkDeviceSku": "DefaultSku",
  "networkRackId": "/subscriptions/<subscription_id>/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": ""
}

布建網路網狀架構

更新裝置序號之後,請執行下列命令來佈建和顯示網狀架構:

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/<subscription_id>/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/<subscription_id>/resourceGroups/<NFCResourceGroup>/providers/microsoft.managednetworkfabric/networkfabriccontrollers/<NFCName>",
  "networkFabricSku": "<NFSKU>",
  "provisioningState": "Succeeded",
  "rackCount": 4,
  "racks": [
    "/subscriptions/<subscription_id>/resourceGroups/<NFCResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkRacks/<NFName-aggrack>",
    "/subscriptions/<subscription_id>/resourceGroups/<NFCResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkRacks/<NFName-comprack1>",
    "/subscriptions/<subscription_id>/resourceGroups/<NFCResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkRacks/<NFName-comprack2>",
    "/subscriptions/<subscription_id>/resourceGroups/<NFCResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkRacks/<NFName-comprack3>",
    "/subscriptions/<subscription_id>/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"
}

取消佈建網狀架構

若要取消布建網狀架構,請確定網狀架構處於布建作業狀態、停止終端伺服器上的 dhcp 服務,然後執行此命令:

az networkfabric fabric deprovision --resource-group "<NFResourceGroup>" --resource-name "<NFName>"

預期輸出:

{
  "configurationState": "Deprovisioned",
  "fabricASN": 65048,
  "fabricVersion": "1.0.0",
  "id": "/subscriptions/<subscription_id>/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/<subscription_id>/resourceGroups/<NFCResourceGroup>/providers/microsoft.managednetworkfabric/networkfabriccontrollers/<NFCName>",
  "networkFabricSku": "<NFSKU>",
  "provisioningState": "Succeeded",
  "rackCount": 4,
  "racks": [
    "/subscriptions/<subscription_id>/resourceGroups/<NFCResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkRacks/<NFName-aggrack>",
    "/subscriptions/<subscription_id>/resourceGroups/<NFCResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkRacks/<NFName-comprack1>",
    "/subscriptions/<subscription_id>/resourceGroups/<NFCResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkRacks/<NFName-comprack2>",
    "/subscriptions/<subscription_id>/resourceGroups/<NFCResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkRacks/<NFName-comprack3>",
    "/subscriptions/<subscription_id>/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"
}

刪除網狀架構

若要刪除網狀架構,請執行下列命令。 刪除之前,請確定:

  • 網狀架構處於已取消佈建作業狀態。 如果處於已佈建狀態,請執行 deprovision 命令。
  • 沒有與網狀架構相關聯的機架。
az networkfabric fabric delete --resource-group "<NFResourceGroup>" --resource-name "<NFName>"

範例輸出:

{
  "configurationState": "Deleting",
  "fabricASN": 65048,
  "fabricVersion": "1.0.0",
  "id": "/subscriptions/<subscription_id>/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/<subscription_id>/resourceGroups/<NFCResourceGroup>/providers/microsoft.managednetworkfabric/networkfabriccontrollers/<NFCName>",
  "networkFabricSku": "<NFSKU>",
  "provisioningState": "Deleting",
  "rackCount": 4,
  "racks": [
    "/subscriptions/<subscription_id>/resourceGroups/<NFCResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkRacks/<NFName-aggrack>",
    "/subscriptions/<subscription_id>/resourceGroups/<NFCResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkRacks/<NFName-comprack1>",
    "/subscriptions/<subscription_id>/resourceGroups/<NFCResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkRacks/<NFName-comprack2>",
    "/subscriptions/<subscription_id>/resourceGroups/<NFCResourceGroup>/providers/Microsoft.ManagedNetworkFabric/networkRacks/<NFName-comprack3>",
    "/subscriptions/<subscription_id>/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"
}

成功刪除網路網狀架構之後,當您顯示相同的網狀架構時,您將找不到任何可用的資源。

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

下一步

成功建立 Network Fabric 之後,下一個步驟是建立 叢集