Configuring On-premises Routers

After you create a VLAN attachment, configure your on-premises router to establish a BGP session with your Cloud Router. Use the VLAN ID, interface IP address, and peering IP address provided by the VLAN attachment to configure your on-premises router.

On your on-premises router, configure the following settings:

  • MTU of 1440 on the IP subinterface
  • EBGP multi-hop for the BGP session
  • Use the default values for all timers such as the BGP session hold time.
  • If your device supports BGP graceful restart, enable it and use the default values for the restart and stalepath timers. Graceful restart prevents BGP sessions from dropping and routes from withdrawing during Cloud Router maintenance.

The following sections provide sample router configurations for different hardware. After you configure your on-premises router, you can check the status of your BGP sessions by viewing the Cloud Router details.

Cisco

The sample configuration is for an interface on a Cisco ASR 1009 router that's running IOS-XE. Values for the following fields are provided by the VLAN attachment and Cloud Router.

For the BGP session:

  • remote-as — The AS number of your Cloud Router (65200).
  • neighbor IP address — The link local IP address of your Cloud Router's interface, from the cloudRouterIpAddress field (169.254.180.81).

For Port-channel122.100:

  • encapsulation dot1Q — For Dedicated Interconnect, the VLAN ID allocated by the VLAN attachment (1000). For Partner Interconnect, the VLAN ID allocated by your service provider.
  • ip address — The on-premises router IP address, from the customerRouterIpAddress field (169.254.180.82).
router bgp 64500
 bgp graceful-restart
 neighbor 169.254.180.81 description "bgp to my-router in us-central1"
 neighbor 169.254.180.81 remote-as 65200
 neighbor 169.254.180.81 local-as 65201
 neighbor 169.254.180.81 ebgp-multihop 4
 neighbor 169.254.180.81 update-source Port-channel22.1000
 neighbor 169.254.180.81 route-map SEND-TO-GCP out
!
interface GigabitEthernet0/0/0
 channel-group 22 mode active
!
interface Port-channel22.1
 description "Untagged VLAN for testing"
 encapsulation dot1Q 1 native
 ip address 169.254.202.254 255.255.255.252
!
interface Port-channel22.1000
 description "my-attachment to my-router in us-central1"
 encapsulation dot1Q 1000
 ip address 169.254.180.82 255.255.255.248
 ip mtu 1440
!

Juniper

The sample configuration is for an interface on a Juniper MX-240 router. Values for the following fields are provided by the VLAN attachment and Cloud Router:

  • vlan-id — For Dedicated Interconnect, the VLAN ID allocated by the VLAN attachment (1000). For Partner Interconnect, the VLAN ID allocated by your service provider.
  • local-address — The on-premises router IP address (customerRouterIpAddress).
  • neighbor — The link local IP address of your Cloud Router's interface (cloudRouterIpAddress).
  • peer-as — The ASN of your Cloud Router.
interface ae20 {
  description "Cloud Interconnect - myinterconnect";
  flexible-vlan-tagging;
  native-vlan-id 1;
  aggregated-ether-options {
    lacp {
      active;
    }
  }
  unit 0 {
    description "Untagged VLAN for testing"
    vlan-id 1;
    family inet {
      address 169.254.202.254/30;
    }
  }
  unit 1 {
    description "myattachment to myrouter in us-central1"
    vlan-id 1000;
    family inet {
      address 169.254.180.82/29;
      mtu 1440;
    }
  }
}

routing-options {
  graceful-restart;
}

protocols bgp {
  group test-interconnect {
    type external;
    multihop {
      ttl 4;
    }
    graceful-restart;
    hold-time 60;
    local-address 169.254.180.82;
    export [ MY_ROUTES ];
    local-as 65201;
    neighbor 169.254.180.81 {
      peer-as 65200;
    }
  }
}

What's next

Check that your BGP sessions are working between your on-premises network and your Google VPC network. For more information, see Viewing Router Status and Advertised Routes in the Cloud Router documentation.
Was this page helpful? Let us know how we did:

Send feedback about...

Interconnect