Add-BgpPeer

Add-BgpPeer

Adds a new BGP peer.

Syntax

Parameter Set: Add0
Add-BgpPeer [-Name] <String> -LocalIPAddress <IPAddress> -PeerASN <UInt32> -PeerIPAddress <IPAddress> [-CimSession <CimSession[]> ] [-HoldTimeSec <UInt16> ] [-IdleHoldTimeSec <UInt16> ] [-InformationAction <ActionPreference> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <String> ] [-LocalASN <UInt32> ] [-MaxAllowedPrefix <UInt32> ] [-OperationMode <OperationMode> {Mixed | Server} ] [-PassThru] [-PeeringMode <PeeringMode> {Automatic | Manual} ] [-RouteReflectorClient <Boolean> ] [-RoutingDomain <String> ] [-ThrottleLimit <Int32> ] [-Weight <UInt16> ] [ <CommonParameters>] [ <WorkflowParameters>]




Detailed Description

The Add-BgpPeer cmdlet adds a new peer to the Border Gateway Protocol (BGP router). This cmdlet returns error information if errors occur while adding the peer configuration.

Parameters

-CimSession<CimSession[]>

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.


Aliases

Session

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-HoldTimeSec<UInt16>

Specifies the configured value of HoldTime in seconds after the BGP session expires if no BGP message is received.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-IdleHoldTimeSec<UInt16>

Specifies the configured value of IdleHoldTime in seconds after the BGP Session expires if no BGP message is received.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-InformationAction<ActionPreference>

Specifies how this cmdlet responds to an information event. The acceptable values for this parameter are:

-- SilentlyContinue
-- Stop
-- Continue
-- Inquire
-- Ignore
-- Suspend


Aliases

infa

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-InformationVariable<String>

Specifies a variable in which to store an information event message.


Aliases

iv

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-LocalASN<UInt32>

Specifies the local autonomous systems (AS) number of the BGP router instance for this peer.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-LocalIPAddress<IPAddress>

Specifies the local BGP Router's peering IP Address. It can be IPv4 or IPv6 address type.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-MaxAllowedPrefix<UInt32>

Specifies the maximum number of allowed IPv4 or IPv6 network prefixes that can be learned from the given neighbor.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-Name<String>

Specifies the unique name for the peering with specified BGP neighbor.


Aliases

PeerName,PeerId

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-OperationMode<OperationMode>

Specifies the BGP Router's mode of operation. Operating modes include:

-- Peering Initiator as well as peering acceptor
-- Only acting as a passive peering request acceptor.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PeerASN<UInt32>

Specifies the neighbor BGP Router's AS Number.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-PeeringMode<PeeringMode>

Specifies the parameter to configure peering mode for the given peer.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-PeerIPAddress<IPAddress>

Specifies the neighbor BGP router's peering IP address. It can be of IPv4 or IPv6 address type.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-RouteReflectorClient<Boolean>

Specifies whether the current peer is a Route Reflector client peer or non-client peer.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-RoutingDomain<String>

Specifies the user-defined unique alphanumeric identifier for the routing domain.


Aliases

RoutingDomainName

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-ThrottleLimit<Int32>

Specifies the maximum number of concurrent connections that can be established to run this command. If you omit this parameter or enter a value of 0, the default value, 32, is used.
The throttle limit applies only to the current command, not to the session or to the computer.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Weight<UInt16>

Specifies administrative preference assigned to the routes received from this peer.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see    about_CommonParameters.

<WorkflowParameters>

This cmdlet supports the following workflow common parameters: -PSParameterCollection, -PSComputerName, -PSCredential, -PSConnectionRetryCount, -PSConnectionRetryIntervalSec, -PSRunningTimeoutSec, -PSElapsedTimeoutSec, -PSPersist, -PSAuthentication, -PSAuthenticationLevel, -PSApplicationName, -PSPort, -PSUseSSL, -PSConfigurationName, -PSConnectionURI, -PSAllowRedirection, -PSSessionOption, -PSCertificateThumbprint, -PSPrivateMetadata, -AsJob, -JobName, and –InputObject. For more information, see    about_WorkflowCommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.Management.Infrastructure.CimInstance#BgpPeerConfig

Examples

Example 1: Add a BGP peer to the BGP router and establish a session

This command adds a BGP peer to the BGP router and automatically starts establishing BGP peering session with that neighbor.


PS C:\> Add-BgpPeer -Name "RedTenantSite1" -LocalIPAddress 192.168.1.10 -PeerIPAddress 14.1.1.10 -PeerASN 64512 -PassThru

Example 2: Add a BGP peer to a BGP router that will listen for incoming connections

This command adds a new BGP Peer to the BGP router which will listen for incoming connections from neighbor. PeeringMode is set to Manual, so unless this peering is started manually, the incoming connections requests will be dropped.


PS C:\> Add-BgpPeer -Name "RedTenantSite1" -LocalIPAddress 192.168.1.10 -PeerIPAddress 14.1.1.10 -PeerASN 64512  -OperationMode Server -PeeringMode Manual -PassThru

Example 3: Add a BGP peer to a BGP router of a specified routing domain

This command adds a new BGP Peer to the BGP Router of the specified routing domain in Multi-tenant environment and automatically starts establishing BGP peering session.


PS C:\> Add-BgpPeer -RoutingDomain Rd_001 -Name BlueTenant1 -LocalIPAddress 14.1.1.10 -PeerIPAddress 192.168.1.2 -PeerASN 64513 -PassThru

Example 4: Add a Route Reflector client BGP peer to a BGP router

This command adds a new Route Reflector client BGP Peer to the BGP Router and automatically starts establishing BGP peering session.


PS C:\> Add-BgpPeer -Name RRClient1 -LocalIPAddress 14.1.1.10 -PeerIPAddress 192.168.1.2 -PeerASN 64513 –PassThru –RouteReflectorClient $true

Related topics

Community Additions

ADD
Show: