在Azure的ARM模式下,创建Express Route的命令和ASM模式下是有一些区别的。

本文将介绍在ARM模式下,如果创建Express Route的Circuit。

1. 查看支持的Service Provider

Get-AzureRmExpressRouteServiceProvider 

Name              : Beijing Telecom Ethernet
Id : /subscriptions//resourceGroups//providers/Microsoft.Network/expressRouteServiceProviders/
ProvisioningState : Succeeded
Type : Microsoft.Network/expressRouteServiceProviders
PeeringLocations : [
"Beijing"
]
BandwidthsOffered : [
{
"OfferName": "50Mbps",
"ValueInMbps": 50
},
{
"OfferName": "100Mbps",
"ValueInMbps": 100
},
{
"OfferName": "200Mbps",
"ValueInMbps": 200
},
{
"OfferName": "500Mbps",
"ValueInMbps": 500
},
{
"OfferName": "1Gbps",
"ValueInMbps": 1000
},
{
"OfferName": "2Gbps",
"ValueInMbps": 2000
},
{
"OfferName": "5Gbps",
"ValueInMbps": 5000
},
{
"OfferName": "10Gbps",
"ValueInMbps": 10000
}
] Name : Shanghai Telecom Ethernet
Id : /subscriptions//resourceGroups//providers/Microsoft.Network/expressRouteServiceProviders/
ProvisioningState : Succeeded
Type : Microsoft.Network/expressRouteServiceProviders
PeeringLocations : [
"Shanghai"
]
BandwidthsOffered : [
{
"OfferName": "50Mbps",
"ValueInMbps": 50
},
{
"OfferName": "100Mbps",
"ValueInMbps": 100
},
{
"OfferName": "200Mbps",
"ValueInMbps": 200
},
{
"OfferName": "500Mbps",
"ValueInMbps": 500
},
{
"OfferName": "1Gbps",
"ValueInMbps": 1000
},
{
"OfferName": "2Gbps",
"ValueInMbps": 2000
},
{
"OfferName": "5Gbps",
"ValueInMbps": 5000
},
{
"OfferName": "10Gbps",
"ValueInMbps": 10000
}
]

可以看到,北京和上海两个可以提供Express Route的Peer Location。

2. 创建Express Route

New-AzureRmExpressRouteCircuit -Name hwarmer01 -ResourceGroupName hwarm01 -Location "China East" -SkuTier Standard -SkuFamily MeteredData -ServiceProviderName "Shanghai Telecom Ethernet" -BandwidthInMbps 50 -PeeringLocation Shanghai

Name                             : hwarmer01
ResourceGroupName : hwarm01
Location : chinaeast
Id : /subscriptions/42e8b20d-29ec-40a5-b020-b2229f3dda56/resourceGroups/hwarm01/providers/Microsoft
.Network/expressRouteCircuits/hwarmer01
Etag : W/"b1115f44-1b41-452f-a799-a241f826a609"
ProvisioningState : Succeeded
Sku : {
"Name": "Standard_MeteredData",
"Tier": "Standard",
"Family": "MeteredData"
}
CircuitProvisioningState : Enabled
ServiceProviderProvisioningState : NotProvisioned
ServiceProviderNotes :
ServiceProviderProperties : {
"ServiceProviderName": "Shanghai Telecom Ethernet",
"PeeringLocation": "Shanghai",
"BandwidthInMbps": 50
}
ServiceKey : a3b8f231-2bb2-43ce-8db2-14475c317933
Peerings : []
Authorizations : []

此处的ServiceKey是和电信创建Express Route的凭证。需要把这个Key提供给电信。

其中状态是:ServiceProviderProvisioningState : NotProvisioned

当状态变成Provisioned状态时,电信的部署就完成了。

3. 创建BGP的private Peering关系

$er = Get-AzureRmExpressRouteCircuit 

Add-AzureRmExpressRouteCircuitPeeringConfig -Name "AzurePrivatePeering" -ExpressRouteCircuit $er -PeeringType AzurePrivatePeering -PeerASN 65525 -PrimaryPeerAddressPrefix "10.0.0.0/30" -SecondaryPeerAddressPrefix "10.0.0.4/30" -VlanId 666 

