您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

使用 Azure 门户创建虚拟网络(经典)Create a virtual network (classic) by using the Azure portal

Azure 虚拟网络 (VNet) 是自己的网络在云中的表示形式。An Azure virtual network (VNet) is a representation of your own network in the cloud. 可以控制 Azure 网络设置并定义 DHCP 地址块、DNS 设置、安全策略和路由。You can control your Azure network settings and define DHCP address blocks, DNS settings, security policies, and routing. 还可以进一步将 VNet 细分为子网,并以将物理计算机和虚拟机部署到本地数据中心的相同方式部署 Azure IaaS 虚拟机 (VM) 和 PaaS 角色实例。You can also further segment your VNet into subnets and deploy Azure IaaS virtual machines (VMs) and PaaS role instances, in the same way you can deploy physical and virtual machines to your on-premises datacenter. 从本质上讲,可以将网络扩展到 Azure,自带 IP 地址块。In essence, you can expand your network to Azure, bringing your own IP address blocks. 如果不熟悉 VNet,请阅读 虚拟网络概述Read the virtual network overview if you are not familiar with VNets.

重要

在使用 Azure 资源之前,请务必了解 Azure 当前使用两种部署模型:Azure 资源管理器部署模型和经典部署模型。Before you work with Azure resources, it's important to understand that Azure currently has two deployment models: Azure Resource Manager and classic. 在使用任何 Azure 资源之前,请确保了解 部署模型和工具Make sure you understand deployment models and tools before you work with any Azure resource. 可以通过单击本文顶部的选项卡来查看不同工具的文档。You can view the documentation for different tools by clicking the tabs at the top of this article.

本文档介绍如何使用经典部署模型创建 VNet。This document covers creating a VNet by using the classic deployment model. 还可以使用 Azure 门户在 Resource Manager 部署模型中创建虚拟网络You can also create a virtual network in the Resource Manager deployment model by using the Azure portal.

方案Scenario

为了更好地说明如何创建 VNet 和子网,本文档将使用以下方案。To better illustrate how to create a VNet and subnets, this document will use the scenario below.

VNet 方案

在此方案中,将使用保留 CIDR 块 192.168.0.0./16 创建名为 TestVNet 的 VNet。In this scenario you will create a VNet named TestVNet with a reserved CIDR block of 192.168.0.0./16. VNet 将包含以下子网:Your VNet will contain the following subnets:

  • FrontEnd,使用 192.168.1.0/24 作为其 CIDR 块。FrontEnd, using 192.168.1.0/24 as its CIDR block.
  • BackEnd,使用 192.168.2.0/24 作为其 CIDR 块。BackEnd, using 192.168.2.0/24 as its CIDR block.

如何在 Azure 门户中创建经典 VNetHow to create a classic VNet in the Azure portal

若要基于上述方案创建经典 VNet,请执行以下步骤。To create a classic VNet based on the scenario above, follow the steps below.

  1. 从浏览器导航到 http://portal.azure.com,并在必要时用 Azure 帐户登录。From a browser, navigate to http://portal.azure.com and, if necessary, sign in with your Azure account.
  2. 单击“新建” > “网络” > “虚拟网络”,请注意,“选择部署模型”列表已显示“经典”,并单击“创建”,如下图所示。Click NEW > Networking > Virtual network, notice that the Select a deployment model list already shows Classic, and then click Create, as seen in the figure below.

    在 Azure 门户中创建 VNet

  3. 在“虚拟网络”边栏选项卡中,键入 VNet 的名称,并单击“地址空间”。On the Virtual network blade, type the Name of the VNet, and then click Address space. 为 VNet 及其第一个子网配置地址空间设置,并单击“确定”。Configure your address space settings for the VNet and its first subnet, then click OK. 下图显示了我们的方案的 CIDR 块设置。The figure below shows the CIDR block settings for our scenario.

    “地址空间”边栏选项卡

  4. 单击“资源组”并选择要将 VNet 添加到的资源组,或者单击“新建资源组”将 VNet 添加到新资源组。Click Resource Group and select a resource group to add the VNet to, or click Create new resource group to add the VNet to a new resource group. 下图显示了名为 TestRG的新资源组的资源组设置。The figure below shows the resource group settings for a new resource group called TestRG. 有关资源组的详细信息,请访问 Azure Resource Manager 概述For more information about resource groups, visit Azure Resource Manager Overview.

    “创建资源组”边栏选项卡

  5. 如有必要,更改 VNet 的“订阅”和“位置”设置。If necessary, change the Subscription and Location settings for your VNet.
  6. 如果不想看到该 VNet 作为启动板中的磁贴,请禁用“固定到启动板”。If you do not want to see the VNet as a tile in the Startboard, disable Pin to Startboard.
  7. 单击“创建”,注意名为“创建虚拟网络”的磁贴,如下图中所示。Click Create and notice the tile named Creating Virtual network as shown in the figure below.

    在门户中创建 VNet

  8. 等待创建 VNet,当看到下面的磁贴时,单击它以添加更多子网。Wait for the VNet to be created, and when you see the tile below, click it to add more subnets.

    在门户中创建 VNet

  9. 用户会看到其 VNet 的配置,如下所示。You should see the Configuration for your VNet as shown below.

    在门户中创建 VNet

  10. 单击“子网” > “添加”,为子网键入名称并指定“地址范围(CIDR 块)”,然后单击“确定”。Click Subnets > Add, then type a Name and specify an Address range (CIDR block) for your subnet, and then click OK. 下图显示了当前方案的设置。The figure below shows the settings for our current scenario.

    在 Azure 门户中创建 VNet