Configuring a gateway

To configure a machine to act as a gateway, use these instructions.

For clarity, this procedure assumes that the gateway machine connects two networks, and that the gateway machine has already been minimally configured on one of the networks.

  1. Install and configure the second network adapter, if you have not done so already. (See Installing a network adapter and Adapter management and configuration.)
  2. Choose an IP address for the second network interface, and then configure the network interface by following the instructions in Network interface management.
  3. Add a route to the second network.
  4. To use a machine as an internetwork router over TCP/IP networks, type:
    no -o ipforwarding=1
The gateway machine can now access both of the networks to which it is directly attached.
  1. If you want to use static routing to communicate with hosts or networks beyond these two networks, add any other routes you want.
  2. If you want to use dynamic routing, follow the instructions in either Configuring the routed daemon or Configuring the gated daemon. If your internetwork is to join the Internet, you should also follow the instructions in Autonomous system numbers.
    Table 1. Configuring gateway tasks
    Task SMIT fast path Command file
    Displaying the Routing Table smit lsroute netstat1
    Adding a Static Route smit mkroute route add destination gateway2
    Removing a Static Route smit rmroute route delete destination gateway2
    Flushing the Routing Table smit fshrttbl route flush
  1. The table is divided into columns for destination address, gateway address, flags, reference count (hop count), and network interface. If frames are not reaching their destination and the routing tables indicate the correct route, one or more of the following conditions might exist:
    • Network is failing.
    • Remote host or gateway is failing.
    • Remote host or gateway is down or not ready to receive frames.
    • Remote host does not have a route back to the source network.
  2. The destination value is the dotted decimal address or symbolic name of the destination host or network, and the gateway value is the dotted decimal address or symbolic name of the gateway. (A default route specifies 0 as the destination.)