更新配置:

Set-AzureRmExpressRouteCircuit -ExpressRouteCircuit $er 

4. 创建BGP的public Peering关系

Add-AzureRmExpressRouteCircuitPeeringConfig -Name "AzurePublicPeering" -ExpressRouteCircuit $er -PeeringType AzurePublicPeering -PeerASN 65525 -PrimaryPeerAddressPrefix "192.168.201.0/30" -SecondaryPeerAddressPrefix "192.168.201.4/30" -VlanId 667 -SharedKey "A1B2C3D4" 

5. 创建Vnet的ER Gateway

首先添加Gateway Subnet:

Add-AzureRmVirtualNetworkSubnetConfig -Name 'GatewaySubnet' -AddressPrefix 172.17.253.0/27 -VirtualNetwork $vnet
Set-AzureRmVirtualNetwork -VirtualNetwork $vnet

添加Local Network,此项配置可以不需要配置

New-AzureRmLocalNetworkGateway -Name hwmylocal01 -ResourceGroupName hwarm01 -Location 'China East' -GatewayIpAddress '1.1.1.1' -AddressPrefix '10.100.1.0/24' 

创建Gateway的IPConfig:

$vnet = Get-AzureRmVirtualNetwork -Name hwarmvnet01 -ResourceGroupName hwarm01
$subnet = Get-AzureRmVirtualNetworkSubnetConfig -Name 'GatewaySubnet' -VirtualNetwork $vnet
$hwgwpip = New-AzureRmPublicIpAddress -Name hwgwpip1 -ResourceGroupName hwarm01 -Location "China East" -AllocationMethod Dynamic
$hwgwipconfig = New-AzureRmVirtualNetworkGatewayIpConfig -Name hwgwipconfig -SubnetId $subnet.Id -PublicIpAddressId $hwgwpip.Id

创建ER的Gateway:

New-AzureRmVirtualNetworkGateway -Name hwergw01 -ResourceGroupName hwarm01 -Location "China East" -GatewayType ExpressRoute -VpnType RouteBased -GatewaySku Standard -IpConfigurations $hwgwipconfig -EnableBgp $true 

6. 将VNET的Gateway与ExpressRoute的Circuit关联:

$cir = Get-AzureRmExpressRouteCircuit -Name hwarmer01 -ResourceGroupName hwarm01
$gw = Get-AzureRmVirtualNetworkGateway -Name hwergw01 -ResourceGroupName hwarm01
$conn = New-AzureRmVirtualNetworkGatewayConnection -Name "hwerc" -ResourceGroupName "hwarm01" -Location "China East" -VirtualNetworkGateway1 $gw -PeerId $circuit.Id -ConnectionType ExpressRoute

7. 如果VNET的Gateway与ExpressRoute的Circuit不在一个Subscription,需要做授权:

Add-AzureRmExpressRouteCircuitAuthorization -Name hwerau -ExpressRouteCircuit $cir
Set-AzureRmExpressRouteCircuit -ExpressRouteCircuit $cir

完成后,会得到一个Authorization-key,通过这个Key可以把其他订阅的Vnet Gateway和此Express Route Circuit关联。

