NAME

vicfg-route - get and set routing information for the VMkernel


SYNOPSIS

 vicfg-route [<connection_options>]
   [--add <route> |
    --del <route> |
    --help |
    --list |
    --family [v4 | v6] |
    --vihost <esx_host>]
    [<gateway>]


DESCRIPTION

The vicfg-route command lists or sets the default IP gateway. Changing the gateway might be required if you move your ESX/ESXi host to a new physical location. The vicfg-route command supports a subset of the Linux route command's options.

If you run vicfg-route with no options, the command displays the default gateway. You can use the --family option to print the default IPv4 or the default IPv6 gateway. By default, the command displays the default IPv4 gateway.


OPTIONS

connection_options

Specifies the target server and authentication information if required. Run vicfg-route --help for a list of all connection options.

<gateway>

The IP address or the host name of the machine that should be set as the gateway for the VMkernel IP stack.

--add | -a <route>

Adds route to the VMkernel (valid for vSphere 4.0 and later).

To add a route entry and make it the default, run

  vicfg-route --add <route> default
--del | -d <route>

Deletes a route entry from the VMkernel (valid for vSphere 4.0 and later).

--help

Prints a help message for each command-specific and each connection option. Calling the script with no arguments or with --help has the same effect.

--list | -l

Lists configured routes for the VMkernel.

--family | -f v4 | v6

Address family, either v4 for IPv4 or v6 for IPv6. Defaults to v4.

--vihost | -h <esx_host>

When you run a vCLI command with the --server option pointing to a vCenter Server system, use --vihost to specify the ESX/ESXi host to run the command against.


EXAMPLES

The following examples assume you are specifying connection options, either explicitly or, for example, by specifying the server, user name, and password. Run vicfg-route --help for a list of common options including connection options.

List the VMkernel IP stack's default gateway entry:

 vicfg-route <connection_options>

Set the VMkernel IP stack's default gateway entry, that is, change the default gateway to a different gateway:

 vicfg-route <connection_options> <new_gateway>

Set the VMkernel default gateway to 192.NNN.0.1

 vicfg-route <connection_options> 192.NNN.0.1
or
 vicfg-route <connection_options> -a default 192.NNN.0.1

Delete a 192.NNN.100.0 route from the VMkernel:

 vicfg-route <connection_options> -d 192.NNN.100.0/24 192.168.0.1

Add a route to 2001:10:20:NNN::/64 network through 2001:10:20:NNN::1

 vicfg-route <connection_options> -f V6 -a 2001:10:20:NNN::/64 2001:10:20:NNN::1

Set the VMkernel default gateway to 2001:10:20:NNN::1

 vicfg-route <connection_options> -f V6 -a default 2001:10:20:NNN::1

Delete the 2001:10:20:NNN:: route from the VMkernel:

 vicfg-route <connection_options> -f V6 -d 2001:10:20:NNN::/64 2001:10:20:NNN::1