Reference Manual |
NAME
setgwn - set gateway variablesSYNOPSIS
setgwn [ifn.gwn [gw]]
...
DESCRIPTION
When invoked with no arguments, command setgwn 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 to the configuration of the specified interface. The gateway address must be valid on the network of the interface. If argument gw is specified as 0.0.0.0, the current gateway is deleted from the configuration.
When a gateway is modified, any existing default route to the old gateway is deleted. If NAT32 is to use the new gateway, the gateway selection algorithm should be set accordingly. This will add the needed route to the routing table.
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 ALSOBoth operations (specifying a gateway and adding a default route) can be performed in one operation with the setgw command.
When 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 Gateway 2 field of the interface configuration file (ifnx.ini).
cPanel, Default, netcfg, route, sethtx, setis, setns, setnsn, setrr, setsr