The az network command is part of the azure-cli tool, which is the official Command-Line Interface (CLI) provided by Microsoft for managing Azure resources and services.
The az network command allows you to manage various Azure network resources, providing a wide range of functionalities for networking configurations. Here’s an overview of its functionality:
- Virtual Networks: With the az network vnet subcommand, you can create, delete, and manage virtual networks in Azure. Virtual networks (VNETs) act as isolated network environments in the cloud, allowing you to define IP address ranges, subnets, and network security rules to control communication between resources.
- Subnets: Azure CLI provides the az network vnet subnet subcommand to manage subnets within virtual networks. You can create, delete, and update subnets, assign IP address ranges, and configure network security groups (NSGs) to control traffic flow and security within the subnets.
- Network Security Groups: The az network nsg subcommand enables you to manage network security groups in Azure. Network security groups act as virtual firewalls that allow or deny traffic to resources based on security rules. You can create, delete, and update NSGs, as well as define inbound and outbound rules to control network traffic.
- Network Interfaces: With the az network nic subcommand, you can manage network interfaces in Azure. Network interfaces provide connectivity for virtual machines (VMs) and other Azure resources. You can create, delete, and update network interfaces, configure IP configurations, and associate them with virtual machines or virtual machine scale sets.
- Load Balancers: Azure CLI includes the az network lb subcommand to manage load balancers in Azure. Load balancers distribute incoming network traffic across multiple resources to ensure high availability and scalability. You can create, delete, and update load balancers, configure load balancing rules, health probes, and backend pools.
- Virtual Private Network (VPN): The az network vpn subcommand allows you to manage Azure VPN gateways and connections. You can create and configure virtual network gateways, establish site-to-site or point-to-site VPN connections, and manage VPN connections for secure communication between on-premises networks and Azure.
- ExpressRoute: The az network express-route subcommand enables you to manage Azure ExpressRoute, which provides a dedicated and private connection between your on-premises network and Azure. You can create and configure ExpressRoute circuits, view circuit stats, and manage peering connections.
These are just a few examples of the functionalities offered by the az network command. Azure CLI provides a comprehensive set of commands to manage various networking resources and configurations in Azure. By using the az network command, you can effectively create, configure, and manage networking components to establish secure and reliable network architectures in Azure.
az network Command Examples
1. List network resources in a region that are used against a subscription quota:
# az network list-usages
2. List all virtual networks in a subscription:
# az network vnet list
3. Create a virtual network:
# az network vnet create --address-prefixes 10.0.0.0/16 --name vnet --resource_group group_name --submet-name subnet --subnet-prefixes 10.0.0.0/24
4. Enable accelerated networking for a network interface card:
# az network nic update --accelerated-networking true --name nic --resource-group resource_group