network route
The network route command manages the route records that determine over which gateway the traffic will go out. When the target network is not given, the record becomes the default route. Its panel equivalent is the route screen in the network configuration.
Command Summary
Required Fields
| Order | Field | Status | What it does | What is written after it |
|---|---|---|---|---|
| 1 | v-device | Required | Selects to which virtual device the record will be written | The virtual device; Tab lists them |
| 2 | interface | Required | Selects from which interface the traffic will go out | A network interface record |
| 3 | gateway | Required | Determines the gateway to which the packets will be delivered | The IP address |
The list, show, update and delete commands also ask for v-device first: in the show and delete commands the identifier is written after this without the field name, and in the update command it is in the id <id> form.
Optional Fields
| Field | What it does | What is written after it |
|---|---|---|
--destination.ip | Determines for which target network the route will be valid | The network address. When it is left empty, the record becomes the default route |
--destination.cidr | Determines the mask length of the target network | The CIDR value, for example 24 |
--gwMonitor | Provides that the reachability of the gateway is monitored | The monitoring option; Tab lists them |
If a target is not given, it becomes the default route
When --destination.ip and --destination.cidr are left empty, the route covers all the traffic that fits no other record. Defining more than one default route on a device should be avoided.
Examples
Things to Know
- The gateway has to be on the same network as the interface. A gateway that cannot be reached from the address of the selected interface does not work.
- The target is in two parts. The network address and the mask length are written together; when only one of them is given, the route does not carry the expected scope.
- The routing table comes from the interface. The record is valid in the routing table the selected interface is bound to.
- The gateway monitoring makes the route be disabled. When
--gwMonitoris given, a route whose gateway cannot be reached is not used.
