Поделиться через


Modify an ExpressRoute circuit using PowerShell (classic)

This article walks you through the steps to check the status, update, or delete and deprovision your ExpressRoute classic deployment model circuit. This article applies to the classic deployment model.

Это важно

По состоянию на 1 марта 2017 г. в классической модели развертывания невозможно создать новые каналы ExpressRoute.

  • Вы можете переместить существующий канал ExpressRoute из классической модели развертывания в модель развертывания Resource Manager без простоя подключения. Для получения дополнительной информации см. раздел Перемещение существующей цепи.
  • Вы можете подключиться к виртуальным сетям в классической модели развертывания, задав параметр allowClassicOperations значение TRUE.

Используйте следующие ссылки для создания каналов ExpressRoute и управления ими в модели развертывания Resource Manager.

о моделях развертывания Azure

Сейчас Azure поддерживает две модели развертывания: классическую и с использованием Resource Manager. Две модели не полностью совместимы друг с другом. Прежде чем начать, необходимо знать, в какой модели вы хотите работать. Сведения о моделях развертывания см. в разделе Основные сведения о моделях развертывания. Если вы не знакомы с Azure, рекомендуется использовать модель развертывания Resource Manager.

Перед тем как начать

Установите последние версии модулей PowerShell управления службами Azure (SM) и модуля ExpressRoute. В среде Azure CloudShell нельзя запускать модули SM.

  1. Используйте инструкции в статье по установке модуля управления службами, чтобы установить модуль управления службами Azure. Если модуль Az или RM уже установлен, обязательно используйте "-AllowClobber".

  2. Импортируйте установленные модули. При использовании приведенного ниже примера измените путь в соответствии с расположением и версией установленных модулей PowerShell.

    Import-Module 'C:\Program Files\WindowsPowerShell\Modules\Azure\5.3.0\Azure.psd1'
    Import-Module 'C:\Program Files\WindowsPowerShell\Modules\Azure\5.3.0\ExpressRoute\ExpressRoute.psd1'
    
  3. Чтобы войти в учетную запись Azure, откройте консоль PowerShell с повышенными правами и подключитесь к своей учетной записи. Используйте следующий пример, чтобы помочь вам подключиться с помощью модуля управления службами:

    Add-AzureAccount
    

Get the status of a circuit

You can retrieve this information at any time by using the Get-AzureCircuit cmdlet. Making the call without any parameters lists all the circuits.

Get-AzureDedicatedCircuit

Bandwidth                        : 200
CircuitName                      : MyTestCircuit
Location                         : Silicon Valley
ServiceKey                       : *********************************
ServiceProviderName              : equinix
ServiceProviderProvisioningState : Provisioned
Sku                              : Standard
Status                           : Enabled

Bandwidth                        : 1000
CircuitName                      : MyAsiaCircuit
Location                         : Singapore
ServiceKey                       : #################################
ServiceProviderName              : equinix
ServiceProviderProvisioningState : Provisioned
Sku                              : Standard
Status                           : Enabled

You can get information on a specific ExpressRoute circuit by passing the service key as a parameter to the call.

Get-AzureDedicatedCircuit -ServiceKey "*********************************"

Bandwidth                        : 200
CircuitName                      : MyTestCircuit
Location                         : Silicon Valley
ServiceKey                       : *********************************
ServiceProviderName              : equinix
ServiceProviderProvisioningState : Provisioned
Sku                              : Standard
Status                           : Enabled

You can get detailed descriptions of all the parameters by running the following example:

get-help get-azurededicatedcircuit -detailed

Изменение схемы

Некоторые свойства канала ExpressRoute можно изменить, не повлияв на подключение.

Вы можете выполнять следующие задачи без простоя:

  • Enable or disable an ExpressRoute premium add-on for your ExpressRoute circuit.
  • Increase the bandwidth of your ExpressRoute circuit provided there is capacity available on the port. Снижение уровня пропускной способности канала не поддерживается.
  • Change the metering plan from Metered Data to Unlimited Data. Changing the metering plan from Unlimited Data to Metered Data is not supported.
  • Параметр Allow Classic Operations(Разрешить классические операции) можно включать и отключать.

Refer to the ExpressRoute FAQ for more information on limits and limitations.

Enable the ExpressRoute premium add-on

You can enable the ExpressRoute premium add-on for your existing circuit by using the following PowerShell cmdlet:

