Setting up Static Routing on the API Gateway.
search cancel

Setting up Static Routing on the API Gateway.

book

Article ID: 42837

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

How do I set up static routing on the API Gateway?

Environment

Release: 10
Component: Gateway

Resolution

Modification of Static Routes will require that the administrator connects to the root shell to add additional configuration. The steps below will outline what is required to enable this.

  1. Connect to the Gateway using either Console, ILOM, or SSH as the ssgconfig user account
  2. From the ssgconfig menu, select option "3) Use a privileged shell (root)"
  3. At the root prompt add a new file /etc/sysconfig/static-routes
    Syntax
    any net <NETWORK> netmask <NETMASK> gw <GATEWAY> <DEV>
    Example
    any net 172.16.0.0 netmask 255.240.0.0 gw 192.168.0.1 eth0
    any net 10.0.0.0 netmask 255.0.0.0 gw 192.168.0.1 eth0

Alternative method

Add a new file /etc/sysconfig/network-scripts/route-ens160 with ens160 representing the interface value. This is the default interface with one NIC present in the virtual Gateway. You can get the interface name by running the following command:

[root@ssg10 network-scripts]# service network status
Configured devices:
lo ens160
Currently active devices:
lo ssg_eth0

In this example, the interface name is ens160. This name should also match the configuration file (ifcfg-ens160) in network-scripts folder.

For every interface, a file needs to be created that associates static routes with the interface. There are 2 syntaxes that can be used.

  1. The legacy mechanism defines the GATEWAY, NETMASK, and ADDRESS for each route explicitly.
    Syntax
    GATEWAY#=<gateway>
    NETMASK#=<netmask>
    ADDRESS#=<network>
    Example 
    GATEWAY0=192.168.108.2
    NETMASK0=255.255.255.0
    ADDRESS0=192.168.34.0
    GATEWAY1=192.168.108.2
    NETMASK1=255.255.0.0
    ADDRESS1=10.1.0.0
  2. The modern mechanism uses CIDR notation to denote the subnet. (Recommended)
    Syntax
    <network/cidr> via <gateway>
    Example
    10.0.0.0/8 via 192.168.108.2
    192.168.32.0/24 via 192.168.108.2

Once all the static routes are in place, reboot the Gateway to ensure that all routes are properly established.