Ask the Community
Groups
Configure advanced routing, NIC gateways - Connect IT Community | Kaseya
<main> <article class="userContent"> <h2 data-id="summary"><strong>SUMMARY</strong></h2> <p>Allow routing outside of the default gateway to alternate subnets or use additional NICs to segment network traffic.</p> <h2 data-id="issue"><strong>ISSUE</strong></h2> <p></p> <p id="_mcePaste">Allow routing outside of the default gateway to alternate subnets.<br>Use additional NICs to segment network traffic.</p> <div> </div> <h2 data-id="resolution"><strong>RESOLUTION</strong></h2> <p></p> <p>Two gateways cannot be used, so an alternate routing script using Route-eth* must be used.<br><br>To create a special routing script:</p> <ol><li>Connect to the appliance via SSH</li> <li>Go to the network-scripts directory: <pre class="code codeBlock" spellcheck="false" tabindex="0"> cd /etc/sysconfig/network-scripts</pre> </li> <li>Create a file called "route-ethX" where X is the NIC being used for routing. For example, "route-eth1".</li> <li>Within the file, define the networks to be used. Each network must be defined or routing will fail. An example of route-eth1: <pre class="code codeBlock" spellcheck="false" tabindex="0"> 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</pre> </li> </ol><p>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.<br><br>An alternate method would be to add a static route, then put the entry into /etc/rc.local to run at startup.</p> <h2 data-id="cause"><strong>CAUSE</strong></h2> <p></p> <p>Having more than one gateway is prohibited.</p> <h2 data-id="notes"><strong>NOTES</strong></h2> <p></p> <p>While additional NICs have the benefit of segmenting network traffic they are not required for advanced routing.</p> </article> </main>