Add-BgpCustomRoute

Add-BgpCustomRoute

Adds custom routes to the BGP routing table.

Sintaxis

Parameter Set: Add0
Add-BgpCustomRoute [-AsJob] [-CimSession <CimSession[]> ] [-Interface <String[]> ] [-Network <String[]> ] [-PassThru] [-RoutingDomain <String> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Descripción detallada

The Add-BgpCustomRoute cmdlet adds custom routes from router interfaces and network prefixes to the Border Gateway Protocol (BGP) routing table. The cmdlet returns information about any errors that occur when you add the routes to the BGP routing table.

Use the Interface parameter to specify the router interfaces. Use the Network parameter to specify the network prefixes. Use the RoutingDomain parameter to specify the routing domain or tenant of the BGP router in a multitenant deployment.

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

-Interface<String[]>

Specifies an array of names of router interfaces. The cmdlet adds the static routes from these interfaces to the BGP routing table.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-Network<String[]>

Specifies an array of network prefixes, in Classless InterDomain Routing (CIDR) notation. The cmdlet adds the routing information for the network prefixes to the BGP routing table.

Alias

DestinationNetwork

¿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

-RoutingDomain<String>

Specifies the name, as a string, of the routing domain. The cmdlet adds the custom routes to the BGP routing table for this routing domain.

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

<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#BgpCustomNetworkInfo

Ejemplos

Example 1: Add an interface to a BGP router

This command adds the interface named Ethernet to the local BGP router. The cmdlet adds all the unicast IP addresses of the interface to the BGP router.

PS C:\> Add-BgpCustomRoute -Interface "Ethernet" -PassThru

Example 2: Add a network prefix to a BGP router

This command adds the routing information from the network prefix 172.23.90.0/29 to the local BGP router.

PS C:\> Add-BgpCustomRoute -Network "172.23.90.0/29" -PassThru

Example 3: Add an interface and a network prefix to a BGP router for a routing domain

This command adds the routing information from the interface named VS1 and the network prefix 172.23.90.0 to the BGP router for the routing domain in a multitenant environment named Rd_001. The command includes the PassThru parameter, so the command sends a BgpCustomNetworkInfo object to the console.

PS C:\> Add-BgpCustomRoute -Interface "VS1" -Network "172.23.90/29" -RoutingDomain "Rd_001" -PassThru

Temas relacionados

Get-BgpCustomRoute

Remove-BgpCustomRoute