network route add

Add a manually configured network route to the current configuration. This command should be used only on the advice of a network administrator.

NOTE   Running this command changes the interface state and causes the ctc service to restart (see Crypto Traffic Controller for QoS).

User Privileges

Users with the following privileges can perform this command:

>Admin

>Operator

Syntax

network route add <routetype> <IP_address> -device <netdevice> [-metric <metric>] [-netmask <string>] [-gateway <IP_address>] [-force] [-ipv6]

Argument(s) Shortcut Description
<routetype>  

Specifies the type of route (network or host) you want to add.

Valid values: host, network

<IP_address>  

Specifies the IP address of the network or host you want to add to the routing table.

You can specify an IPv4 or IPv6 address. If you are configuring an IPv6 address, you must also include the -ipv6 flag in the command.

When entering an IPv6 address, you can use full or shorthand syntax. For example, the following notations are equivalent:

>2001:0db3:8ba3:0000:0000:8a5e:03f0:7384

>2001:db3:8ba3::8a5e:3f0:7384

-device <netdevice> -d

Specifies the network device to which you want to add the route.

Valid values: eth0, eth1, eth2, eth3, bond0, bond1

-force -f Force the action without prompting
-gateway <IP_address> -g Specifies the gateway/router IP address if this is not a locally connected network or host. If no default route is already configured on the device, this will be used to set the default route. You can specify 0.0.0.0 as a value.
-ipv6 -i Specifies that the route you are adding uses IPv6 addressing.
-metric <metric> -m

Specifies the routing metric to use for the route.

Range: 0 to 65535

Default: 0

-netmask <string> -n

Specifies the network mask.

Include this option only if you are adding a network route. If not specified, the default netmask is used.

>If you are configuring an IPv4 route, you must specify the network mask in dotted-decimal format (for example, 255.255.255.0)

>If you are configuring an IPv6 route, you must specify the prefix length (for example, 64)

Default:

><routetype> = network

IPv4: 255.255.255.0

IPv6: 64

><routetype> = host

IPv4: 255.255.255.255

IPv6: 128

Example

Adding an IPv4 route

lunash:>network route add host 123.45.67.89 -device eth2 -metric 1000

NOTICE: The network connection for device eth2 will be restarted for new network settings to take effect.
If you are sure that you wish to restart the device connection, then type 'proceed', otherwise type 'quit'
> proceed

Proceeding...

Command Result : Success

Adding an IPv6 route

lunash:>network route add network 2018:1:2:3::0 -device eth2 -netmask 64 -gateway fe80::20c:29ff:fe9e:5f79 -ipv6


NOTICE: The network connection for device eth2 will be restarted for new network settings to take effect.
If you are sure that you wish to restart the device connection, then type 'proceed', otherwise type 'quit'

> proceed
Proceeding...
Routing table successfully updated.

Command Result : 0 (Success)