SUMMARY
Allow routing outside of the default gateway to alternate subnets or use additional NICs to segment network traffic.
ISSUE
Allow routing outside of the default gateway to alternate subnets.
Use additional NICs to segment network traffic.
RESOLUTION
Two gateways cannot be used, so an alternate routing script using Route-eth* must be used.
To create a special routing script:
- Connect to the appliance via SSH
- Go to the network-scripts directory:
cd /etc/sysconfig/network-scripts
- Create a file called "route-ethX" where X is the NIC being used for routing. For example, "route-eth1".
- Within the file, define the networks to be used. Each network must be defined or routing will fail. An example of route-eth1:
GATEWAY0=192.168.21.1 NETMASK0=255.255.255.0 ADDRESS0=192.168.21.40 GATEWAY1=192.168.21.1 NETMASK1=255.255.255.0 ADDRESS1=192.168.1.0 GATEWAY2=192.168.21.1 NETMASK2=255.255.255.0 ADDRESS2=192.168.2.0
Note: The first entry must always contain an IP address on the same subnet as the gateway. The gateway values are the IP address of the device/router we need to route through.
An alternate method would be to add a static route, then put the entry into /etc/rc.local to run at startup.
CAUSE
Having more than one gateway is prohibited.
NOTES
While additional NICs have the benefit of segmenting network traffic they are not required for advanced routing.