ARM模式下创建Express Route的更多相关文章

  1. 订阅无法在 ARM 模式下创建虚拟机,只能在 ASM 模式下创建 Azure VM 部署

    问题描述 资源组所有者可以在新版 portal 创建经典模式的虚拟机,但是无法创建 ARM 模式的虚拟机. 问题现象 环境中有个相对权限比较高的账户,比如 account admin (以下简称为 A ...

  2. 如何在ARM中创建Express Route

    很早之前就想试试Azure的express route,但是一直没有找到合适的机会,正好有个客户需要上express route,所以最近先自己研究研究,防止在做poc的时候耗费更多时间,本次场景我们 ...

  3. Azure ARM (9) 创建ARM模式下的虚拟机网络

    <Windows Azure Platform 系列文章目录> 笔者在之前几章内容中,创建了ARM Resource Group,然后在这个ARM Resource Group下创建Azu ...

  4. Azure ARM (11) ARM模式下,创建虚拟机并配置负载均衡器

    <Windows Azure Platform 系列文章目录> 本文内容比较多,请大家仔细阅读,谢谢! 在前几章中,我们做了准备工作: 1.创建ARM Resouce Group,叫Lei ...

  5. 在ARM模式下捕获VM并创建新VM

    在ASM模式下,可以通过Manage Portal上捕获VM的Image,并创建新的VM.在ARM模式下,在Portal上目前还没有这个功能,要做VM镜像的捕获和创建新的VM需要用powershell ...

  6. Azure ARM模式下VNet配置中需要注意的几点事项

    虚拟网络的配置是所有公有云中非常重要的环节.把虚拟网络配置好,对整个系统的管理.维护,以及安全性都非常重要. 本文将介绍Azure在ARM模式下VNet配置中需要特别注意的几点. 一 Azure的VN ...

  7. 微软Azure 经典模式下创建内部负载均衡(ILB)

    微软Azure 经典模式下创建内部负载均衡(ILB) 使用之前一定要注意自己的Azure的模式,老版的为cloud service模式,新版为ARM模式(资源组模式) 本文适用于cloud servi ...

  8. Azure ARM (10) ARM模式下的虚拟机和Classic Model虚拟机的区别

    <Windows Azure Platform 系列文章目录> 本文内容比较多,请大家仔细阅读,谢谢! 请读者注意,在Azure ARM平台,有两种虚拟机模式:经典虚拟机和ARM虚拟机 A ...

  9. Azure ARM (12) ARM模式下,在负载均衡器上设置多个公网IP地址

    <Windows Azure Platform 系列文章目录> 最近在帮助一个客户设置WAF (Web Application Firewall),WAF厂商要求在负载均衡器上,设置多个公 ...

随机推荐

  1. Android LCD(三):LCD接口篇【转】

    本文转载自:http://blog.csdn.net/xubin341719/article/details/9177085 关键词:Android LCD控制器 Framebuffer PWM  平 ...

  2. Go make 和 new的区别

    在Go语言中: make 被用来分配引用类型的内存: map, slice, channel new 被用来分配除了引用类型的所有其他类型的内存: int, string, array等 本文主要给大 ...

  3. Windows Server 2008 IIS的备份和还原

    Windows Server 2008 IIS的备份和还原 当我们服务器系统有大量的站点和虚拟目录的时候,因为种种原因需要重做系统,那么重装系统后这些站点我们是否只能一个一个的添加,如果有成百上千个站 ...

  4. QT 创建主窗口 MainWindow 实例

    1. 2. mainwindow.h #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include & ...

  5. 从配置maven环境到maven项目的新建

    话不多说,直接入正题. 一.配置maven 环境 首先安装最新版支持javaee的eclipse.我这里下载的版本是eclipse-jee-mars-2-win32-x86_64的新版(我是2017年 ...

  6. [JSOI2016]灯塔

    Description $JSOI$的国境线上有$N$一座连续的山峰,其中第$i$座的高度是$h_i$​​.为了简单起见,我们认为这$N$座山峰排成了连续一条直线. 如果在第$i$座山峰上建立一座高度 ...

  7. 写hibernate.cfg.xml时报错The content of element type "property" must match "(meta*,(column|formula)*,type?)".

    原配置文件是这样的 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-ma ...

  8. python基础5 - 产生随机数

    随机数 在 Python 中,要使用随机数,首先需要导入 随机数 的 模块 —— “工具包” import random 导入模块后,可以直接在 模块名称 后面敲一个 . 然后按 Tab 键,会提示该 ...

  9. hzau 1203 One Stroke

    1203: One Stroke Time Limit: 2 Sec  Memory Limit: 1280 MBSubmit: 264  Solved: 56[Submit][Status][Web ...

  10. angularjs 简单指令

    <!DOCTYPE html> <html data-ng-app="app"> <head> <title>angular js& ...