Skip to content

Instantly share code, notes, and snippets.

@thesaravanakumar
Last active November 10, 2022 12:01
Show Gist options
  • Save thesaravanakumar/367f8c55d126c0e6c41a8d105c69da04 to your computer and use it in GitHub Desktop.
Save thesaravanakumar/367f8c55d126c0e6c41a8d105c69da04 to your computer and use it in GitHub Desktop.
Short overview for cloud-router (GCP)

Cloud Router Overview

(Routes the data between networks)

  • Cloud Router is a fully distributed and managed service that programs custom dynamic routes and scales with the network traffic.
  • Works with both legacy networks and VPC networks.
  • A service that works over Cloud VPN or Interconnect connections to provide dynamic routing by using the Border Gateway Protocol (BGP) for the VPC networks.

Border Gateway Protocol

  • It uses BGP ( shortest path between networks) when it comes to bgp it uses a link local ip (starts with 169.)
  • Border gateway protocol is which that connects entires internet.

Cloud Router is recommended when you use:

  • Cloud NAT (provision your application instances without public IP addresses while also allowing them to access the internet)
  • Interconnect (provides direct physical connections between your on-premises network and gcp)
  • VPN (connect your existing network to your Compute Engine network via an IPsec connection or vpn gateways)

Two dynamic routing modes:

  • Regional routing mode – provides visibility to resources only in the defined region.
  • Global routing mode – provides visibility to resources in all regions

Required blocks:

  • Name of the router resource
  • Network to which the router belongs (vpc)
    • In BGP block
      • ASN (Autonomous System Number)
      • IPs

Custom route advertisements

  • You choose which routes Cloud Router advertises to your on-premises router through the Border Gateway Protocol (BGP).
  • You can specify route advertisements on the Cloud Router or for each BGP session.
  • If you specify advertised routes on the Cloud Router, they apply to all BGP sessions on the Cloud Router.
  • If you specify route advertisements on a BGP session, those advertisements replace the Cloud Router advertisements.
advertise_mode = “CUSTOM”
#This forces the config to explicitly state what subnets and ips to advertise.

Create VLAN attachments

VLAN (A Logical connection) The traffic is isolated within vlans (the department)

VLAN attachments (also known as interconnectAttachments) determine which VPC networks can reach your on-premises network through a Dedicated Interconnect connection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment