ROUTERCTL
Description
Client application used to control the routing management daemon (routerd)
Command
routerctl [-h] [-v] [-B] [-o] [-b] [-4] [-6] [-f] [--refresh arg] [--router arg] [--gateway arg] [--state arg] [--dhcp dhcp-mac-ifce-name] [--dialup dialup-mac-ifce-name] [--check-config] [--dump-config] [--reload-config arg] [--host-status] [--get-history] [--dump-state] [--health] Command Args Description -h [ --help ] Display a help message -v [ --verbose ] Enable verbose mode -B [ --background] Execute in the background (nothing is printed) -o [ --libxo ] (text|html|xml|json)[,pretty] Specify the output format (text,pretty is used by default) -b Boot mode (won't call external scripts in case the firmware is booting up) -4 [ --ipv4 ] Manage IPv4 routes or objects -6 [ --ipv6 ] Manage IPv6 routes or objects -f Update the routes in the kernel even if their state has not changed -n Changes are not applied and are printed instead --refresh Refresh routes (all routes are refreshed, for both ip versions by default) --refresh-pbr Refresh the router's pbr usage. --router router-object Name of the router object to update (which ip version to operate on must be specified with option -4 or -6) --gateway gateway Gateway of an host to request --state UP|DEGRADED|DOWN New state of the specified gateway (case insensitive) --dhcp dhcp-mac-ifce-name Name of the DHCP interface to update, can only be used for DHCPv4 interfaces ( ex: eth0, IPv4 option -4 must be specified) --dialup dialup-mac-ifce-name Name of the dialup interface to update ( ex: ng0, which ip version to operate on must be specified with option -4 or -6 ) --check-config Check routing rules validity in configuration (exclusive with other queries) --dump-config Dump current routerd configuration (exclusive with other queries) --reload-config all|verbose|objects Reload current routerd configuration (every kind of configuration is refreshed by default, exclusive with other queries) --host-status host-name Show the links(gateway/ha link) status of a host (HA peer/router object) given in parameter --get-history host-name Retrieves the measurements history of a host (HA peer/router object) given in parameter. Can be paired with --gateway to request a specific gateway of this host. --dump-state Dump the state of the differentes routes --health Get the current global status
Results
Example
Refresh IPv4 or IPv6 static and default routes: routerctl [-v] [-b] [-4] [-6] [-f] --refresh Update the state of a gateway of a given router: routerctl [-v] [-b] [-4] [-6] [-f] --router <router-object> --gateway <gateway-host> --state <UP|DEGRADED|DOWN> Update the state of a generated object of type Firewall_<dhcp-ifce>_router and all router objects using this object as a gateway: routerctl [-v] [-b] [-6] [-f] --dhcp <dhcp-mac-ifce-name> --state <UP|DEGRADED|DOWN> Update the state of a generated object of type Firewall_<dialup-ifce>_peer and all router objects using this object as a gateway: routerctl [-v] [-b] [-6] [-f] --dialup <dialup-mac-ifce-name> --state <UP|DEGRADED|DOWN>