Add-AzExpressRouteCircuitPeeringConfig
Adds a peering configuration to an ExpressRoute circuit.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
Add-AzExpressRouteCircuitPeeringConfig
-Name <String>
-ExpressRouteCircuit <PSExpressRouteCircuit>
-PeeringType <String>
-PeerASN <UInt32>
-PrimaryPeerAddressPrefix <String>
-SecondaryPeerAddressPrefix <String>
-VlanId <Int32>
[-SharedKey <String>]
[-MicrosoftConfigAdvertisedPublicPrefixes <String[]>]
[-MicrosoftConfigCustomerAsn <Int32>]
[-MicrosoftConfigRoutingRegistryName <String>]
[-PeerAddressType <String>]
[-LegacyMode <Boolean>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Add-AzExpressRouteCircuitPeeringConfig
-Name <String>
-ExpressRouteCircuit <PSExpressRouteCircuit>
-PeeringType <String>
-PeerASN <UInt32>
-PrimaryPeerAddressPrefix <String>
-SecondaryPeerAddressPrefix <String>
-VlanId <Int32>
[-SharedKey <String>]
[-MicrosoftConfigAdvertisedPublicPrefixes <String[]>]
[-MicrosoftConfigCustomerAsn <Int32>]
[-MicrosoftConfigRoutingRegistryName <String>]
-RouteFilterId <String>
[-PeerAddressType <String>]
[-LegacyMode <Boolean>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Add-AzExpressRouteCircuitPeeringConfig
-Name <String>
-ExpressRouteCircuit <PSExpressRouteCircuit>
-PeeringType <String>
-PeerASN <UInt32>
-PrimaryPeerAddressPrefix <String>
-SecondaryPeerAddressPrefix <String>
-VlanId <Int32>
[-SharedKey <String>]
[-MicrosoftConfigAdvertisedPublicPrefixes <String[]>]
[-MicrosoftConfigCustomerAsn <Int32>]
[-MicrosoftConfigRoutingRegistryName <String>]
-RouteFilter <PSRouteFilter>
[-PeerAddressType <String>]
[-LegacyMode <Boolean>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Add-AzExpressRouteCircuitPeeringConfig cmdlet adds a peering configuration to an ExpressRoute circuit. ExpressRoute circuits connect your on-premises network to the Microsoft cloud by using a connectivity provider instead of the public Internet. Note that, after running Add-AzExpressRouteCircuitPeeringConfig, you must call the Set-AzExpressRouteCircuit cmdlet to activate the configuration.
Examples
Example 1: Add a peer to an existing ExpressRoute circuit
$circuit = Get-AzExpressRouteCircuit -Name $CircuitName -ResourceGroupName $rg
$parameters = @{
Name = 'AzurePrivatePeering'
Circuit = $circuit
PeeringType = 'AzurePrivatePeering'
PeerASN = 100
PrimaryPeerAddressPrefix = '10.6.1.0/30'
SecondaryPeerAddressPrefix = '10.6.2.0/30'
VlanId = 200
}
Add-AzExpressRouteCircuitPeeringConfig @parameters
Set-AzExpressRouteCircuit -ExpressRouteCircuit $circuit
Example 2
Adds a peering configuration to an ExpressRoute circuit. (autogenerated)
Add-AzExpressRouteCircuitPeeringConfig -ExpressRouteCircuit <PSExpressRouteCircuit> -MicrosoftConfigAdvertisedPublicPrefixes <String[]> -MicrosoftConfigCustomerAsn <Int32> -MicrosoftConfigRoutingRegistryName <String> -Name 'AzurePrivatePeering' -PeerASN 100 -PeerAddressType IPv4 -PeeringType AzurePrivatePeering -PrimaryPeerAddressPrefix '123.0.0.0/30' -SecondaryPeerAddressPrefix '123.0.0.4/30' -VlanId 300
Parameters
The credentials, account, tenant, and subscription used for communication with azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The ExpressRoute circuit being modified. This is Azure object returned by the Get-AzExpressRouteCircuit cmdlet.
| Type: | PSExpressRouteCircuit |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
The legacy mode of the Peering
| Type: | Boolean |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
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 |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
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 |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The Routing Registry Name (RIR / IRR) to which the AS number and prefixes are registered.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The name of the peering relationship to be added.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
PeerAddressType
| Type: | String |
| Accepted values: | IPv4, IPv6 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
The AS number of your ExpressRoute circuit. This must be a Public ASN when the PeeringType is AzurePublicPeering.
| Type: | UInt32 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The acceptable values for this parameter are: AzurePrivatePeering, AzurePublicPeering, and
MicrosoftPeering
| Type: | String |
| Accepted values: | AzurePrivatePeering, AzurePublicPeering, MicrosoftPeering |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
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 |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
This is an existing RouteFilter object.
| Type: | PSRouteFilter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
This is the resource Id of an existing RouteFilter object.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
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 |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
This is an optional MD5 hash used as a pre-shared key for the peering configuration.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
This is the Id number of the VLAN assigned for this peering.
| Type: | Int32 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |