Link to home
Start Free TrialLog in
Avatar of TIMFOX123
TIMFOX123Flag for United States of America

asked on

linux dupicate routes and linux routing issues

I am in a network that linux hosts with multiple interfaces ( prod, backup, management ).

We have to manually route off the linux box to multiple gateways.  

How do I find duplicate routes, bad routes ect ?

redhat 5+
ASKER CERTIFIED SOLUTION
Avatar of Hassan Besher
Hassan Besher
Flag of Egypt image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Kent W
A simple "route" statement will print the routing table.

First, set your default gateway.  Then, any other routes, add manually.   Any that you manually define will take those routes for that network, and any others take the default.  You can only define one default, but as many other routes as you need.

For manual routes, use this format, change for the actual IPs / NM, GWs involved -

/sbin/route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.168.72

IMPORTANT - depending on your linux flavor, you will need to add to your route script (usually in 'etc/sysconfig/yadda", OR just place the route statements in your /etc/rc.local

The rc.local executes on startup, so they will remain "persistent".  If you want to do it very correctly, lookup the file your routing statements are housed in in your flavor / release of *nix and place them there.