I have three boxes as following :-
1. Box A (eth0: 192.168.1.103)
2. Box B (eth0:192.168.1.100; eth1:192.168.1.101; eth2:192.168.1.102). Eth1 connects to A and Eth2 to C. And Eth0 to the Internet. So box B connects A to C and is connected to the Internet.
3. Box C (eth0: 192.168.1.104)
The set up is like this :-
Code:
[Box A] <=======> [Box B] <=========> [Box C]
I am trying to have A communicate with C. So this is what I did :-
1. On A and C, I have the corresponding interface of B as the default gateway.
2. On B, I did a
Code:
%route add -host 192.168.1.103 eth1
%route add -host 192.168.1.104 eth2
so that it sends data to A on its eth1 and data to B onto eth2.
Here is the routing table on C:-
Code:
[root@localhost ~]# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.103 0.0.0.0 255.255.255.255 UH 0 0 0 eth1
192.168.1.104 0.0.0.0 255.255.255.255 UH 0 0 0 eth2
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
[root@localhost ~]#
Now I can ping from A->B, B->A, C->B and B->C. But NOT from A to C.
I am not sure why because I have made sure that B knows how to route data by setting the static routes. But it's not routing it for some reason. When I run ethereal on B's eth1, I see that it's getting ARP requests from A for C (I tried pinging C from A). But it simply not forwarding it.
Any help will be greatly appreciated.
Thanks,
K