How to Configure Static Routes to Traverse Traffic on CloudLink

February 1st, 2012 by - 6,211 views

CloudLink is infrastructure so it can enable many use cases. However, you will be unable to use it until you configure your servers to use static routes. The rest of this post will describe how to create a static route from one server in US-West-1 to servers in US-East-1. This assumes that you have not already assigned a private IP to the West server. This guide assumes that you have a basic knowledge of Linux and/or Windows and with the basic principles of networking.

Find your Private IPs

First, you will need to find your private IPs. You can find your private IP block by going to the GoGrid portal, selecting the List tab and then Network. Under Type: Private you will see your private IP blocks. In this example, this is a listing of private IP blocks for US-West-1. US-East-1 has a DIFFERENT private IP block. The gateway is +1 from the first number in your private IP block ( in the example above.

If you want to assign a private IP to a server in US-West-1, you would select it from the list in the screenshot – just pick one that you have not already assigned somewhere else. Take note of the subnet as you will need it later.

Assign a Private Static IP on Ubuntu / Debian


To assign a private IP, you can update the interface directly. Enter the following at the prompt or use your favorite Linux editor.

nano /etc/network/interfaces

Within the file enter the following (the IP is just an example, use one of your own. Don’t enter the text in the brackets):

auto eth1
iface eth1 inet static
address [a private IP address in the West ]

Save the file.

This step assigns a private IP from your West block to a single Ubuntu / Debian server. You will need to activate the new IP so restart your network interface.

ifdown eth1

and then enter:

ifup eth1

Assign a Private IP to a Windows Server


For Windows users, you will need to do the following.

  1. Click on Start > Control Panel > Network Connections.
  2. Select Local Area Connection 2.
  3. Click Properties.
  4. Double-click TCP/IP in the scroll box.
  5. Enable the radio button titled Use the Following IP Address.
  6. Assign a PrivateIP address to this machine
    1.     You can find your private IP block by going to the GoGrid portal, selecting the List tab and then Network.
    2.     Under Type: Private you will see your private IP blocks. If this Windows Server is in the West, make sure to use IPs that have US-West-1 in the Datacenter column.
    3.     Select an available private IP address and note the Subnet Mask
  7. Enter the subnet mask as found on your list of private IP blocks.
  8. Leave the gateway blank.
  9. You can enter GoGrid’s name servers under DNS if you are so inclined.
  10. Continue to click OK to exit each subsequent window.
  11. To confirm changes were successful, open a command prompt window and type
    ipconfig /all
  12. Those steps will assign a private IP address to a particular machine. Make sure to enable “Local Area Connection 2”.

Create a static route on your Linux server

Once you have assigned a private IP to your server, you will then need to create a static route to your East private IP block. The IPs below are examples only, use your own IPs when you enter the command! This command will work on Ubuntu, Debian, Red Hat, and CentOS.

At the command line type:

route add -net netmask gw

This adds a route from your US-West-1 server to your US-East-1 private IP block (the netmask… of the code) via the US-West-1 private gateway (

Persisting the static route on Linux

The command entered in the previous step will only keep the route while your session is active. In order to have the route stay through reboots, you will need to update configuration files on your server. Please see the wiki for instructions on how to set persistence and for configuring CentOS or Red Hat Enterprise Linux (RHEL).

Create a static route on your Windows server



  1. Open a command prompt by clicking on Start > Run
  2. Type “cmd” and click OK.
  3. Enter the command
    route add -p [East private IP block] mask [West Gateway IP]
    1. where [West Gateway IP] is +1from your first IP address in your Private Network block available in the GoGrid user interface. If your Windows Server is in the WEST then you will want to use the Gateway IP for the US-West-1 private network. So in the screenshot above, is the gateway NOT You will want to connect to the East private IP block, so the number after p is the first available number in your East Private IP block.
    2. For example, you would enter something like:
      route add -p mask

      The p flag ensures that the route is persistent across reboots.

Testing the connection

If you want to test ping, you will need to assign a private IP to the server that you want to ping and also define a static route back to the IP blocks in the other datacenter. In this example, since you have setup a Windows machine with a route from West to East, you will need to setup a static route on an East server that you want to ping back to the West.

For example, you can execute the route command if you don’t want to persist the route for Windows:

route add mask

And for Linux machines:

route add -net netmask gw

This command sets a static route to your West private IP block through your East gateway.


If you can successfully ping that configured US-East-1 private IP from your Windows server in US-West-1 then this has been configured correctly.

You’re done!

That’s all you need to do to start using CloudLink. You will need to set static routes for any server that is going to use this product. CloudLink is just the first step is GoGrid’s plan to continually innovate and expand our offerings to our customers. As GoGrid expands globally, so will all our products including CloudLink. As you grow your company internationally, GoGrid will be ready to grow with you!

The following two tabs change content below.

Rupert Tagnipes

Director, Product Management at GoGrid
Rupert Tagnipes is Director of Product Management at GoGrid who is responsible for managing and expanding the company’s multiple product lines. His focus is on leveraging his technical background and industry knowledge to drive product innovation and increase adoption of the cloud. He has extensive software product experience at technology companies in Silicon Valley solving data analytics and cloud infrastructure problems for customers across multiple industries.

Latest posts by Rupert Tagnipes (see all)

Leave a reply