Routing help requested

rsq

Limp Gawd
Joined
Jan 11, 2010
Messages
246
Hi *,

I need routing help. All my machines run ubuntu linux.

I have 2 local networks:
N1: 10.0.0.0/16 is the main network
N2: 10.2.0.0/16 is my infiniband ipoib network

There is an edge router that performs NAT/routing functions to the internet.
R1: 10.0.0.1

There are 3 hosts:
H1: 10.0.0.2(N1) and 10.2.0.2(N2)
H2: 10.0.0.3(N1) and 10.2.0.3(N2)
H3: 10.0.0.117(N1) <-- this is my laptop

All 3 hosts have R1 configured as default gateway.

I want to be able to ping addresses on N2 from H3. This seems to be much harder to do then I thought.

I tried this:
Setup ip forwarding on H1 with: sudo sysctl -w net.ipv4.ip_forward=1. and adding a route on H3 with: sudo ip route add 10.2.0.0/16 via 10.0.0.2 dev eth0 .

As far as I understand routing, that should be enough, so clearly I am missing something. Can anyone help me out? :confused:
 
What is the return path? (ie: How does N2 get back to N1)

What are you pinging? What does a traceroute show?
 
Iptables should be active by default. This is the config:
Code:
rsq@bitbucket2:~$ sudo iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

As for the return path, I suspect the receiving server does receive the request, from 10.0.0.117 but sends out the reply on the wrong network interface because 10.0.0.0 network is directly reachable via eth0. Is this possible?
 
Traceroute from H3 to your target address and show us the results.

Then from the target host, traceroute to H3 using the correct source interface/IP and show the results: traceroute -i 10.2.0.2 10.0.0.117

Do you have a route back to 10.0.0.0/16 from 10.2.0.0/16? You put a static route in from 10.0.0.0 side but what about 10.2.0.0?

Show us the routing tables on both H1 and H2: netstat -rn --inet

If H1 is the router then H2 will need either a default route or a static route to H1 to get from 10.2.0.0 to 10.0.0.0.
 
Back
Top