NAME

gcloud compute routers add-bgp-peer - add a BGP peer to a Compute Engine router

SYNOPSIS

gcloud compute routers add-bgp-peer NAME --interface=INTERFACE --peer-asn=PEER_ASN --peer-name=PEER_NAME [--advertised-route-priority=ADVERTISED_ROUTE_PRIORITY] [--advertisement-mode=MODE] [--async] [--[no-]enable-ipv6] [--[no-]enabled] [--instance=INSTANCE] [--instance-zone=INSTANCE_ZONE] [--ipv6-nexthop-address=IPV6_NEXTHOP_ADDRESS] [--md5-authentication-key=MD5_AUTHENTICATION_KEY] [--peer-ip-address=PEER_IP_ADDRESS] [--peer-ipv6-nexthop-address=PEER_IPV6_NEXTHOP_ADDRESS] [--region=REGION] [--set-advertisement-groups=[GROUP,...]] [--set-advertisement-ranges=[CIDR_RANGE=DESC,...]] [--bfd-min-receive-interval=BFD_MIN_RECEIVE_INTERVAL --bfd-min-transmit-interval=BFD_MIN_TRANSMIT_INTERVAL --bfd-multiplier=BFD_MULTIPLIER --bfd-session-initialization-mode=BFD_SESSION_INITIALIZATION_MODE] [GCLOUD_WIDE_FLAG ...]

DESCRIPTION

Add a BGP peer to a Compute Engine router.

POSITIONAL ARGUMENTS

NAME

Name of the router to operate on.

REQUIRED FLAGS

--interface=INTERFACE

The name of the interface for this BGP peer.

--peer-asn=PEER_ASN

The BGP autonomous system number (ASN) for this BGP peer. Must be a 16-bit or 32-bit private ASN as defined in https://tools.ietf.org/html/rfc6996, for example --asn=64512.

--peer-name=PEER_NAME

The name of the new BGP peer being added.

OPTIONAL FLAGS

--advertised-route-priority=ADVERTISED_ROUTE_PRIORITY

The priority of routes advertised to this BGP peer. In the case where there is more than one matching route of maximum length, the routes with lowest priority value win. 0 <= priority <= 65535. If not specified, will use Google-managed priorities.

--advertisement-mode=MODE

The new advertisement mode for this peer. MODE must be one of:

CUSTOM

Custom (user-configured) BGP advertisements.

DEFAULT

Default (Google-managed) BGP advertisements.

--async

Return immediately, without waiting for the operation in progress to complete.

--[no-]enable-ipv6

If IPv6 is enabled, the peer connection can be established with IPv6 route exchange. If disabled, no IPv6 route exchange is allowed on any active session. Disabled by default. Use --enable-ipv6 to enable and --no-enable-ipv6 to disable.

--[no-]enabled

If enabled, the peer connection can be established with routing information. If disabled, any active session with the peer is terminated and all associated routing information is removed. Enabled by default. Use --enabled to enable and --no-enabled to disable.

--instance=INSTANCE

Router appliance instance of the BGP peer being added.

--instance-zone=INSTANCE_ZONE

Zone of the instance to operate on. If not specified, you might be prompted to select a zone (interactive mode only). gcloud attempts to identify the appropriate zone by searching for resources in your currently active project. If the zone cannot be determined, gcloud prompts you for a selection with all available Google Cloud Platform zones.

To avoid prompting when this flag is omitted, the user can set the compute/zone property:

$ gcloud config set compute/zone ZONE

A list of zones can be fetched by running:

$ gcloud compute zones list

To unset the property, run:

$ gcloud config unset compute/zone

Alternatively, the zone can be stored in the environment variable CLOUDSDK_COMPUTE_ZONE.

--ipv6-nexthop-address=IPV6_NEXTHOP_ADDRESS

The IPv6 next hop address of the Cloud Router interface for this BGP peer. Must be a Google owned global unicast IPv6 address belonging to the range 2600:2d00:0:2:0:0:0:0/64 or 2600:2d00:0:3:0:0:0:0/64 and must belong to same subnet as the interface address of the peer router.

--md5-authentication-key=MD5_AUTHENTICATION_KEY

The MD5 authentication key for this BGP peer. Maximum length is 80 characters. Can contain only printable ASCII characters.

--peer-ip-address=PEER_IP_ADDRESS

The link-local address of the peer router. Must be a link-local IPv4 address belonging to the range 169.254.0.0/16.

--peer-ipv6-nexthop-address=PEER_IPV6_NEXTHOP_ADDRESS

The IPv6 next hop address of the peer router. Must be a Google owned global unicast IPv6 address belonging to the range 2600:2d00:0:2:0:0:0:0/64 or 2600:2d00:0:3:0:0:0:0/64.

--region=REGION

Region of the router to operate on. If not specified, you might be prompted to select a region (interactive mode only).

To avoid prompting when this flag is omitted, you can set the compute/region property:

$ gcloud config set compute/region REGION

A list of regions can be fetched by running:

$ gcloud compute regions list

To unset the property, run:

$ gcloud config unset compute/region

Alternatively, the region can be stored in the environment variable CLOUDSDK_COMPUTE_REGION.

--set-advertisement-groups=[GROUP,...]

The list of pre-defined groups of IP ranges to dynamically advertise on this peer. This list can only be specified in custom advertisement mode.

GROUP must be (currently only one value is supported):

ALL_SUBNETS

Automatically advertise all available subnets.

--set-advertisement-ranges=[CIDR_RANGE=DESC,...]

The list of individual IP ranges, in CIDR format, to dynamically advertise on this peer. Each IP range can (optionally) be given a text description DESC. For example, to advertise a specific range, use --set-advertisement-ranges=192.168.10.0/24. To store a description with the range, use --set-advertisement-ranges=192.168.10.0/24=my-networks. This list can only be specified in custom advertisement mode.

Arguments to configure BFD (Bidirectional Forwarding Detection) settings:
--bfd-min-receive-interval=BFD_MIN_RECEIVE_INTERVAL

The minimum receive interval between BFD control packets. The default is 1000 milliseconds. See $ gcloud topic datetimes for information on duration formats.

--bfd-min-transmit-interval=BFD_MIN_TRANSMIT_INTERVAL

The minimum transmit interval between BFD control packets. The default is 1000 milliseconds. See $ gcloud topic datetimes for information on duration formats.

--bfd-multiplier=BFD_MULTIPLIER

The number of consecutive BFD control packets that must be missed before BFD declares that a peer is unavailable.

--bfd-session-initialization-mode=BFD_SESSION_INITIALIZATION_MODE

The BFD session initialization mode for this BGP peer. Must be one of:

ACTIVE - The Cloud Router will initiate the BFD session for this BGP peer.

PASSIVE - The Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer.

DISABLED - BFD is disabled for this BGP peer.

BFD_SESSION_INITIALIZATION_MODE must be one of:

ACTIVE

The Cloud Router will initiate the BFD session for this BGP peer.

DISABLED

BFD is disabled for this BGP peer.

PASSIVE

The Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer.

GCLOUD WIDE FLAGS

These flags are available to all commands: --access-token-file, --account, --billing-project, --configuration, --flags-file, --flatten, --format, --help, --impersonate-service-account, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity.

Run $ gcloud help for details.

NOTES

These variants are also available:

$ gcloud alpha compute routers add-bgp-peer

$ gcloud beta compute routers add-bgp-peer