I have a linux server with three interfaces - one for net, two internal, below are shown the internal ones:
eth1
inet addr:192.168.10.253
Bcast:192.168.255.255
Mask:255.255.0.0eth2
inet addr:10.10.10.253
Bcast:10.10.10.255
Mask:255.255.255.0
Have one internal work machine with gate 192.168.10.253 and ip from that subnet and other with gate 10.10.10.253 and ip from its subnet. I need to be able to have access between those machines.
On the linux box I have the following routing table:
default via * dev eth0
10.10.10.0/24 dev eth2 proto kernel scope link src 10.10.10.253
* dev eth0 proto kernel scope link src *
192.168.10.0/16 dev eth1 proto kernel scope link src 192.168.10.253
I added a static route:
route add -net 10.10.10.0 netmask 255.255.255.0 gw 192.168.10.253
and the result
10.10.10.0/24 via 192.168.10.253 dev eth1 scope link
but when I try to ping from eth1 an up and running interface 10.10.10.2 it always gives destination host unreachable. What am I missing as configuration?
The basic setup is shown here:
When I ping from eth1
ping 10.10.10.2 -I eth1
PING 10.10.10.2 (10.10.10.2) from 192.168.10.253 eth1: 56(84) bytes of data.
From 192.168.10.253 icmp_seq=1 Destination Host Unreachable
and when I ping from eth2:
ping 10.10.10.2 -I eth2
PING 10.10.10.2 (10.10.10.2) from 10.10.10.253 eth2: 56(84) bytes of data.
64 bytes from 10.10.10.2: icmp_seq=1 ttl=64 time=0.547 ms