Express Route的配置
ExpressRoute在中国已经Preview了。
本篇文章讲介绍ExpressRoute如何配置。
Express Route的逻辑拓扑结构:
在配置Express Route之前,需要做VLAN和IP地址的规划:
Router |
IP Prefix |
Peering |
VLAN ID |
Primary |
172.16.1.0/30 |
Private |
555 |
Secondary |
172.16.2.0/30 |
Private |
555 |
Primary |
172.16.1.4/30 |
Public |
556 |
Secondary |
172.16.2.4/30 |
Public |
556 |
由于Express Route要求都是冗余配置,所以所有的内容都是两个:两个VLAN,两根链接,public/private peering。
规划好后,在Azure上做如下配置:
-
在Powershell里import Expressroute的模块:
Import-Module 'C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\Azure\ExpressRoute\ExpressRoute.psd1'
-
用PowerShell在Azure上查看ExpressRoute的服务情况:
Get-AzureDedicatedCircuitServiceProvider
Name DedicatedCircuitLocations DedicatedCircuitBandwidths
---- ------------------------- --------------------------
Beijing Telecom Ethernet Beijing 200Mbps:200, 500Mbps:500, 1Gbps:1000, 10Gbps:10000
-
在Beijing创建200M的Circuit
New-AzureDedicatedCircuit -CircuitName hwtest200 -Bandwidth 200 -Location Beijing -ServiceProviderName "Beijing Telecom Ethernet"
CircuitName : hwtest200
Location : Beijing
ServiceKey : xxxxxxxxxxxxx
ServiceProviderName : beijing telecom ethernet
ServiceProviderProvisioningState : NotProvisioned
Sku : Standard
Status : Enabled
其中SeviceKey是标识这条Circuit的唯一标识符,需要把串数字提供给电信。
目前的状态是NotProvisioned,等电信做好专线后,其状态将转换为Provisoned。
-
定义变量
在Powershell中定义变量:
$ServiceKey = "02a830bf-817d-45fd-b5dd-08312cf61682"
$MD5Hash = "dfeaf10390e560aea745ccba53e044ed"
$private_Subnet_Primary = "172.16.1.0/30"
$private_Subnet_Secondary = "172.16.2.0/30"
$public_Subnet_Primary = "172.16.1.4/30"
$public_Subnet_Secondary = "172.16.2.4/30"
$ASN = 65002
$VLANPrivate = "555"
$VLANPublic = "556"
-
部署BGP Private Peering的配置
New-AzureBGPPeering -ServiceKey $ServiceKey `
-PrimaryPeerSubnet $private_Subnet_Primary `
-SecondaryPeerSubnet $private_Subnet_Secondary `
-PeerAsn $ASN `
-VlanId $VLANPrivate `
–AccessType Private
AdvertisedPublicPrefixes :
AdvertisedPublicPrefixesState :
AzureAsn : 12076
CustomerAutonomousSystemNumber : 0
PeerAsn : 65002
PrimaryAzurePort : BTEXP-BJB-06GMR-CIS-1-PRI-A
PrimaryPeerSubnet : 172.16.1.0/30
RoutingRegistryName :
SecondaryAzurePort : BTEXP-BJB-06GMR-CIS-2-SEC-A
SecondaryPeerSubnet : 172.16.2.0/30
State : Enabled
VlanId : 555
-
部署BGP Public Peering的配置
New-AzureBGPPeering -ServiceKey $ServiceKey `
-PrimaryPeerSubnet $public_Subnet_Primary `
-SecondaryPeerSubnet $public_Subnet_Secondary `
-PeerAsn $ASN `
-VlanId $VLANPublic `
-AccessType Public
AdvertisedPublicPrefixes :
AdvertisedPublicPrefixesState :
AzureAsn : 12076
CustomerAutonomousSystemNumber : 0
PeerAsn : 65002
PrimaryAzurePort : BTEXP-BJB-06GMR-CIS-1-PRI-A
PrimaryPeerSubnet : 172.16.1.4/30
RoutingRegistryName :
SecondaryAzurePort : BTEXP-BJB-06GMR-CIS-2-SEC-A
SecondaryPeerSubnet : 172.16.2.4/30
State : Enabled
VlanId : 556
-
把Vnet和ExpressRoute的Circuit建立连接
New-AzureDedicatedCircuitLink -ServiceKey $ServiceKey -VNetName $Vnet