How do I set up static routing on the API Gateway?
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.
any net <NETWORK> netmask <NETMASK> gw <GATEWAY> <DEV>
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
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:
[[email protected] network-scripts]# service network status
Currently active devices:
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.
<network/cidr> via <gateway>
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.