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.
Examples
Example 1: Add a BGP peer to the BGP router and establish a session
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.
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.
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.
Parameters
-AsJob
Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-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.
Parameter properties
Type:
CimSession[]
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
Session
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-HoldTimeSec
Specifies the configured value of HoldTime in seconds after the BGP session expires if no BGP message is received.
Parameter properties
Type:
UInt16
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-IdleHoldTimeSec
Specifies the configured value of IdleHoldTime in seconds after the BGP Session expires if no BGP message is received.
Parameter properties
Type:
UInt16
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-LocalASN
Specifies the local autonomous systems (AS) number of the BGP router instance for this peer.
Parameter properties
Type:
UInt32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-LocalIPAddress
Specifies the local BGP Router's peering IP Address.
It can be IPv4 or IPv6 address type.
Parameter properties
Type:
IPAddress
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-MaxAllowedPrefix
Specifies the maximum number of allowed IPv4 or IPv6 network prefixes that can be learned from the given neighbor.
Parameter properties
Type:
UInt32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-Name
Specifies the unique name for the peering with specified BGP neighbor.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
PeerName, PeerId
Parameter sets
(All)
Position:
1
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-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.
Parameter properties
Type:
OperationMode
Default value:
None
Accepted values:
Mixed, Server
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-PassThru
Returns an object representing the item with which you are working.
By default, this cmdlet does not generate any output.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-PeerASN
Specifies the neighbor BGP Router's AS Number.
Parameter properties
Type:
UInt32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-PeeringMode
Specifies the parameter to configure peering mode for the given peer.
Parameter properties
Type:
PeeringMode
Default value:
None
Accepted values:
Automatic, Manual
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-PeerIPAddress
Specifies the neighbor BGP router's peering IP address.
It can be of IPv4 or IPv6 address type.
Parameter properties
Type:
IPAddress
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-RouteReflectorClient
Specifies whether the current peer is a Route Reflector client peer or non-client peer.
Parameter properties
Type:
Boolean
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-RoutingDomain
Specifies the user-defined unique alphanumeric identifier for the routing ___domain.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
RoutingDomainName
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-ThrottleLimit
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.
Parameter properties
Type:
Int32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Weight
Specifies administrative preference assigned to the routes received from this peer.
Parameter properties
Type:
UInt16
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.