Skip to main content

Managing Virtual Routers

Managing Router Interfaces

Prerequisites

info

You have a virtual router created, as described in Create a Virtual Router

Add an External Router Interface

  1. If you already have an external gateway, delete the existing one first.

  2. On the Routers screen, click the router name to open the list of its interfaces.

  3. Click "Add New" on the toolbar if there are no interfaces to show.

  4. In the Add Router Interfaces window, do the following:

    1. Select External gateway.
    2. From the Network selection, select a physical network to connect to the router. The new interface will pick an unused IP address from the selected physical network. You can also provide a specific IP address from the selected physical network to assign to the interface in the IP address field.
    3. Select or deselect the SNAT check box to enable or disable SNAT on the external gateway of the router. With SNAT enabled, the router replaces VM private IP addresses with the public IP address of its external gateway.
  5. Click "Add Router Interfaces".

Add an Internal Router Interface

  1. On the Routers screen, click the router name to open the list of its interfaces.

  2. Click "Add New" button.

  3. In the "Add interfaces" window, select a network to connect to the router from the Network menu. The new interface will attempt to use the gateway IP address of the selected virtual network by default. If it is in use, specify an unused IP address from the selected virtual network to assign to the interface in the IP address field.

  4. Click "Add Router Interfaces".

Delete a Router Interface

  1. Select the interface you want to delete.
  2. And then click Delete.
note
  • If a static route is added from any block, the interfaces of that router used in the static route cannot be deleted. First, the static route needs to be deleted.

Managing Static Routers

You can also configure static routes of a router by manually adding entries into its routing table. This can be useful, for example, if you do not need a mutual connection between two virtual networks and want only one virtual network to be accessible from the other.

Consider the following example:

  • The virtual machine VM1 is connected to the virtual network private1 (192.168.128.0/24) via the network interface with IP address 192.168.128.10.
  • The virtual machine VM2 is connected to the virtual network private2 (192.168.30.0/24) via the network interface with IP address 192.168.30.10.
  • The router router1 connects the network private1 to the physical network via the external gateway with the IP address 10.94.129.73.
  • The router router2 connects the network private2 to the physical network via the external gateway with the IP address 10.94.129.74.

To be able to access VM2 from VM1, you need to add a static route for router1, specifying the CIDR of private2, that is 192.168.30.0/24, as the destination subnet and the external gateway IP address of router2, that is 10.94.129.74, as the next hop IP address. In this case, when an IP packet for 192.168.30.10 reaches router1, it will be forwarded to router2 and then to VM2.

Prerequisites

info

You have a virtual router created, as described in Create a Virtual Router

Create a Static Route for a Router

  1. On the Routers screen, click the router name. Open the Static routes tab, and then click "Add New" button. If there are no routes to show, click Add static route.

  2. In the Add Static Route window, specify the destination subnet range and mask in CIDR notation and the next hop’s IP address. The next hop’s IP address must belong to one of the networks that the router is connected to.

  3. Click "Add Static Route".

Edit a Static Route

  1. Click the ellipsis icon next to the required static route, and then click "Edit" button.
  2. In the Edit static route window, change the desired parameters, and then click "Save".

Delete a Static Route

Click the ellipsis icon next to the static route you want to delete, and then click "Delete".