你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Add-AzExpressRouteCrossConnectionPeering
Adds a peering configuration to an ExpressRoute cross connection.
Syntax
Add-AzExpressRouteCrossConnectionPeering
-Name <String>
-ExpressRouteCrossConnection <PSExpressRouteCrossConnection>
[-Force]
-PeeringType <String>
-PeerASN <UInt32>
-PrimaryPeerAddressPrefix <String>
-SecondaryPeerAddressPrefix <String>
-VlanId <Int32>
[-SharedKey <String>]
[-MicrosoftConfigAdvertisedPublicPrefix <String[]>]
[-MicrosoftConfigCustomerAsn <Int32>]
[-MicrosoftConfigRoutingRegistryName <String>]
[-PeerAddressType <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Add-AzExpressRouteCrossConnectionPeering cmdlet adds a peering configuration to an ExpressRoute cross connection. Note that, after running Add-AzExpressRouteCrossConnectionPeering, you must call the Set-AzExpressRouteCrossConnection cmdlet to activate the configuration.
Examples
Example 1: Add a peer to an existing ExpressRoute cross connection
$cc = Get-AzExpressRouteCrossConnection -Name $CrossConnectionName -ResourceGroupName $rg
$parameters = @{
Name = 'AzurePrivatePeering'
CrossConnection = $cc
PeeringType = 'AzurePrivatePeering'
PeerASN = 100
PrimaryPeerAddressPrefix = '10.6.1.0/30'
SecondaryPeerAddressPrefix = '10.6.2.0/30'
VlanId = 200
}
Add-AzExpressRouteCrossConnectionPeering @parameters
Set-AzExpressRouteCrossConnection -ExpressRouteCrossConnection $cc
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ExpressRouteCrossConnection
The ExpressRoute cross connection being modified. This is Azure object returned by the Get-AzExpressRouteCrossConnection cmdlet.
Type: | PSExpressRouteCrossConnection |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Force
Do not ask for confirmation if you want to overwrite a resource
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MicrosoftConfigAdvertisedPublicPrefix
For a PeeringType of MicrosoftPeering, you must provide a list of all prefixes you plan to advertise over the BGP session. Only public IP address prefixes are accepted. You can send a comma separated list if you plan to send a set of prefixes. These prefixes must be registered to you in a Routing Registry Name (RIR / IRR).
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MicrosoftConfigCustomerAsn
If you are advertising prefixes that are not registered to the peering AS number, you can specify the AS number to which they are registered.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MicrosoftConfigRoutingRegistryName
The Routing Registry Name (RIR / IRR) to which the AS number and prefixes are registered.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
The name of the peering relationship to be added.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PeerAddressType
PeerAddressType
Type: | String |
Accepted values: | IPv4, IPv6 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PeerASN
The AS number of your ExpressRoute cross connection. This must be a Public ASN when the PeeringType is AzurePublicPeering.
Type: | UInt32 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PeeringType
The acceptable values for this parameter are: AzurePrivatePeering
, AzurePublicPeering
, and
MicrosoftPeering
Type: | String |
Accepted values: | AzurePrivatePeering, AzurePublicPeering, MicrosoftPeering |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PrimaryPeerAddressPrefix
This is the IP Address range for the primary routing path of this peering relationship. This must be a /30 CIDR subnet. The first odd-numbered address in this subnet should be assigned to your router interface. Azure will configure the next even-numbered address to the Azure router interface.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SecondaryPeerAddressPrefix
This is the IP Address range for the secondary routing path of this peering relationship. This must be a /30 CIDR subnet. The first odd-numbered address in this subnet should be assigned to your router interface. Azure will configure the next even-numbered address to the Azure router interface.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SharedKey
This is an optional MD5 hash used as a pre-shared key for the peering configuration.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VlanId
This is the Id number of the VLAN assigned for this peering.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
PSExpressRouteCrossConnection
Parameter 'ExpressRouteCrossConnection' accepts value of type 'PSExpressRouteCrossConnection' from the pipeline