two etherports with two gateways
Posted on 2006-06-20
I need some help here. I have a box running RH EP WS and I have two ethernet ports each connected to a different switch with different subnets.
eth1 - 192.168.1.62/24 gateway 192.168.1.1
eth0 - 192.168.2.10/24 gateway 192.168.2.254
I need requests on each port to use its own gateway when reponding, but they both seem to be using the same broadcast IP (the .1 network). I can hit out side addresses from the box--and then I bring down eth1--I cannot hit an outside address. In /etc/sysconfig/network-scripts I have a file for each address ifcfg-eth0 which looks like this:
# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.2.0 * 255.255.255.0 U 0 0 0 eth0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth1
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth1
Can someone tell me how to get each to use it's own gateway? Please let me know if you need me to do any tests to see what is happening.
Thanks in advance.