Reference Manual

[Status] [Gateway 1] [Gateway 2]


setgs - interact with the Gateway Selection mechanism [Examples]
setgs  [ifn [algorithm]]
setgss [ifn [gwn speed]]




When invoked with no arguments, setgs prints details of the gateway selection algorithm used on each Internet interface.

Argument algorithm can be one of the following names:

    metric    Use the gateway with the best (lowest) metric
    main      Use the main gateway only
    aux        Use the auxiliary gateway only
    usage    Use the gateway with the best (lowest) usage
    speed    Use the fastest gateway

When invoked with no arguments, setgss prints details of the gateway speed for each Internet interface. A speed value for each gateway number gwn (1 or 2) for interface ifn can be set. If the same speed is set for each gateway, then the speed algorithm selects gateways at random.

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.


A second gateway can be added to an interface configuration by populating the Aux Gateway field of the interface configuration file (ifnx.ini). The Auxiliary Gateway address must be valid on the network of the interface. The needed routing table entry is added automatically.

When 2 gateways are available, and the algorithm usage or speed is selected, the chosen gateway is recorded in the port mapping entry of the outgoing TCP connection. This ensures that all packets for the same connection will be routed via the same interface and gateway. However, multiple TCP connections may well be routed via different gateways, allowing load-balancing to take place.

When only the auxiliary gateway is to be used, DNS requests are still forwarded to the current Name Server. If that Name Server is unreachable, the following command should be issued to force DNS requests to be sent to the auxiliary gateway:

setnss ifn aux

Commands setgw1 and setgw1 can be used to switch gateways and name servers on a specified interface. It is a conglomerate of the commands:

setgs  ifn aux | main
setnsx ifn aux | main
setnss ifn aux | main
netcfg, route, sethtx, setis, setns, setrr, setsr