User manual

set forwarding
Chapter 2 Command Descriptions 111
enabled={on|off}
Enables or disables a static route table entry.
on
Enables an entry. All its options must be specified and valid to enable
an entry. The enabled entry is immediately added to the device's IP
routing table.
off
Disables an entry. If the entry was previously enabled and added to
the device's IP routing table, that entry is immediately removed from
the IP routing table.
net=destination ip address
Specifies the IP address of destination network or host to which the static
route applies. This static route table entry defines how packets will be
routed by the device when they are sent to the destination network or
host.
mask=subnet mask
The subnetwork mask to be used for the static route, which is used in
conjunction with the destination IP address. A subnetwork mask of
255.255.255.255 indicates that the destination IP address is a specific
host rather than a network.
gateway=ip address
The IP address of the gateway for this static route. When the device
routes packets that are destined for the specified destination IP address
(host or network), those packets are sent to this gateway as their first
“hop.”
metric={1-16}
Specifies the metric, or the “cost” to reach the destination. This is the
“distance” in terms of number of “hops” for the routed packets to get to
the destination.
interface=interface name
Specifies the name of the local network interface through which routed
packets are sent for this static route. Examples are “eth0” and “ppp1.” For
devices that support PPP interfaces, the actual PPP interface name may
vary: ppp1, ppp2, ppp4. The valid network interface names can be
displayed using “display netdevice.”
Examples
Enable IP forwarding
#> set forwarding ipforwarding=on
Add a static route entry
This command adds a static route for packets destined to hosts on the
10.10.0.0 network. These packets are sent through the eth0 interface to a
local router 10.30.1.1. In this example, the device on which this static route
is added has an IP address of 10.30.1.188, and the router 10.30.1.1 is on
its local subnetwork.
set forwarding staticrouteindex=1 action=add enabled=on net=10.10.0.0
mask=255.255.0.0 gateway=10.30.1.1 metric=2 interface=eth0