Set-BgpPeer

Set-BgpPeer

Modifies BGP configuration.

Sintaxis

Parameter Set: Set3
Set-BgpPeer [-Name] <String> [-AsJob] [-CimSession <CimSession[]> ] [-ClearPrefixLimit] [-Force] [-HoldTimeSec <UInt16> ] [-IdleHoldTimeSec <UInt16> ] [-LocalASN <UInt32> ] [-LocalIPAddress <IPAddress> ] [-MaxAllowedPrefix <UInt32> ] [-OperationMode <OperationMode> ] [-PassThru] [-PeerASN <UInt32> ] [-PeeringMode <PeeringMode> ] [-PeerIPAddress <IPAddress> ] [-RoutingDomain <String> ] [-ThrottleLimit <Int32> ] [-Weight <UInt16> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Descripción detallada

The Set-BgpPeer cmdlet modifies peer configuration for Border Gateway Protocol (BGP) routers. Specify a peer to modify by using its name. You can modify the following configuration settings:

-- Autonomous system number (ASN) for the local and peer router instances
-- IP address of the local and peer router instances
-- Maximum number of network prefixes that the local router instance can learn from this peer, or you can remove limit
-- Preference assigned to routes received from this peer
-- Operation mode and peering mode
-- Hold time, in seconds

Parámetros

-AsJob

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-CimSession<CimSession[]>

Ejecuta el cmdlet en una sesión remota o en un equipo remoto. Escriba un nombre de equipo o un objeto de sesión, como la salida de un cmdlet New-CimSession o Get-CimSession. El valor predeterminado es la sesión actual en el equipo local.

Alias

Session

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-ClearPrefixLimit

Indicates that the cmdlet removes the limit on the number of network prefixes learned from the peer. Specify a limit by using the MaxAllowedPrefix parameter. You cannot specify both the MaxAllowedPrefix parameter and the ClearPrefixLimit parameter.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Force

Fuerza que el comando se ejecute sin pedir confirmación al usuario.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-HoldTimeSec<UInt16>

Specifies the hold time, in seconds. If this computer does not receive any messages from the peer within this time, the session expires.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

180

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-IdleHoldTimeSec<UInt16>

Specifies the time in seconds for which the BGP Peer stays in an idle state after an unsuccessful peer connection attempt.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-LocalASN<UInt32>

Specifies the ASN for the local router.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-LocalIPAddress<IPAddress>

Specifies the IP address that the local router uses for the peer connection.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-MaxAllowedPrefix<UInt32>

Specifies the maximum number of network prefixes that this router learns from its peer. To remove this limit, specify the ClearPrefixLimit parameter. You cannot specify both the MaxAllowedPrefix parameter and the ClearPrefixLimit parameter.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-Name<String>

Specifies a name. The cmdlet modifies settings for the named peer.

Alias

PeerId,PeerName

¿Requerido?

true

¿Posición?

2

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-OperationMode<OperationMode>

Specifies the BGP router mode of operation. Los valores aceptables para este parámetro son los siguientes:

-- Mixed. The peer both initiates and accepts requests.
-- Server. The peer only accepts requests.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-PassThru

Devuelve un objeto que representa el elemento con el que está trabajando. De forma predeterminada, este cmdlet no genera ningún resultado.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-PeerASN<UInt32>

Specifies the ASN for the peer.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-PeeringMode<PeeringMode>

Specifies the peering mode for the peer. Los valores aceptables para este parámetro son los siguientes:

-- Automatic. Starts peering attempts automatically when added.
-- Manual. Starts peering attempts after you start the session by using the Start-BgpPeer cmdlet.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-PeerIPAddress<IPAddress>

Specifies the IP address of the peer.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-RoutingDomain<String>

Specifies the name of the routing domain as a string. The name is a unique, for the multitenant gateway, user-defined alphanumeric string.

Alias

RoutingDomainName

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-ThrottleLimit<Int32>

Especifica el número máximo de operaciones simultáneas que se pueden establecer para ejecutar el cmdlet. Si se omite este parámetro o es especifica un valor de 0, Windows PowerShell ® calcula un límite óptimo para el cmdlet en función del número de cmdlets de CIM que se estén ejecutando en el equipo. El límite solo se aplica al cmdlet actual, no a la sesión ni al equipo.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Weight<UInt16>

Specifies the preference, as an integer, assigned to routes received from this peer. Higher values have higher priority.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-Confirm

Solicita confirmación antes de ejecutar el cmdlet.

¿Requerido?

false

¿Posición?

named

Valor predeterminado

falso

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-WhatIf

Muestra lo que sucedería si se ejecutara el cmdlet. El cmdlet no se ejecuta.

¿Requerido?

false

¿Posición?

named

Valor predeterminado

falso

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

<CommonParameters>

Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

  • Microsoft.Management.Infrastructure.CimInstance#BgpPeerConfig

Ejemplos

Example 1: Change the peering mode to Automatic

This command changes the peering mode of the peer named TenantSite17 to Automatic. The command includes the PassThru parameter, so it passes a BgpPeerConfig object to the console. Because the command includes the Force parameter, it does not prompt you for confirmation.

PS C:\> Set-BgpPeer -Name "TenantSite17" -Force -PeeringMode Automatic -PassThru

Example 2: Modify settings for a peer

This command modifies the operation mode and the peering mode of the peer named TenantSite17. The command includes the PassThru parameter, so it passes a BgpPeerConfig object to the console. Because the command does not include the Force parameter, it prompts you for confirmation.

PS C:\> Set-BgpPeer -Name "TenantSite17" -OperationMode Mixed -PeeringMode Automatic -PassThru

Example 3: Modify the ASN of a peer

This command modifies the ASN of the peer named TenantSite17 in the routing domain Rd002. The command includes the PassThru parameter, so it passes a BgpPeerConfig object to the console. Because the command does not include the Force parameter, it prompts you for confirmation.

PS C:\> Set-BgpPeer -Name "Tenant17" -PassThru -PeerASN 64515 -RoutingDomain "Rd002" -PassThru 

Temas relacionados

Add-BgpPeer

Get-BgpPeer

Remove-BgpPeer

Start-BgpPeer

Stop-BgpPeer