You can add a static route for a destination subnet or host in VMware Cloud Director.

If ECMP is enabled in the default routing configuration, you can specify multiple next hops in the static routes. See Specify Default Routing Configurations for the NSX Data Center for vSphere Edge Gateway in the VMware Cloud Director Tenant Portal for steps on enabling ECMP.

Prerequisites

As described in the NSX documentation, the next hop IP address of the static route must exist in a subnet associated with one of the NSX Data Center for vSphere edge gateway interfaces. Otherwise, configuration of that static route fails.

Procedure

  1. Open Edge Gateway Services.
    1. In the top navigation bar, click Networking and click Edge Gateways.
    2. Select the edge gateway that you want to edit and click Services.
  2. Navigate to Routing > Static Routes.
  3. Click the Create (add button) button.
  4. Configure the following options for the static route:
    Option Description
    Network Type the network in CIDR notation.
    Next Hop Type the IP address of the next hop.

    The next hop IP address must exist in a subnet associated with one of the edge gateway interfaces.

    If ECMP is enabled, you can type multiple next hops.

    MTU Edit the maximum transmission value for data packets.

    The MTU value cannot be higher than the MTU value set on the selected edge gateway interface. You can see the MTU set on the edge gateway interface by default on the Routing Configuration screen.

    Interface Optionally, select the edge gateway interface on which you want to add a static route. By default, the interface is selected that matches the next hop address.
    Description Optionally, type a description for the static route.
  5. Click Save changes.

What to do next

Configure a NAT rule for the static route. See Add an SNAT or a DNAT Rule To an NSX Data Center for vSphere Edge Gateway in the VMware Cloud Director Tenant Portal.

Add a firewall rule to allow traffic to traverse the static route. See Add an NSX Data Center for vSphere Edge Gateway Firewall Rule in the VMware Cloud Director Tenant Portal.