Azure Virtual Network with Azure cloud shell
How to create Azure Virtual Network with Azure Cloud Shell ?
Below is an example to start:
az network vnet create --resource-group RG20 --name VNET1 --location eastus --address-prefixes 10.10.0.0/16
We specified the resource-group, the location, the name of the VNet and the adress-range.
Below is the output
The address prefixes is what is called Address space, it is the address range from which we can assign subnets prefixes once we create subnets inside this virtual network.
To create a subnet in the VNet:
az network vnet subnet create --address-prefixes 10.10.10.0/24 --name SUBNET1 --resource-group RG20 --vnet-name VNET1
The subnet is 10.10.10.0/24, the name of the subnet is SUBNET1. Below are outputs:
If we try to create a subnet that is not in the address-range of the VNet, we will receive an error: below is an example:
To list virtual networks with azure cloud shell:
az network vnet list
Update a virtual network with azure cloud shell, example add DNS-Servers to VNet, below is an example:
az network vnet update --resource-group RG20 --name VNET1 --dns-server 10.10.40.1
To delete a virtual network with azure cloud shell:
az network vnet delete --name VNET1 --resource-group RG20
For more information about our services, visit
We hope this article was helpfull, and we would like to thank you for viewing
Comments
Post a Comment