Set-AzureDedicatedCircuitProperties -ServiceKey "*********************************" -Sku Premium

Bandwidth                        : 1000
CircuitName                      : TestCircuit
Location                         : Silicon Valley
ServiceKey                       : *********************************
ServiceProviderName              : equinix
ServiceProviderProvisioningState : Provisioned
Sku                              : Premium
Status                           : Enabled

Your circuit will now have the ExpressRoute premium add-on features enabled. As soon as the command has been successfully run, billing for the premium add-on capability begins.

Disable the ExpressRoute premium add-on

Это важно

Эта операция может завершиться ошибкой, если вы используете ресурсы, превышающие допустимые для стандартной схемы.

Соображения

  • Make sure that the number of virtual networks linked to the circuit is less than 10 before you downgrade from premium to standard. If you don't do this, your update request fails, and you are billed the premium rates.
  • You must unlink all virtual networks in other geopolitical regions. If you don't, your update request fails, and you are billed the premium rates.
  • Your route table must be less than 4,000 routes for private peering. If your route table size is greater than 4,000 routes, the BGP session drops and won't be reenabled until the number of advertised prefixes goes below 4,000.

To disable the premium add-on

You can disable the ExpressRoute premium add-on for your existing circuit by using the following PowerShell cmdlet:


Set-AzureDedicatedCircuitProperties -ServiceKey "*********************************" -Sku Standard

Bandwidth                        : 1000
CircuitName                      : TestCircuit
Location                         : Silicon Valley
ServiceKey                       : *********************************
ServiceProviderName              : equinix
ServiceProviderProvisioningState : Provisioned
Sku                              : Standard
Status                           : Enabled

Update the ExpressRoute circuit bandwidth

Check the ExpressRoute FAQ for supported bandwidth options for your provider. You can pick any size that is greater than the size of your existing circuit as long as the physical port (on which your circuit is created) allows.

Это важно

Может потребоваться заново создать канал ExpressRoute, если существующий порт не обеспечивает достаточную емкость. Невозможно обновить контур, если в этой локации нет доступной дополнительной мощности.

Уменьшить пропускную способность канала ExpressRoute без прерывания его работы нельзя. Downgrading bandwidth requires you to deprovision the ExpressRoute circuit and then reprovision a new ExpressRoute circuit.

Resize a circuit

After you decide what size you need, you can use the following command to resize your circuit:

Set-AzureDedicatedCircuitProperties -ServiceKey ********************************* -Bandwidth 1000

Bandwidth                        : 1000
CircuitName                      : TestCircuit
Location                         : Silicon Valley
ServiceKey                       : *********************************
ServiceProviderName              : equinix
ServiceProviderProvisioningState : Provisioned
Sku                              : Standard
Status                           : Enabled

Once your circuit has been sized up on the Microsoft side, you must contact your connectivity provider to update configurations on their side to match this change. Billing begins for the updated bandwidth option from this point on.

If you see the following error when increasing the circuit bandwidth, it means there is no sufficient bandwidth left on the physical port where your existing circuit is created. You must delete this circuit and create a new circuit of the size you need.

Set-AzureDedicatedCircuitProperties : InvalidOperation : Insufficient bandwidth available to perform this circuit
update operation
At line:1 char:1
+ Set-AzureDedicatedCircuitProperties -ServiceKey ********************* ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  + CategoryInfo          : CloseError: (:) [Set-AzureDedicatedCircuitProperties], CloudException
  + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ExpressRoute.SetAzureDedicatedCircuitPropertiesCommand

Deprovision and delete a circuit

Соображения

  • You must unlink all virtual networks from the ExpressRoute circuit for this operation to succeed. Check to see if you have any virtual networks that are linked to the circuit if this operation fails.
  • If the ExpressRoute circuit service provider provisioning state is Provisioning or Provisioned you must work with your service provider to deprovision the circuit on their side. Мы будем резервировать ресурсы и выставлять вам счета до тех пор, пока поставщик услуг не завершит отзыв канала и не отправит нам соответствующее уведомление.
  • If the service provider has deprovisioned the circuit (the service provider provisioning state is set to Not provisioned), you can then delete the circuit. This stops billing for the circuit.

Delete a circuit

Для удаления канала ExpressRoute выполните следующую команду:

Remove-AzureDedicatedCircuit -ServiceKey "*********************************"