View router details

This page describes how to view the following Cloud Router details:

All routes for a BGP session use the same base advertised route priority. Formore information, seeAdvertisedpriority.

For more information about troubleshooting, see the following:

Before you begin

gcloud

If you want to use the command-line examples in this guide, do the following:

  1. Install or update to the latest version of theGoogle Cloud CLI.
  2. Set adefault region andzone.

API

If you want to use the API examples in this guide, set upAPI access.

View Cloud Router status and routes

To view Cloud Router status and routes, do the following:

Console

Check the status of a BGP session

  1. In the Google Cloud console, go to theCloud Routers page.

    Go to Cloud Routers

  2. View theBGP sessions column.

    • A green circle with a checkmark indicates that the session isestablished.
    • A red circle with an exclamation mark indicates that the session isstill coming up or has already failed.

    For more information, hold the pointer over the exclamation mark.If the session is still coming up,wait a few minutes, and then reload the page to verify that the sessionhas been established. If the session failed, view the logs to seeinformation about the session. For more information, seeView logs and metrics.

View the routes that your router has advertised

  1. In the Google Cloud console, go to theCloud Routers page.

    Go to Cloud Routers

  2. Click the name of your router to open theRouter details page.

  3. UnderBGP sessions, click the name of the BGP session thatyou want to see advertised routes for.

  4. On theBGP session details page, see theAdvertised routessection.

View the dynamic routes that your Cloud Router has learned in the network

  1. In the Google Cloud console, go to theVPC Routespage.

    Go to VPC Routes

  2. SelectDynamic.

Determine the BGP peer keepalive interval setting

  1. In the Google Cloud console, go to theCloud Routers page.

    Go to Cloud Routers

  2. Click the router whose information you want to view.

  3. View the setting on theRouter details page underBGP peerkeepalive interval.

Check the status of a BFD session

  1. In the Google Cloud console, go to theCloud Routers page.

    Go to Cloud Routers

  2. Click the router whose information you want to view.

  3. On theRouter details page, underBGP sessions, you can determineif BFD is enabled and which BFD session initialization mode is set.

gcloud

  1. Run theget-status command and pass the name of the router. The commandreturns the router's status, advertised routes, and learned routes.

    gcloud compute routers get-statusROUTER_NAME \   --project=PROJECT_ID \   --region=REGION

    Replace the following:

    • ROUTER_NAME: the name of the Cloud Router
    • PROJECT_ID: the project that contains yourCloud Router
    • REGION: the region that contains yourCloud Router
  2. The output is similar to the following:

    kind: compute#routerStatusResponseresult:  bestRoutes:  — creationTimestamp: '2019-04-17T07:16:12.789-07:00'    destRange: 192.168.1.0/24    kind: compute#route    nextHopIp: 169.254.0.2    priority: 100  — creationTimestamp: '2019-04-17T07:16:12.789-07:00'    destRange: 192.168.2.0/24    kind: compute#route    nextHopIp: 169.254.0.2    priority: 338  bestRoutesForRouter:  — creationTimestamp: '2019-04-17T07:15:42.012-07:00'    destRange: 192.168.1.0/24    kind: compute#route    nextHopIp: 169.254.0.2    priority: 100  — creationTimestamp: '2019-04-17T07:15:42.014-07:00'    destRange: 192.168.2.0/24    kind: compute#route    nextHopIp: 169.254.0.2    priority: 338  bgpPeerStatus:  — advertisedRoutes:    — destRange: 10.0.1.0/24      kind: compute#route      nextHopIp: 169.254.0.1      priority: 100    — destRange: 10.0.2.0/24      kind: compute#route      nextHopIp: 169.254.0.1      priority: 340  bfdStatus:   bfdSessionInitializationMode: ACTIVE      configUpdateTimestampMicros: '1615561369012381'      controlPacketCounts:        numRx: 64014        numRxRejected: 0        numRxSuccessful: 64014        numTx: 63994      controlPacketIntervals:      — avgMs: '263'        duration: MINUTE        maxMs: '299'        minMs: '225'        numIntervals: '227'        type: TRANSMIT      — avgMs: '262'        duration: MAX        maxMs: '4467'        minMs: '0'        numIntervals: '63993'        type: TRANSMIT      — avgMs: '261'        duration: MINUTE        maxMs: '1000'        minMs: '176'        numIntervals: '228'        type: RECEIVE      localDiagnostic: NO_DIAGNOSTIC      localState: UP      negotiatedLocalControlTxIntervalMs: 1000      rxPacket:        authenticationPresent: false        controlPlaneIndependent: false        demand: false        diagnostic: NO_DIAGNOSTIC        final: false        length: 24        minEchoRxIntervalMs: 0        minRxIntervalMs: 1000        minTxIntervalMs: 1000        multiplier: 5        multipoint: false        myDiscriminator: 313496190        poll: false        state: UP        version: 1        yourDiscriminator: 369987665      txPacket:        authenticationPresent: false        controlPlaneIndependent: false        demand: false        diagnostic: NO_DIAGNOSTIC        final: false        length: 24        minEchoRxIntervalMs: 0        minRxIntervalMs: 1000        minTxIntervalMs: 1000        multiplier: 5        multipoint: false        myDiscriminator: 369987665        poll: false        state: UP        version: 1        yourDiscriminator: 313496190      uptimeMs: '16812601'  enableIpv6: true  ipAddress: 169.254.0.1  ipv6NexthopAddress: 2600:2d00:0:0:0:0:1:5  linkedVpnTunnel: https://www.googleapis.com/compute/projects/PROJECT_ID/regions/us-central1/vpnTunnels/vpn-1-tunnel-1  name: mysession2  numLearnedRoutes: 2  peerIpAddress: 169.254.0.2  peerIpv6NexthopAddress: 2600:2d00:0:0:0:0:1:4  state: Established  status: UP  uptime: 2 days, 3 hours, 37 minutes, 0 seconds  uptimeSeconds: '185820'network: https://www.googleapis.com/compute/kind: compute#routerStatusResponse

    result.bestRoutes lists the best dynamic routes for thisCloud Router's VPC network in the same region asthis Cloud Router. The list consists of the best routes perprefix that are programmed into this region's VPC dataplane. When global dynamic routing mode is turned on in theVPC network, this list can include cross-region dynamicroutes from Cloud Routers in other regions.

    result.bestRoutesForRouter lists the best BGP routes learned by thisCloud Router. It is possible that routes listed might not beprogrammed into the data plane if the Google Cloud control planefinds a more optimal route for a prefix than a route learned by thisCloud Router.

