Azure Networking Operations: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=Internal= * Azure Networking Concepts * Azure Operations") |
|||
(11 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
* [[Azure Networking Concepts]] | * [[Azure Networking Concepts]] | ||
* [[Azure Operations]] | * [[Azure Operations]] | ||
=Virtual Network Operations= | |||
==Information about Virtual Networks== | |||
<syntaxhighlight lang='bash'> | |||
az network vnet show --resource-group <resource-group-name> --name <vnet-name> | |||
</syntaxhighlight> | |||
Displays information about the virtual network itself and its subnets. | |||
==Create Virtual Network== | |||
<syntaxhighlight lang='bash'> | |||
az network vnet create \ | |||
--resource-group <rg-name> \ | |||
--name <vnet-name> \ | |||
--address-prefixes 10.0.0.0/16 | |||
</syntaxhighlight> | |||
Result: | |||
<syntaxhighlight lang='json'> | |||
{ | |||
"newVNet": { | |||
"addressSpace": { | |||
"addressPrefixes": [ | |||
"10.0.0.0/16" | |||
] | |||
}, | |||
"bgpCommunities": null, | |||
"ddosProtectionPlan": null, | |||
"dhcpOptions": { | |||
"dnsServers": [] | |||
}, | |||
"enableDdosProtection": false, | |||
"enableVmProtection": false, | |||
"etag": "W/\"99999999-9999-9999-9999-999999999999\"", | |||
"id": "/subscriptions/99999999-9999-9999-9999-999999999999/resourceGroups/some-rg/providers/Microsoft.Network/virtualNetworks/some-vnet", | |||
"ipAllocations": null, | |||
"location": "eastus2", | |||
"name": "some-vnet", | |||
"provisioningState": "Succeeded", | |||
"resourceGroup": "some-rg", | |||
"resourceGuid": "99999999-9999-9999-9999-999999999999", | |||
"subnets": [], | |||
"tags": {}, | |||
"type": "Microsoft.Network/virtualNetworks", | |||
"virtualNetworkPeerings": [] | |||
} | |||
</syntaxhighlight> | |||
==Information about a Subnet== | |||
<syntaxhighlight lang='bash'> | |||
az network vnet subnet show \ | |||
--resource-group <rg-name> \ | |||
--vnet-name <vnet-name> \ | |||
--name <subnet-name> | |||
</syntaxhighlight> | |||
==Create Subnet== | |||
<syntaxhighlight lang='bash'> | |||
az network vnet subnet create \ | |||
--resource-group <rg-name> \ | |||
--vnet-name <vnet-name> \ | |||
--name <subnet-name> \ | |||
--address-prefixes 10.0.0.0/17 \ | |||
--service-endpoints Microsoft.ContainerRegistry | |||
</syntaxhighlight> | |||
=Delete Subnet= | |||
<syntaxhighlight lang='bash'> | |||
az network vnet subnet delete \ | |||
--resource-group <rg-name> \ | |||
--vnet-name <vnet-name> \ | |||
--name <subnet-name> | |||
</syntaxhighlight> |
Latest revision as of 21:08, 19 November 2020
Internal
Virtual Network Operations
Information about Virtual Networks
az network vnet show --resource-group <resource-group-name> --name <vnet-name>
Displays information about the virtual network itself and its subnets.
Create Virtual Network
az network vnet create \
--resource-group <rg-name> \
--name <vnet-name> \
--address-prefixes 10.0.0.0/16
Result:
{
"newVNet": {
"addressSpace": {
"addressPrefixes": [
"10.0.0.0/16"
]
},
"bgpCommunities": null,
"ddosProtectionPlan": null,
"dhcpOptions": {
"dnsServers": []
},
"enableDdosProtection": false,
"enableVmProtection": false,
"etag": "W/\"99999999-9999-9999-9999-999999999999\"",
"id": "/subscriptions/99999999-9999-9999-9999-999999999999/resourceGroups/some-rg/providers/Microsoft.Network/virtualNetworks/some-vnet",
"ipAllocations": null,
"location": "eastus2",
"name": "some-vnet",
"provisioningState": "Succeeded",
"resourceGroup": "some-rg",
"resourceGuid": "99999999-9999-9999-9999-999999999999",
"subnets": [],
"tags": {},
"type": "Microsoft.Network/virtualNetworks",
"virtualNetworkPeerings": []
}
Information about a Subnet
az network vnet subnet show \
--resource-group <rg-name> \
--vnet-name <vnet-name> \
--name <subnet-name>
Create Subnet
az network vnet subnet create \
--resource-group <rg-name> \
--vnet-name <vnet-name> \
--name <subnet-name> \
--address-prefixes 10.0.0.0/17 \
--service-endpoints Microsoft.ContainerRegistry
Delete Subnet
az network vnet subnet delete \
--resource-group <rg-name> \
--vnet-name <vnet-name> \
--name <subnet-name>