用于网络的 Azure CLI 示例Azure CLI Samples for networking

下表包含指向使用 Azure CLI 生成的 bash 脚本的链接。The following table includes links to bash scripts built using the Azure CLI.

ScriptScript 说明Description
Azure 资源之间的连接 Connectivity between Azure resources
为多层应用程序创建虚拟网络Create a virtual network for multi-tier applications 创建包含前端和后端子网的虚拟网络。Creates a virtual network with front-end and back-end subnets. 传入前端子网的流量仅限 HTTP 和 SSH,而传入后端子网的流量限于 MySQL、端口 3306。Traffic to the front-end subnet is limited to HTTP and SSH, while traffic to the back-end subnet is limited to MySQL, port 3306.
两个对等虚拟网络Peer two virtual networks 在同一区域中创建并连接两个虚拟网络。Creates and connects two virtual networks in the same region.
通过网络虚拟设备的路由流量Route traffic through a network virtual appliance 创建包含前端和后端子网的虚拟网络,以及可在这两个子网之间路由流量的 VM。Creates a virtual network with front-end and back-end subnets and a VM that is able to route traffic between the two subnets.
筛选入站和出站 VM 网络流量Filter inbound and outbound VM network traffic 创建包含前端和后端子网的虚拟网络。Creates a virtual network with front-end and back-end subnets. 前端子网的入站网络流量仅限于 HTTP、HTTPS 和 SSH。Inbound network traffic to the front-end subnet is limited to HTTP, HTTPS and SSH. 从后端子网到 Internet 的出站流量不受限制。Outbound traffic to the Internet from the back-end subnet is not permitted.
负载均衡和流量方向 Load balancing and traffic direction
在 VM 上对多个网站进行负载均衡Load balance multiple websites on VMs 创建两个具有多个 IP 配置、联接到 Azure 可用性集、可通过 Azure 负载均衡器访问的 VM。Creates two VMs with multiple IP configurations, joined to an Azure Availability Set, accessible through an Azure Load Balancer.
跨多个区域定向流量,以实现应用程序的高可用性Direct traffic across multiple regions for high application availability 创建两个应用服务计划、两个 Web 应用、一个流量管理器配置文件和两个流量管理器终结点。Creates two app service plans, two web apps, a traffic manager profile, and two traffic manager endpoints.