This page describes how to manage Router resources in a Google Distributed Cloud Edge zone.
For more information on Google Distributed Cloud Edge Routers, see How Distributed Cloud Edge works.
Create a Router
To create a Distributed Cloud Edge Router, complete the steps in this section.
To complete this task, you must have the GDCE Network Admin role in your Google Cloud project. For more information, see Permissions and roles.
Keep the following in mind:
You can create one Router per Distributed Cloud Edge Network.
We recommend that you create a Router along with its corresponding InterconnectAttachment at the same time. For more information about creating an InterconnectAttachment, see Create an InterconnectAttachment.
gcloud
gcloud edge-cloud networking routers create ROUTER_NAME --network=NETWORK_NAME / --location=REGION --zone=ZONE_NAME --asn=ASN
Replace the following:
ROUTER_NAME
is a descriptive name that uniquely identifies this Router.NETWORK_NAME
is the name of the Network that this Router will serve.REGION
is the Google Cloud region to which the target Distributed Cloud Edge Zone belongs.ZONE_NAME
is the name of the target Distributed Cloud Edge Zone.ASN
is the Autonomous System Number (ASN) for this Router. You can specify 2-byte and 4-byte values. Supports public and private ASN values.
API
Create the Router by making a POST
request to the projects.locations.zones.routers.create
method as follows:
POST /v1/projects/PROJECT_ID/locations/REGION/zones/ZONE_NAME/routers?routerId=ROUTER_ID { "labels": { LABELS, }, "network": { NETWORK_NAME, }, "asn": { ASN, }, }
Replace the following:
PROJECT_ID
is the ID of the target Google Cloud project.REGION
is the Google Cloud region to which the target Distributed Cloud Edge Zone belongs.ZONE_NAME
is the name of the target Distributed Cloud Edge Zone.ROUTER_ID
is an ID that uniquely identifies this Router.LABELS
is a list of labels to apply to this Router resource.NETWORK_NAME
is the name of the Network that this Router will serve.ASN
is the Autonomous System Number (ASN) for this Router. You can specify 2-byte and 4-byte values. Supports public and private ASN values.
Establish a BGP peering session on a Router
A Router allows you to establish the following types of Border Gateway Protocol (BGP) peering sessions:
- A northbound peering session with an InterconnectAttachment
- A southbound peering session with a Subnetwork
- A loopback peering session with a Network
A BGP peering session is established by adding an interface to the Router for the Distributed Cloud Edge network component corresponding to the type of peering session.
Establish a northbound peering session
To establish a northbound peering session on a Router with an InterconnectAttachment, complete the steps in this section. The target InterconnectAttachment must be associated with the target Router.
To complete this task, you must have the GDCE Network Admin role in your Google Cloud project. For more information, see Permissions and roles.
gcloud edge-cloud networking routers add-interface ROUTER_NAME \ --interface-name=INTERFACE_NAME \ --interconnect-attachment=ATTACHMENT_NAME \ --ip-address=INTERCONNECT_ADDRESS \ --ip-mask-length=IP_MASK_LENGTH \ --location=REGION \ --zone=ZONE_NAME
Replace the following:
ROUTER_NAME
is the name of the target Router.INTERFACE_NAME
is a descriptive name for this interface.ATTACHMENT_NAME
is the name of the target InterconnectAttachment within the target Router.INTERCONNECT_ADDRESS
is the IPv4 address of the Interconnect on which the target InterconnectAttachment has been configured.REGION
is the Google Cloud region to which the target Distributed Cloud Edge Zone belongs.ZONE_NAME
is the name of the target Distributed Cloud Edge Zone.
Establish a southbound peering session
To establish a southbound peering session on a Router with a Subnetwork, complete the steps in this section.
To complete this task, you must have the GDCE Network Admin role in your Google Cloud project. For more information, see Permissions and roles.
gcloud edge-cloud networking routers add-interface ROUTER_NAME \ --interface-name=INTERFACE_NAME \ --subnet=SUBNETWORK_NAME \ --location=REGION \ --zone=ZONE_NAME
Replace the following:
ROUTER_NAME
is the name of the target Router.INTERFACE_NAME
is a descriptive name for this interface.SUBNETWORK_NAME
is the name of the target Subnetwork.REGION
is the Google Cloud region to which the target Distributed Cloud Edge Zone belongs.ZONE_NAME
is the name of the target Distributed Cloud Edge Zone.
Establish a loopback peering session
To establish a loopback peering session on a Router with a Network, complete the steps in this section.
To complete this task, you must have the GDCE Network Admin role in your Google Cloud project. For more information, see Permissions and roles.
gcloud edge-cloud networking routers add-interface ROUTER_NAME \ --interface-name=INTERFACE_NAME \ --loopback-ip-addresses=LOOPBACK_ADDRESSSES \ --location=REGION \ --zone=ZONE_NAME
Replace the following:
ROUTER_NAME
is the name of the target Router.INTERFACE_NAME
is a descriptive name for this interface.LOOPBACK_ADDRESSES
are the IPv4 incoming and outgoing addresses for the loopback interface, comma-separated.REGION
is the Google Cloud region to which the target Distributed Cloud Edge Zone belongs.ZONE_NAME
is the name of the target Distributed Cloud Edge Zone.
Terminate a BGP peering session
To terminate a BGP peering session between a Router and an InterconnectAttachment, a Subnetwork, or a Network, you must delete the interface for that network component from the target Router by completing the steps in this section.
To complete this task, you must have the GDCE Network Admin role in your Google Cloud project. For more information, see Permissions and roles.
gcloud edge-cloud networking routers remove-interface ROUTER_NAME \ --interface-name=INTERFACE_NAME \ --location=REGION \ --zone=ZONE_NAME
Replace the following:
ROUTER_NAME
is the name of the target Router.INTERFACE_NAME
is a descriptive name for this interface.REGION
is the Google Cloud region to which the target Distributed Cloud Edge Zone belongs.ZONE_NAME
is the name of the target Distributed Cloud Edge Zone.
Configure peers in a BGP peering session
You can add and remove BGP peers in a BGP peering session established between a Router and an InterconnectAttachment, a Subnetwork, or a Network. When you add a peer to a BGP peering session, Bidirectional Forwarding Detection (BFD) is automatically enabled on the target Router with a 100ms interval, 100ms minimum receive window, and a multiplier of 3.
After you add a peer to the target BGP peering session, you can then assign the peer IP address to the Pod running your workload. To find the peer IP address, complete the steps in Get information about a Router.
Add a peer to a BGP peering session
To add a peer to a BGP peering session, complete the steps in this section.
To complete this task, you must have the GDCE Network Admin role in your Google Cloud project. For more information, see Permissions and roles.
gcloud edge-cloud networking routers add-bgp-peer ROUTER_NAME \ --peer-name=PEER_NAME> \ --peer-asn=PEER_ASN \ --peer-ipv4-range=PEER_IP_RANGE \ --interface=INTERFACE_NAME \ \ --location=REGION \ --zone=ZONE_NAME
Replace the following:
ROUTER_NAME
is the name of the target Router.PEER_NAME
is a descriptive name for this peer.PEER_ASN
is the Autonomous System Number (ASN) for this peer. You can specify a two-byte or a four-byte value. Both public and private ASNs are supported.PEER_IP_RANGE
is the IPv4 CIDR range for this peer. This address range must be in the same Subnetwork as the IP address or address range for the associated Interconnect Attachment, Subnetwork, or Network.INTERFACE_NAME
is the name of the interface corresponding to the target BGP session.REGION
is the Google Cloud region to which the target Distributed Cloud Edge Zone belongs.ZONE_NAME
is the name of the target Distributed Cloud Edge Zone.
Remove a peer from a BGP peering session
To remove a peer from a BGP peering session, complete the steps in this section.
To complete this task, you must have the GDCE Network Admin role in your Google Cloud project. For more information, see Permissions and roles.
gcloud edge-cloud networking routers remove-bgp-peer ROUTER_NAME \ --peer-name=PEER_NAME> \ --location=REGION \ --zone=ZONE_NAME
Replace the following:
ROUTER_NAME
is the name of the target Router.PEER_NAME
is the name of the target peer.REGION
is the Google Cloud region to which the target Distributed Cloud Edge Zone belongs.ZONE_NAME
is the name of the target Distributed Cloud Edge Zone.
List Routers
To list the Routers provisioned within a Distributed Cloud Edge Zone, complete the steps in this section.
To complete this task, you must have the GDCE Network Viewer role in your Google Cloud project. For more information, see Permissions and roles.
gcloud
gcloud edge-cloud networking routers list --location=REGION --zone=ZONE_NAME
Replace the following:
REGION
is the Google Cloud region to which the target Distributed Cloud Edge Zone belongs.ZONE_NAME
is the name of the target Distributed Cloud Edge Zone.
API
List Routers by making a GET
request to the projects.locations.zones.routers.list
method as follows:
GET /v1/PROJECT_ID/locations/REGION/zones/ZONE_NAME/routers?filter=FILTER&pageSize=PAGE_SIZE&orderBy=SORT_BY&pageToken=PAGE_TOKEN
Replace the following:
PROJECT_ID
is the ID of the target Google Cloud project.REGION
is the Google Cloud region to which the target Distributed Cloud Edge Zone belongs.ZONE_NAME
is the name of the target Distributed Cloud Edge Zone.FILTER
is an expression that constrains the returned results to specific values.PAGE_SIZE
is the number of results to return per page.SORT_BY
is a comma-delimited list of field names by which the returned results are sorted. The default sort order is ascending; for descending sort order, prefix the desired field with~
.PAGE_TOKEN
is a token received in the response to the last list request in thenextPageToken
field in the response. Send this token to receive the following page of results.
Get information about a Router
To get information about a Distributed Cloud Edge Router, complete the steps in this section.
To complete this task, you must have the GDCE Network Viewer role in your Google Cloud project. For more information, see Permissions and roles.
gcloud
gcloud edge-cloud networking routers describe ROUTER_NAME --location=REGION --zone=ZONE_NAME
Replace the following:
ROUTER_NAME
is the name of the target Router.REGION
is the Google Cloud region to which the target Distributed Cloud Edge Zone belongs.ZONE_NAME
is the name of the target Distributed Cloud Edge Zone.
API
Get information about the Router by making a GET
request to the projects.locations.zones.routers.get
method as follows:
GET /v1/projects/PROJECT_ID/locations/REGION/zones/ZONE_NAME/routers/ROUTER_ID
Replace the following:
PROJECT_ID
is the ID of the target Google Cloud project.REGION
is the Google Cloud region to which the target Distributed Cloud Edge Zone belongs.ZONE_NAME
is the name of the target Distributed Cloud Edge Zone.ROUTER_ID
is the ID of the target Router.
This operation returns detailed information about the resource, including its provisioning state as follows:
PENDING
- the resource has not yet begun provisioning and has not yet been propagated throughout the Zone.PROVISIONING
- the resource is being provisioned; you must wait until it has been propagated throughout the Zone.RUNNING
- the resource has been successfully provisioned and propagated throughout the Zone; it is ready to use.FAILED
- the provisioning of the resource was not successful; the resource has not been propagated throughout the Zone.
Check the operational status of a Router
To check the operational status of a Distributed Cloud Edge Router, complete the steps in this section.
To complete this task, you must have the GDCE Network Viewer role in your Google Cloud project. For more information, see Permissions and roles.
gcloud
gcloud edge-cloud networking routers get-status ROUTER_NAME --location=REGION --zone=ZONE_NAME
Replace the following:
ROUTER_NAME
is the name of the target Router.REGION
is the Google Cloud region to which the target Distributed Cloud Edge Zone belongs.ZONE_NAME
is the name of the target Distributed Cloud Edge Zone.
API
Check the operational status of the Router by making a GET
request to the projects.locations.zones.routers.diagnose
method as follows:
GET /v1/projects/PROJECT_ID/locations/REGION/zones/ZONE_NAME/routers/ROUTER_ID:diagnose
Replace the following:
PROJECT_ID
is the ID of the target Google Cloud project.REGION
is the Google Cloud region to which the target Distributed Cloud Edge Zone belongs.ZONE_NAME
is the name of the target Distributed Cloud Edge Zone.ROUTER_ID
is the ID of the target Router.
Delete a Router
To delete a Distributed Cloud Edge Router, complete the steps in this section.
To complete this task, you must have the GDCE Network Admin role in your Google Cloud project. For more information, see Permissions and roles.
gcloud
gcloud edge-cloud networking routers delete ROUTER_NAME --location=REGION --zone=ZONE_NAME
Replace the following:
ROUTER_NAME
is the name of the target Router.REGION
is the Google Cloud region to which the target Distributed Cloud Edge Zone belongs.ZONE_NAME
is the name of the target Distributed Cloud Edge Zone.
API
Check the operational status of the Router by making a DELETE
request to the projects.locations.zones.routers.delete
method as follows:
DELETE /v1/projects/PROJECT_ID/locations/REGION/zones/ZONE_NAME/routers/ROUTER_ID
Replace the following:
PROJECT_ID
is the ID of the target Google Cloud project.REGION
is the Google Cloud region to which the target Distributed Cloud Edge Zone belongs.ZONE_NAME
is the name of the target Distributed Cloud Edge Zone.ROUTER_ID
is the ID of the target Router.
What's next
- Deploy workloads on Google Distributed Cloud Edge
- Manage Interconnects
- Manage InterconnectAttachments
- Manage Networks
- Manage Subnetworks
- Manage VPN Connections
- Manage Zones