赞
踩
一、创建目标
本次创建的网络架构如下 ,
二、创建虚拟网络以及对子网进行划分
1.创建虚拟网络(核心网络 ,“CoreServicesVnet”)
CLI命令(在Azure Cloud Shell或者在本地使用az命令运行):
- az network vnet create \
- --resource-group learn-ed18a6ae-8dd2-41e9-8713-1ac776153925 \
- --name CoreServicesVnet \
- --address-prefixes 10.20.0.0/16 \
- --location westus
参数说明:
(1).--resource-group:指定资源组
(2) --name:给创建的网络命名
(3) --address-prefixes:设置公共IP前缀
(4) --location 指定本资源所在的区域
运行结果:
- {
- "newVNet": {
- "addressSpace": {
- "addressPrefixes": [
- "10.20.0.0/16"
- ]
- },
- "bgpCommunities": null,
- "ddosProtectionPlan": null,
- "dhcpOptions": {
- "dnsServers": []
- },
- "enableDdosProtection": false,
- "enableVmProtection": null,
- "etag": "W/\"f51f89a7-1fcf-48fb-b1d9-a262bc48dbf2\"",
- "extendedLocation": null,
- "flowTimeoutInMinutes": null,
- "id": "/subscriptions/155cbeab-3d1b-425f-bc74-00626dabdb12/resourceGroups/learn-ed18a6ae-8dd2-41e9-8713-1ac776153925/providers/Microsoft.Network/virtualNetworks/CoreServicesVnet",
- "ipAllocations": null,
- "location": "westus",
- "name": "CoreServicesVnet",
- "provisioningState": "Succeeded",
- "resourceGroup": "learn-ed18a6ae-8dd2-41e9-8713-1ac776153925",
- "resourceGuid": "a4cac0d7-06d4-481a-a0bf-25d4930310ee",
- "subnets": [],
- "tags": {},
- "type": "Microsoft.Network/virtualNetworks",
- "virtualNetworkPeerings": []
- }
- }
各项说明:
{
"newVNet": {
"addressSpace": { //地址空间
"addressPrefixes": [ //IP地址前缀,由--address-prefixes指定
"10.20.0.0/16"
]
},
"bgpCommunities": null,
"ddosProtectionPlan": null,
"dhcpOptions": {
"dnsServers": []
},
"enableDdosProtection": false,
"enableVmProtection": null,
"etag": "W/\"f51f89a7-1fcf-48fb-b1d9-a262bc48dbf2\"",
"extendedLocation": null,
"flowTimeoutInMinutes": null,
"id": "/subscriptions/155cbeab-3d1b-425f-bc74-00626dabdb12/resourceGroups/learn-ed18a6ae-8dd2-41e9-8713-1ac776153925/providers/Microsoft.Network/virtualNetworks/CoreServicesVnet",
"ipAllocations": null,
"location": "westus", //资源所在的未知区域,由--location指定
"name": "CoreServicesVnet", //该虚拟网络的名称,由--name指定
"provisioningState": "Succeeded",//
"resourceGroup": "learn-ed18a6ae-8dd2-41e9-8713-1ac776153925",//该虚拟网络所属的资源组,由--resource-group指定
"resourceGuid": "a4cac0d7-06d4-481a-a0bf-25d4930310ee",
"subnets": [],
"tags": {},
"type": "Microsoft.Network/virtualNetworks",
"virtualNetworkPeerings": []
}
}
2.将核心网络划分为四个子网(CoreServicesVnet)
(1)网关子网
CLI命令:
- az network vnet subnet create \
- --resource-group learn-ed18a6ae-8dd2-41e9-8713-1ac776153925 \
- --vnet-name CoreServicesVnet \
- --name GatewaySubnet \
- --address-prefixes 10.20.0.0/27
参数说明:
(1) --resource-group:指定该子网所属的资源组
(2) --vnet-name:指定该子网所属的虚拟网络
(3) --name:指定该子网的名称
(4) --address-prefixes:指定该子网的IP地址前缀
运行结果:
- {
- "addressPrefix": "10.20.0.0/27",
- "addressPrefixes": null,
- "applicationGatewayIpConfigurations": null,
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。