New-AzureRmExpressRouteCircuitPeeringConfig

Creates a new peering configuration to be added to an ExpressRoute circuit.

Syntax

New-AzureRmExpressRouteCircuitPeeringConfig
   -Name <String>
   -PeeringType <String>
   -PeerASN <Int32>
   -PrimaryPeerAddressPrefix <String>
   -SecondaryPeerAddressPrefix <String>
   -VlanId <Int32>
   [-SharedKey <String>]
   [-MicrosoftConfigAdvertisedPublicPrefixes <System.Collections.Generic.List`1[System.String]>]
   [-MicrosoftConfigCustomerAsn <Int32>]
   [-MicrosoftConfigRoutingRegistryName <String>]
   [-PeerAddressType <String>]
   [-LegacyMode <Boolean>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
New-AzureRmExpressRouteCircuitPeeringConfig
   -Name <String>
   -PeeringType <String>
   -PeerASN <Int32>
   -PrimaryPeerAddressPrefix <String>
   -SecondaryPeerAddressPrefix <String>
   -VlanId <Int32>
   [-SharedKey <String>]
   [-MicrosoftConfigAdvertisedPublicPrefixes <System.Collections.Generic.List`1[System.String]>]
   [-MicrosoftConfigCustomerAsn <Int32>]
   [-MicrosoftConfigRoutingRegistryName <String>]
   -RouteFilterId <String>
   [-PeerAddressType <String>]
   [-LegacyMode <Boolean>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
New-AzureRmExpressRouteCircuitPeeringConfig
   -Name <String>
   -PeeringType <String>
   -PeerASN <Int32>
   -PrimaryPeerAddressPrefix <String>
   -SecondaryPeerAddressPrefix <String>
   -VlanId <Int32>
   [-SharedKey <String>]
   [-MicrosoftConfigAdvertisedPublicPrefixes <System.Collections.Generic.List`1[System.String]>]
   [-MicrosoftConfigCustomerAsn <Int32>]
   [-MicrosoftConfigRoutingRegistryName <String>]
   -RouteFilter <PSRouteFilter>
   [-PeerAddressType <String>]
   [-LegacyMode <Boolean>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The New-AzureRmExpressRouteCircuitPeeringConfig 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.

Examples

Example 1: Create a new ExpressRoute circuit with a peering configuration

$parameters = @{
    Name = 'AzurePrivatePeering'
    Circuit = $circuit
    PeeringType = 'AzurePrivatePeering'
    PeerASN = 100
    PrimaryPeerAddressPrefix = '10.6.1.0/30'
    SecondaryPeerAddressPrefix = '10.6.2.0/30'
    VlanId  = 200
}
$PeerConfig = New-AzureRmExpressRouteCircuitPeeringConfig @parameters

$parameters = @{
    Name='ExpressRouteCircuit'
    ResourceGroupName='ExpressRouteResourceGroup'
    Location='West US'
    SkuTier='Standard'
    SkuFamily='MeteredData'
    ServiceProviderName='Equinix'
    Peering=$PeerConfig
    PeeringLocation='Silicon Valley'
    BandwidthInMbps=200
}
New-AzureRmExpressRouteCircuit @parameters

Required Parameters

-Name

The name of the peering configuration to be created.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PeerASN

The AS number of your ExpressRoute circuit. This must be a Public ASN when the PeeringType is AzurePublicPeering.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PeeringType

The acceptable values for this parameter are: AzurePrivatePeering, AzurePublicPeering, and MicrosoftPeering

Type:String
Parameter Sets:AzurePrivatePeering, AzurePublicPeering, MicrosoftPeering
Position:Named
Default value:None
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
Accept pipeline input:False
Accept wildcard characters:False
-RouteFilter

This is an existing RouteFilter object.

Type:Microsoft.Azure.Commands.Network.Models.PSRouteFilter
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-RouteFilterId

This is the resource Id of an existing RouteFilter object.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
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
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
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-LegacyMode

The legacy mode of the Peering

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-MicrosoftConfigAdvertisedPublicPrefixes

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:System.Collections.Generic.List`1[System.String]
Position:Named
Default value:None
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
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
Accept pipeline input:False
Accept wildcard characters:False
-PeerAddressType

PeerAddressType

Type:String
Parameter Sets:IPv4, IPv6
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
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
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Microsoft.Azure.Commands.Network.Models.PSPeering