New-AzVirtualHubBgpConnection
Cmdleten New-AzVirtualHubBgpConnection skapar en HubBgpConnection-resurs som peerkopplar Azure Virtual WAN Hub-routern med en BGP-aktiverad peer i ett virtuellt nätverk som är anslutet till Virtual WAN Hub.
Syntax
New-AzVirtualHubBgpConnection
-ResourceGroupName <String>
-VirtualHubName <String>
-PeerIp <String>
-PeerAsn <UInt32>
-Name <String>
-VirtualHubVnetConnection <PSHubVirtualNetworkConnection>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzVirtualHubBgpConnection
-ResourceGroupName <String>
-VirtualHubName <String>
-PeerIp <String>
-PeerAsn <UInt32>
-Name <String>
-VirtualHubVnetConnectionId <String>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzVirtualHubBgpConnection
-PeerIp <String>
-PeerAsn <UInt32>
-Name <String>
-VirtualHubVnetConnection <PSHubVirtualNetworkConnection>
-VirtualHub <PSVirtualHub>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzVirtualHubBgpConnection
-PeerIp <String>
-PeerAsn <UInt32>
-Name <String>
-VirtualHubVnetConnection <PSHubVirtualNetworkConnection>
-VirtualHubId <String>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzVirtualHubBgpConnection
-PeerIp <String>
-PeerAsn <UInt32>
-Name <String>
-VirtualHubVnetConnectionId <String>
-VirtualHub <PSVirtualHub>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzVirtualHubBgpConnection
-PeerIp <String>
-PeerAsn <UInt32>
-Name <String>
-VirtualHubVnetConnectionId <String>
-VirtualHubId <String>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Cmdleten New-AzVirtualHubBgpConnection skapar en HubBgpConnection-resurs som peerkopplar Azure Virtual WAN Hub Router med en BGP-aktiverad peer i det virtuella nätverket som är ansluten till Virtual WAN Hub.
Exempel
Exempel 1
New-AzResourceGroup -Location "West US" -Name "testRG"
$frontendSubnet = New-AzVirtualNetworkSubnetConfig -Name frontendSubnet -AddressPrefix "192.168.1.0/24"
$backendSubnet = New-AzVirtualNetworkSubnetConfig -Name backendSubnet -AddressPrefix "192.168.2.0/24"
$remoteVirtualNetwork = New-AzVirtualNetwork -Name "testVirtualNetwork" -ResourceGroupName "testRG" -Location "West US" -AddressPrefix "192.168.0.0/16" -Subnet $frontendSubnet,$backendSubnet
$virtualWan = New-AzVirtualWan -ResourceGroupName "testRG" -Name "testWan" -Location "West US"
New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "testHub" -AddressPrefix "10.0.1.0/24"
$hubVnetConnection = New-AzVirtualHubVnetConnection -ResourceGroupName "testRG" -VirtualHubName "testHub" -Name "testVnetConnection" -RemoteVirtualNetwork $remoteVirtualNetwork
New-AzVirtualHubBgpConnection -ResourceGroupName "testRG" -VirtualHubName "testHub" -PeerIp 192.168.1.5 -PeerAsn 20000 -Name "testBgpConnection" -VirtualHubVnetConnection $hubVnetConnection
Name : testBgpConnection
Id : /subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualHubs/testHub/bgpConnections/testBgpConnection
HubVirtualNetworkConnection : /subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualHubs/testHub/hubVirtualNetworkConnections/testVnetConnection
PeerAsn : 20000
PeerIp : 192.168.1.5
Ovanstående skapar en resursgrupp, Virtual WAN, Virtual Network, Virtual WAN Hub i USA, västra och ansluter det virtuella nätverket till Virtual WAN Hub i resursgruppen i Azure. Därefter skapas en BGP-anslutning för virtual WAN-hubben som peerkopplar Virtual WAN Hub med nätverksinstallationen som distribueras i det virtuella nätverket.
Exempel 2
$hubVnetConnection = Get-AzVirtualHubVnetConnection -ResourceGroupName "testRG" -VirtualHubName "testHub" -Name "testVnetConnection"
Get-AzVirtualHub -ResourceGroupName "testRG" -Name "testHub" | New-AzVirtualHubBgpConnection -PeerIp 192.168.1.5 -PeerAsn 20000 -Name "testBgpConnection" -VirtualHubVnetConnection $hubVnetConnection
Name : testBgpConnection
Id : /subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualHubs/testHub/bgpConnections/testBgpConnection
HubVirtualNetworkConnection : /subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualHubs/testHub/hubVirtualNetworkConnections/testVnetConnection
PeerAsn : 20000
PeerIp : 192.168.1.5
Ovanstående skapar en Virtual WAN Hub BGP-anslutning för befintlig virtuell WAN Hub- och Virtual WAN Hub Vnet-anslutning med powershell-piping på utdata från Get-AzVirtualHub.
Parametrar
-AsJob
Kör cmdlet i bakgrunden
Typ: | SwitchParameter |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-Confirm
Uppmanar dig att bekräfta innan du kör cmdleten.
Typ: | SwitchParameter |
Alias: | cf |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-DefaultProfile
Autentiseringsuppgifter, konto, klientorganisation och prenumeration som används för kommunikation med Azure.
Typ: | IAzureContextContainer |
Alias: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-Name
Resursnamnet.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-PeerAsn
Peer-ASN.
Typ: | UInt32 |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-PeerIp
Peer-IP-adressen.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-ResourceGroupName
Resursgruppens namn.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-VirtualHub
Den virtuella hubbresursen.
Typ: | PSVirtualHub |
Alias: | ParentObject, ParentVirtualHub |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
-VirtualHubId
Resurs-ID:t för den virtuella hubben.
Typ: | String |
Alias: | ParentResourceId, ParentVirtualHubId |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-VirtualHubName
Namnet på den virtuella hubben.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-VirtualHubVnetConnection
VirtualHubVnetConnection-resursen.
Typ: | PSHubVirtualNetworkConnection |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-VirtualHubVnetConnectionId
Resurs-ID:t VirtualHubVnetConnection.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-WhatIf
Visar vad som skulle hända om cmdleten kördes. Cmdleten körs inte.
Typ: | SwitchParameter |
Alias: | wi |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
Indata
Utdata
Relaterade länkar
Azure PowerShell