You can configure the default gateway for static routes and specify dynamic routing details for an Edge Services Gateway or Distributed Logical Router.
- Log in to the vSphere Web Client.
- Click .
- Double-click an NSX Edge.
- Click Routing and then click Global Configuration.
- To enable equal-cost multi-path routing (ECMP), next to ECMP, click Start.
ECMP is a routing strategy that allows next-hop packet forwarding to a single destination over multiple best paths. These best paths can be added as static routes or as a result of metric calculations by dynamic routing protocols like OSPF or BGP. Multiple paths for static routes can be added by providing multiple next hops separated by commas in the Static Routes dialog box. For more information, see Add a Static Route.
The Edge Services Gateway uses the Linux network stack implementation, a round-robin algorithm with a randomness component. After a next hop is selected for a particular source and destination IP address pair, the route cache stores the selected next hop. All packets for that flow go to the selected next hop. The default IPv4 route cache timeout is 300 seconds (gc_timeout). If an entry is inactive for this time, it is eligible to be removed from the route cache. The actual removal happens when garbage collection timer activates (gc_interval = 60 seconds).
The Distributed Logical Router uses an XOR algorithm to determine the next hop from a list of possible ECMP next hops. This algorithm uses the source and destination IP address on the outgoing packet as sources of entropy.
Stateful services such as Load Balancing, VPN, NAT, and ESG firewall do not work with ECMP. However, from NSX 6.1.3 onwards, ECMP and Distributed Firewall can work together.
- (Only for UDLR): To change the Locale ID on a universal distributed logical router, next to Routing Configuration, click Edit . Enter a locale ID and click Save or OK.
By default, the locale ID is set to the NSX Manager UUID. However, you can override the locale ID by enabling local egress at the time of creating the universal distributed logical router. Locale ID is used to selectively configure routes in a cross-vCenter NSX or multi-site environment. See Cross-vCenter NSX Topologies for more information.
The locale ID must be in UUID format. For example, XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX, where each X is replaced with a base 16 digit (0-F).
- To specify the default gateway, click Edit next to Default Gateway.
- Select an interface from which the next hop towards the destination network can be reached.
- Type the Gateway IP.
- (Optional) Type the locale ID. Locale ID is available only on universal logical routers.
- (Optional) Edit the MTU.
- If prompted, type the Admin Distance.
Choose a value between 1 and 255. The admin distance is used to choose which route to use when there are multiple routes for a given network. The lower the admin distance, the higher the preference for the route.
Table 1. Default Admin Distances Route Source Default admin distance Connected 0 Static 1 External BGP 20 OSPF Intra-Area 30 OSPF Inter-Area 110 Internal BGP 200
- (Optional) Type a Description for the default gateway.
- Click Save.
- To configure dynamic routing, click Edit next to Dynamic Routing Configuration.
Note: If you have IPSec VPN configured in your environment, you should not use dynamic routing.
- Router ID displays the first uplink IP address of the NSX Edge that pushes routes to the kernel for dynamic routing.
- Do not enable any protocols here.
- Select Enable Logging to save logging information and select the log level.
- Click Publish Changes.
What to do next
To delete routing configuration, click Reset. This deletes all routing configurations (default, static, OSPF, and BGP configurations, as well as route redistribution).