# cgroute - Setting up CG board IPv4 routing tables

Configures the IPv4
routing table for a CG board.

#### Usage

cgroute command destination MASK netmask gateway -i interface -b boardnumber -p persistence

Valid commands include:

Command | Description
--- | ---
print | Prints the routing table.
add | Adds a route.
delete | Deletes a route.
deleteall | Deletes all the persistent entries in the routing table.

And valid arguments include:

Argument | Description
--- | ---
destination | IP address for this route entry.
netmask | Subnet mask value for this route entry. The default value is 255.255.255.255. This argument is always preceded with the string MASK.
gateway | Gateway address for this route.
-i interface | CG board Ethernet adapter (1 or 2) associated with the specified IP address.
-b boardnumber | Number of the CG board. The default value is 0.
-p persistence | Specifies whether or not a specified IP route is saved in non-volatile RAM and is automatically reloaded when the board is rebooted. When you enter -p1, the specified routing information is saved in non-volatile RAM. The routing information is automatically retrieved and reloaded into the board's IP routing table when the CG board is rebooted as in the following example: cgroute 1.1.1.1 mask 255.255.255.0 -p 1 A value of 0 (the default) specifies that the address is not persistent across reboots. The number of persistent routing table entries you can specify is limited to: Two Ethernet interface addresses (per Ethernet adapter on the board) Five route entries Two default gateway addresses

#### Description

Use cgroute to add or delete routes from the routing table and print current routing table contents.

Caution: | cgroute adds and deletes routing table entries from the CG board routing table but does not update the host operating system's routing table.

When booting a CG board, use cgroute to set the board's IP address. Use the add command to enter the interface address for each Ethernet adapter (that is, the board's IP address) in the routing table.

The following example routes all packets directed to the IP address subnet 198.62.139.x to the gateway with IP address 198.62.139.1:

cgroute add 198.62.139.12 mask 255.255.255.0 198.62.139.1