Question : Static route behavior in RHEL 5

I have a server with 4 ethernet ports on the back,  running RHEL 5. I have discovered through much trial and error, that the only way to get the ports to function is to delete the routes in the routing table and add them in again. I am also not using a default gateway. I have set the interfaces in the network gui to correspond as follows:

eth0 - 192.168.1.1
eth1 - 192.168.1.2
eth2 - 192.168.1.3
eth3 - 192.168.1.4

In the routing table on bootup, I see:

192.168.1.0   *   255.255.255.0   eth0
192.168.1.0   *   255.255.255.0   eth1
192.168.1.0   *   255.255.255.0   eth2
192.168.1.0   *   255.255.255.0   eth3

I have to delete these with "route del -net 192.168.1.0 netmask 255.255.255.0 ethX" where X is the interface number. I then have to add it again with "route add -net 192.168.1.0 netmask 255.255.255.0 ethX" When I do this, the interface will work (i.e. I can ping and ssh to and from the server).

However, here is the catch, I am unable to get all interfaces working at the same time. If I do the route del/add for consecutive interfaces, only the last interface that was deleted and added will function. For example, I delete and add a static route for eth0 and then eth1. As soon as I add the static route for eth1, eth0 no longer functions. I have tried adding persistent static routing by adding the files both manually and through the GUI under /etc/sysconfig/network-scripts/route-ethX, with no success. Has anyone had any experience with these issues on RHEL 5???

Answer : Static route behavior in RHEL 5

Well on startup if you have the same ip address on the 5 network cards it wont work of course

192.168.1.0   *   255.255.255.0   eth0
192.168.1.0   *   255.255.255.0   eth1
192.168.1.0   *   255.255.255.0   eth2
192.168.1.0   *   255.255.255.0   eth3


As for your routes..if all interfaces are using the same  network...only the first one that matches in the routing table will work so that is not strange either...can you print out your routing table after you edit it manually

using

#route -n
Random Solutions  
 
programming4us programming4us