API

Use therouters.getRouterStatusmethod:

GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/routers/ROUTER_NAME/getRouterStatus

Replace the following:

  • PROJECT_ID: the project that contains theCloud Router
  • REGION: the region where the Cloud Router islocated
  • ROUTER_NAME: the name of the Cloud Router

View BGP session configuration

To view the configuration for an existing BGP session, follow these steps.

Console

  1. In the Google Cloud console, go to theCloud Routers page.

    Go to Cloud Routers

  2. From the list of routers, select the router with the BGP session that youwant to view.

  3. View theBGP sessions section to see the details of yourCloud Router's BGP sessions.

gcloud

  1. Run thedescribe command and pass the name of the Cloud Router.

    gcloud compute routers describeROUTER_NAME \  --projectPROJECT_ID \  --regionREGION

    Replace the following:

    • ROUTER_NAME: the name of the Cloud Router
    • PROJECT_ID: the project that contains yourCloud Router
    • REGION: the region where the Cloud Router islocated
  2. In the output, view thebgpPeers section:

      bgp:    advertiseMode: DEFAULT    asn: 65001    keepaliveInterval: 120  bgpPeers:  — advertiseMode: DEFAULT    bfd:     minReceiveInterval: 1000     minTransmitInterval: 1000     mode: ACTIVE     multiplier: 5    enable: 'TRUE'    enableIpv6: true    interfaceName: if-mysession2    ipAddress: 169.254.0.1    ipv6NexthopAddress: 2600:2d00:0:0:0:0:1:5    name: mysession2    peerAsn: 65002    peerIpAddress: 169.254.0.2    peerIpv6NexthopAddress: 2600:2d00:0:0:0:0:1:6  creationTimestamp: '2019-03-15T13:48:12.433-07:00'  description: ''  id: '1234567890123456789'  interfaces:  — ipRange: 169.254.0.1/30  linkedVpnTunnel: https://www.googleapis.com/compute/projects/PROJECT_ID/regions/us-central1/vpnTunnels/vpn-1-tunnel-1  name: if-mysession2  kind: compute#router  name:ROUTER_NAME  network: https://www.googleapis.com/compute/projects/PROJECT_ID/global/networks/network-a  region: https://www.googleapis.com/compute/projects/PROJECT_ID/regions/us-central1  selfLink: https://www.googleapis.com/compute/projects/PROJECT_ID/regions/us-central1/routers/ROUTER_NAME  selfLinkWithId: https://www.googleapis.com/compute/projects/PROJECT_ID/regions/us-central1/routers/7114728016518951267

API

Use therouters.getmethod:

GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/routers/ROUTER_NAME

Replace the following:

  • PROJECT_ID: the project that contains theCloud Router
  • REGION: the region where the Cloud Routeris located
  • ROUTER_NAME: the name of the Cloud Router

ThebgpPeers[] field in the output contains the configuration for each BGPsession.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-18 UTC.