Networking > Layer 3 > Logical Gateway > Routing > Routes

set route prefix <prefix> [gateway <gateway-ip>] [interface <interface-name>] [metric <ip-route-metric>]

Add IPv4 or IPv6 network route. You can also just set a gateway by specifying a prefix value of 0.0.0.0/0 for Ipv4 and ::/0 for Ipv6. Default value for the IPv6 route metric is 1024.

Parameters:

Option Description
<prefix-ipv46> CIDR notation argument for IPv4/IPv6 address
<ip-route-metric> IP route metric argument
Allowed pattern: ^[0-9]+$
<gateway-ipv46> Gateway IPv4/IPv6 address argument
<interface-name> Configurable network interface argument


Example:

nsx> set route prefix 10.79.224.0/20 gateway 10.78.239.254 nsx> or nsx> set route prefix fd01:0:106:10::/64 gateway fd01:0:106:10::253 nsx> or nsx> set route prefix fd01:0:106:8::/64 gateway fe80::106:8:1 metric 256 nsx>

Mode:

Basic

Availability: