Reference Manual |
NAME
setgw - set gateway variables and routesSYNOPSIS
setgw [ifn.gwn [gw]]
...
DESCRIPTION
When invoked with no arguments, the command prints details of configured gateways for all interfaces.NOTESA specific gateway is specified in the form ifn.gwn, where ifn is the interface number and gwn is the gateway number (0, 1 or 2) on that interface.
The command adds gateway gw and a default route for the specified interface. The gateway address must be valid on the network of the interface.
If a gateway is unknown, function get_gateway(ifn, gwn) is called to obtain it from the MSTCP MIB. Up to 5 attempts (at 1 sec intervals) are made. If argument gw was specified as 0.0.0.0, the current gateway is deleted from the configuration and all routes pertaining to it are deleted from the NAT32 routing table.
When the gateway has been added and the default route installed, NAT32 will then use it in accordance with the selected gateway selection algorithm.
The settings are not recorded in any configuration file or in the Windows Registry. To make the settings permanent, the needed command should be placed in file user.txt.
SEE ALSOWhen a second gateway is added to a configuration, a second name server for that interface should be specified using one of the setns commands. This is because a second gateway is often used as a backup Internet gateway when the first Internet gateway has failed. In such cases, the first configured name server will no longer be reachable and name resolution should be performed via the second name server.
A second gateway can also be added to an interface configuration by populating the Alt Gateway field of the interface configuration file (ifnx.ini).
cPanel, Default, netcfg, route, setgwn, sethtx, setis, setns, setrr, setsr