REST Resource: routers

Resource: Router

Represents a Cloud Router resource.

For more information about Cloud Router, read the Cloud Router overview.

JSON representation
{
  "id": string,
  "creationTimestamp": string,
  "name": string,
  "description": string,
  "region": string,
  "network": string,
  "interfaces": [
    {
      "name": string,
      "linkedVpnTunnel": string,
      "linkedInterconnectAttachment": string,
      "ipRange": string,
      "managementType": enum,
      "privateIpAddress": string,
      "redundantInterface": string,
      "subnetwork": string
    }
  ],
  "bgpPeers": [
    {
      "name": string,
      "interfaceName": string,
      "ipAddress": string,
      "peerIpAddress": string,
      "peerAsn": integer,
      "advertisedRoutePriority": integer,
      "advertiseMode": enum,
      "advertisedGroups": [
        enum
      ],
      "advertisedIpRanges": [
        {
          "range": string,
          "description": string
        }
      ],
      "managementType": enum,
      "enable": enum,
      "bfd": {
        "sessionInitializationMode": enum,
        "minTransmitInterval": integer,
        "minReceiveInterval": integer,
        "multiplier": integer
      },
      "routerApplianceInstance": string
    }
  ],
  "bgp": {
    "asn": integer,
    "advertiseMode": enum,
    "advertisedGroups": [
      enum
    ],
    "advertisedIpRanges": [
      {
        "range": string,
        "description": string
      }
    ],
    "keepaliveInterval": integer
  },
  "selfLink": string,
  "nats": [
    {
      "name": string,
      "sourceSubnetworkIpRangesToNat": enum,
      "subnetworks": [
        {
          "name": string,
          "sourceIpRangesToNat": [
            enum
          ],
          "secondaryIpRangeNames": [
            string
          ]
        }
      ],
      "natIps": [
        string
      ],
      "drainNatIps": [
        string
      ],
      "natIpAllocateOption": enum,
      "minPortsPerVm": integer,
      "udpIdleTimeoutSec": integer,
      "icmpIdleTimeoutSec": integer,
      "tcpEstablishedIdleTimeoutSec": integer,
      "tcpTransitoryIdleTimeoutSec": integer,
      "logConfig": {
        "enable": boolean,
        "filter": enum
      },
      "enableEndpointIndependentMapping": boolean
    }
  ],
  "encryptedInterconnectRouter": boolean,
  "kind": string
}
Fields
id

string (uint64 format)

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

creationTimestamp

string

[Output Only] Creation timestamp in RFC3339 text format.

name

string

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

description

string

An optional description of this resource. Provide this property when you create the resource.

region

string

[Output Only] URI of the region where the router resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

network

string

URI of the network to which this router belongs.

interfaces[]

object

Router interfaces. Each interface requires either one linked resource, (for example, linkedVpnTunnel), or IP address and IP address range (for example, ipRange), or both.

interfaces[].name

string

Name of this interface entry. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

interfaces[].linkedVpnTunnel

string

URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.

interfaces[].linkedInterconnectAttachment

string

URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.

interfaces[].ipRange

string

IP address and range of the interface. The IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.

interfaces[].managementType

enum

[Output Only] The resource that configures and manages this interface.

  • MANAGED_BY_USER is the default value and can be managed directly by users.
  • MANAGED_BY_ATTACHMENT is an interface that is configured and managed by Cloud Interconnect, specifically, by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of interface when the PARTNER InterconnectAttachment is created, updated, or deleted.

interfaces[].privateIpAddress

string

The regional private internal IP address that is used to establish BGP sessions to a VM instance acting as a third-party Router Appliance, such as a Next Gen Firewall, a Virtual Router, or an SD-WAN VM.

interfaces[].redundantInterface

string

Name of the interface that will be redundant with the current interface you are creating. The redundantInterface must belong to the same Cloud Router as the interface here. To establish the BGP session to a Router Appliance VM, you must create two BGP peers. The two BGP peers must be attached to two separate interfaces that are redundant with each other. The redundantInterface must be 1-63 characters long, and comply with RFC1035. Specifically, the redundantInterface must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

interfaces[].subnetwork

string

The URI of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. When you establish a BGP session to a VM instance using this interface, the VM instance must belong to the same subnetwork as the subnetwork specified here.

bgpPeers[]

object

BGP information that must be configured into the routing stack to establish BGP peering. This information must specify the peer ASN and either the interface name, IP address, or peer IP address. Please refer to RFC4273.

bgpPeers[].name

string

Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

bgpPeers[].interfaceName

string

Name of the interface the BGP peer is associated with.

bgpPeers[].ipAddress

string

IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.

bgpPeers[].peerIpAddress

string

IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.

bgpPeers[].peerAsn

integer (uint32 format)

Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.

bgpPeers[].advertisedRoutePriority

integer (uint32 format)

The priority of routes advertised to this BGP peer. Where there is more than one matching route of maximum length, the routes with the lowest priority value win.

bgpPeers[].advertiseMode

enum

User-specified flag to indicate which mode to use for advertisement.

bgpPeers[].advertisedGroups[]

enum

User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:

  • ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.
  • ALL_VPC_SUBNETS: Advertises the router's own VPC subnets.
Note that this field can only be populated if advertiseMode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.

bgpPeers[].advertisedIpRanges[]

object

User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertiseMode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.

bgpPeers[].advertisedIpRanges[].range

string

The IP range to advertise. The value must be a CIDR-formatted string.

bgpPeers[].advertisedIpRanges[].description

string

User-specified description for the IP range.

bgpPeers[].managementType

enum

[Output Only] The resource that configures and manages this BGP peer.

  • MANAGED_BY_USER is the default value and can be managed by you or other users
  • MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.

bgpPeers[].enable

enum

The status of the BGP peer connection.

If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.

bgpPeers[].bfd

object

BFD configuration for the BGP peering.

Not currently available publicly.

bgpPeers[].bfd.sessionInitializationMode

enum

The BFD session initialization mode for this BGP peer.

Not currently available publicly.

If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.

bgpPeers[].bfd.minTransmitInterval

integer (uint32 format)

The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router.

Not currently available publicly.

If set, this value must be between 1000 and 30000.

The default is 1000.

bgpPeers[].bfd.minReceiveInterval

integer (uint32 format)

The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router.

Not currently available publicly.

If set, this value must be between 1000 and 30000.

The default is 1000.

bgpPeers[].bfd.multiplier

integer (uint32 format)

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

Not currently available publicly.

If set, the value must be a value between 5 and 16.

The default is 5.

bgpPeers[].routerApplianceInstance

string

URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.

bgp

object

BGP information specific to this router.

bgp.asn

integer (uint32 format)

Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.

bgp.advertiseMode

enum

User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.

bgp.advertisedGroups[]

enum

User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertiseMode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.

bgp.advertisedIpRanges[]

object

User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertiseMode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.

bgp.advertisedIpRanges[].range

string

The IP range to advertise. The value must be a CIDR-formatted string.

bgp.advertisedIpRanges[].description

string

User-specified description for the IP range.

bgp.keepaliveInterval

integer (uint32 format)

The interval in seconds between BGP keepalive messages that are sent to the peer.

Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer.

BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers.

If set, this value must be between 20 and 60. The default is 20.

nats[]

object

A list of NAT services created in this router.

nats[].name

string

Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.

nats[].sourceSubnetworkIpRangesToNat

enum

Specify the Nat option, which can take one of the following values:

  • ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
  • ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
  • LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below)
The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other Router.Nat section in any Router for this network in this region.

nats[].subnetworks[]