New-AzVpnSiteLinkConnection
Létrehoz egy Azure VpnSiteLink Csatlakozás ion objektumot.
Syntax
New-AzVpnSiteLinkConnection
-Name <String>
-VpnSiteLink <PSVpnSiteLink>
[-SharedKey <SecureString>]
[-ConnectionBandwidth <UInt32>]
[-RoutingWeight <UInt32>]
[-IpSecPolicy <PSIpsecPolicy>]
[-VpnConnectionProtocolType <String>]
[-EnableBgp]
[-UseLocalAzureIpAddress]
[-UsePolicyBasedTrafficSelectors]
[-IngressNatRule <PSResourceId[]>]
[-EgressNatRule <PSResourceId[]>]
[-VpnGatewayCustomBgpAddress <PSGatewayCustomBgpIpConfiguration[]>]
[-VpnLinkConnectionMode <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Létrehoz egy Azure VpnSiteLink Csatlakozás ion objektumot.
Példák
1. példa
New-AzResourceGroup -Location "West US" -Name "testRG"
$virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West US"
$virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.0.1/24"
New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -VpnGatewayScaleUnit 2
$vpnGateway = Get-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw"
$vpnSiteAddressSpaces = New-Object string[] 2
$vpnSiteAddressSpaces[0] = "192.168.2.0/24"
$vpnSiteAddressSpaces[1] = "192.168.3.0/24"
$vpnSiteLink = New-AzVpnSiteLink -Name "testVpnSiteLink1" -IpAddress "15.25.35.45" -LinkProviderName "SomeTelecomProvider" -LinkSpeedInMbps "10"
$vpnSite = New-AzVpnSite -ResourceGroupName "testRG" -Name "testVpnSite" -Location "West US" -VirtualWan $virtualWan -AddressSpace $vpnSiteAddressSpaces -DeviceModel "SomeDevice" -DeviceVendor "SomeDeviceVendor" -VpnSiteLink @($vpnSiteLink)
$vpnSiteLinkConnection = New-AzVpnSiteLinkConnection -Name "testLinkConnection1" -VpnSiteLink $vpnSite.VpnSiteLinks[0] -ConnectionBandwidth 100
New-AzVpnConnection -ResourceGroupName $vpnGateway.ResourceGroupName -ParentResourceName $vpnGateway.Name -Name "testConnection" -VpnSite $vpnSite -VpnSiteLinkConnection @($vpnSiteLinkConnection)
A fentiekben létrehozunk egy erőforráscsoportot, a Virtual WAN-t, a virtuális hálózatot, a virtual hubot és egy VpnSite-t 1 VpnSiteLinks-sel az USA nyugati régiójában az Azure "testRG" erőforráscsoportjában. Ezután létrejön egy VPN-átjáró a Virtual Hubon. Miután az átjáró létrejött, a New-AzVpn Csatlakozás ion paranccsal csatlakozik a VpnSite-hez 1 VpnSiteLink Csatlakozás ions paranccsal a VpnSiteLinkhez.
2. példa VpnGatewayCustomBgpAddress
$vpnSite = Get-AzVpnSite -ResourceGroupName PS_testing -Name testsite
$vpnGateway = Get-AzVpnGateway -ResourceGroupName PS_testing -Name 196ddf92afae40e4b20edc32dfb48a63-eastus-gw
$address = New-AzGatewayCustomBgpIpConfigurationObject -IpConfigurationId "Instance0" -CustomBgpIpAddress "169.254.22.1"
$address2 = New-AzGatewayCustomBgpIpConfigurationObject -IpConfigurationId "Instance1" -CustomBgpIpAddress "169.254.22.3"
$vpnSiteLinkConnection = New-AzVpnSiteLinkConnection -Name "testLinkConnection1" -VpnSiteLink $vpnSite.VpnSiteLinks[0] -ConnectionBandwidth 100 -VpnGatewayCustomBgpAddress $address,$address2 -EnableBgp
New-AzVpnConnection -ResourceGroupName $vpnGateway.ResourceGroupName -ParentResourceName $vpnGateway.Name -Name "testConnection" -VpnSite $vpnSite -VpnSiteLinkConnection @($vpnSiteLinkConnection)
A fentiekben az AzGatewayCustomBgpIpConfigurationObject 1 VpnSiteLinks és Vpn Csatlakozás ion jön létre az Azure "PS_testing" erőforráscsoportjában. A kapcsolat létrehozása után a Rendszer a New-AzVpn Csatlakozás ion paranccsal csatlakozik a VpnSite-hez 1 VpnSiteLink Csatlakozás ions paranccsal a VpnSiteLinkhez. Ez a kapcsolat a megadott GatewayCustomBgpIpAddress szolgáltatást fogja használni a Bgp-kapcsolathoz a VpnGateway oldalán.
Paraméterek
-ConnectionBandwidth
Az a sávszélesség, amelyet a kapcsolati kapcsolatnak mbps-ban kell kezelnie.
Type: | UInt32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
Az Azure-ral való kommunikációhoz használt hitelesítő adatok, fiók, bérlő és előfizetés.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EgressNatRule
A hivatkozáshoz társított kimenő NAT-szabályok listája Csatlakozás ion.
Type: | PSResourceId[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableBgp
BGP engedélyezése ehhez a kapcsolathoz
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IngressNatRule
A hivatkozáshoz társított bejövő NAT-szabályok listája Csatlakozás ion.
Type: | PSResourceId[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IpSecPolicy
A kapcsolathoz figyelembe kell venni az IpSec-szabályzatot.
Type: | PSIpsecPolicy |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
VpnSiteLink Csatlakozás ion neve
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RoutingWeight
Útválasztási súly
Type: | UInt32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SharedKey
A kapcsolat beállításához szükséges megosztott kulcs.
Type: | SecureString |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-UseLocalAzureIpAddress
Ehhez a kapcsolathoz használja a helyi Azure IP-címet forrás IP-címként.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-UsePolicyBasedTrafficSelectors
Szabályzatalapú forgalomválasztókat használjon ehhez a kapcsolathoz.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VpnConnectionProtocolType
Átjáró csatlakozási protokollja:IKEv1/IKEv2
Type: | String |
Accepted values: | IKEv1, IKEv2 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VpnGatewayCustomBgpAddress
A Vpngateway GatewayCustomBgpIpAddress elemét használja ebben a kapcsolati kapcsolatban.
Type: | PSGatewayCustomBgpIpConfiguration[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VpnLinkConnectionMode
A kapcsolat kapcsolati módja.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VpnSiteLink
A vpn-hely hivatkozási objektuma, amelyhez csatlakozni szeretne.
Type: | PSVpnSiteLink |
Aliases: | InputObject |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Bevitelek
PSGatewayCustomBgpIpConfiguration[]
Kimenetek
Kapcsolódó hivatkozások
Visszajelzés
https://aka.ms/ContentUserFeedback.
Hamarosan elérhető: 2024-ben fokozatosan kivezetjük a GitHub-problémákat a tartalom visszajelzési mechanizmusaként, és lecseréljük egy új visszajelzési rendszerre. További információ:Visszajelzés küldése és megtekintése a következőhöz: