Skip to content
Smarter by Design.Simpler for Business

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 ​

TR7 WEB-CLI · network route
# Tab after the command
admin@TR7LBWAF01> network route
add delete list show update
 
admin@TR7LBWAF01> network route list v-device <device> # list them all
admin@TR7LBWAF01> network route show v-device <device> <id> # show one
admin@TR7LBWAF01> network route add v-device <device> interface <interface> gateway <address>
admin@TR7LBWAF01> network route update v-device <device> id <id> … # change
admin@TR7LBWAF01> network route delete v-device <device> <id> # delete
admin@TR7LBWAF01>  

Required Fields ​

OrderFieldStatusWhat it doesWhat is written after it
1v-deviceRequiredSelects to which virtual device the record will be writtenThe virtual device; Tab lists them
2interfaceRequiredSelects from which interface the traffic will go outA network interface record
3gatewayRequiredDetermines the gateway to which the packets will be deliveredThe 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 ​

FieldWhat it doesWhat is written after it
--destination.ipDetermines for which target network the route will be validThe network address. When it is left empty, the record becomes the default route
--destination.cidrDetermines the mask length of the target networkThe CIDR value, for example 24
--gwMonitorProvides that the reachability of the gateway is monitoredThe 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 ​

TR7 WEB-CLI · the default route and a route with a target
# the default route: a target is not given
admin@TR7LBWAF01> network route add v-device Host interface <interface> gateway 10.0.1.1
 
# a route that goes to a certain network
admin@TR7LBWAF01> network route add v-device Host interface <interface> gateway 10.0.1.1 \
--destination.ip 192.168.10.0 --destination.cidr 24 --gwMonitor <monitor>
 
admin@TR7LBWAF01> network route update v-device Host id <id> --gateway 10.0.1.254
admin@TR7LBWAF01> network route delete v-device Host <id>
admin@TR7LBWAF01>  

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 --gwMonitor is given, a route whose gateway cannot be reached is not used.