I've got two subnets and a RedHat 5.3 with 2 NIC, each with an IP on a single subnet:
eth1 172.16.0.4, 255.255.255.0
eth0 194.20.23.183, 255.255.255.0
On each subnet I've got a Gateway / Firewall and I'd like to forward each NIC on its own GW. This is the current routing table:
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.0.0 * 255.255.255.0 U 0 0 0 eth1
194.20.23.0 * 255.255.255.0 U 0 0 0 eth0
default 172.16.0.1 0.0.0.0 UG 0 0 0 eth1
If I first try to delete the already existing rule on 194.20.23.0 net and next use the following command
route add -net 194.20.23.0 netmask 255.255.255.0 gw 194.20.23.181 dev eth0
It returns
SIOCADDRT: Network is unreachable
Could anyone explain me in simple words the reason for that message and possibly how I can accomplish the goal.
Thanks in advance Regards
Alessandro Ilardo