Compartilhar via


Add method of the PS_BgpPeer class

Adds a BGP peer to a BGP router.

Syntax

uint32 Add(
  [in]  string        Name,
  [in]  string        LocalIPAddress,
  [in]  string        PeerIPAddress,
  [in]  uint32        LocalASN,
  [in]  uint32        PeerASN,
  [in]  uint32        OperationMode,
  [in]  uint32        PeeringMode,
  [in]  uint16        HoldTimeSec,
  [in]  uint16        IdleHoldTimeSec,
  [in]  uint16        Weight,
  [in]  boolean       RouteReflectorClient,
  [in]  uint32        MaxAllowedPrefix,
  [in]  boolean       PassThru,
  [in]  string        RoutingDomain,
  [out] BgpPeerConfig cmdletOutput
);

Parameters

Name [in]

The name of the peer to add.

LocalIPAddress [in]

The IP address of the local BGP router.

PeerIPAddress [in]

The IP address of the BGP router for the new peer.

LocalASN [in]

The Autonomous System Number (ASN) of the local BGP router instance.

PeerASN [in]

The ASN of the BGP Router instance for the new peer.

OperationMode [in]

The mode of operation for the local BGP router. You must set this parameter to one of the following values.

1

Initiates and accepts peering requests.

2

Passively accepts peering requests.

PeeringMode [in]

An enumeration parameter that specifies the peering mode for the new peer.

HoldTimeSec [in]

The duration, in seconds, before a BGP session expires after a BGP message is received.

IdleHoldTimeSec [in]

The duration, in seconds, before a BGP session expires due to inactivity.

Windows Server 2012: This parameter is not supported before Windows Server 2012 R2.

Weight [in]

The administrative preference assigned to the routes of the new peer.

RouteReflectorClient [in]

Whether the peer is a client peer or non-client peer.

Windows Server 2012 R2: This parameter is not supported before Windows Server 2016.

MaxAllowedPrefix [in]

The maximum number IP network prefixes that the local BGP router can learn from the new peer.

PassThru [in]

Indicates whether the cmdlet returns an output object. True to return an output object; otherwise false.

RoutingDomain [in]

The user-defined unique alphanumeric ID of the routing domain.

cmdletOutput [out]

The BgpPeerConfig object that receives the additional BGP peer.

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2012 R2
Namespace
Root\Microsoft\Windows\RemoteAccess
MOF
RAMgmtPSProvider.Mof
DLL
RAMgmtPSProvider.dll

See also

PS_BgpPeer