### set route

Use the set route command to

- Manually configure IP routes
- Display the contents of the route table

Normal users can display the contents of the route table. Root privileges are required to configure IP routes.

The route table holds up to 50 entries.

See the set forwarding command for information on configuring a device/terminal server to use dynamic IP routes maintained by RIP.

#### Command Syntax

##### Configuration Syntax

Enter the set route command as shown below to manually configure IP routes:

`set route {gateway=ip_addr|wanname=name} mask=mask` `metric=hops net=net_addr range=range` `[rmroute={on|off}]`

##### Display Syntax

Enter the set route command as shown below to display the route table:

`set route`

#### Command Fields

Command Field | Description
gateway | Specifies the IP address of the router that is the next hop to the destination network defined on the net field. Use this field if this router is on the LAN.
wanname | Specifies the name, defined on a set user command, of a WAN connection that the device/terminal server can use to reach the next hop to the destination defined on the net field.
mask | Specifies the subnet mask used by the destination network.
metric | Specifies the number of routers through which a datagram may pass before reaching the destination network defined in the net field. This value may be revised by forwarding routers, depending on the requirements of the routers and network conditions.
net | Specifies the IP network address of the destination network.
range | Specifies the entry or range of entries in the route table that will be removed when the rmroute field is executed.
rmroute=on | Means that the route table entry or entries defined on the range field will be removed. The default is off.

#### Command Examples

##### Displaying the Route Table

In this example, the set route command displays the entire route table.

`set route`

##### Displaying a Range of Route Table Entries

In this example, the set route command displays a range of entries in the route table.

`set route range=3-5`

##### Removing an Entry in the Route Table

In this example, the set route command removes an entry from the route table.

`set route rmroute=on range=2`

##### Configuring a Route over a WAN Connection

In this example, the set route command configures a route that uses a WAN connection through a serial port.

`set route net=199.150.144.8 mask=255.255.255.0 metric=3 wanname=user999`