0

I have to be doing something wrong.

the network is setup as below:

ST1     eth0
    192.168.254.253
    255.255.255.0
    no gate
ST1     eth1
    10.10.10.6
    255.255.255.252
    no gate
    
ST2     eth0
    172.16.200.254
    255.255.255.0
    no gate
ST2     eth1
    10.10.10.5
    255.255.255.252
    no gate
    
CLIENT
    172.16.200.100
    255.255.255.0
    172.16.200.254
    
KENTUCKY
    192.168.254.254
    255.255.255.0
    no gate

alt text

ST1:

alt text

ST2:

alt text

Can someone point out what I am doing wrong? Already tried so many configurations...

9
  • I assume the client is trying to view http://192.168.254.254/ (you don't say...)? Does it work from ST2? ST1? What error message do you get? Can you tcpdump and find out which of these servers/interfaces the packet is stopping at?
    – DerfK
    Jan 21, 2011 at 23:16
  • Yes, ping from client to server tells that 10.10.10.6 : destination host unreachable
    – M_1
    Jan 21, 2011 at 23:20
  • ST1 quick tcpdump on any interface: i.imgur.com/Mh5YJ.png
    – M_1
    Jan 21, 2011 at 23:28
  • ST2 quick tcpdump on any interface: i.imgur.com/NaWrP.png
    – M_1
    Jan 21, 2011 at 23:28
  • OK, so according to the packet dump, the packet gets to ST1 (10.10.10.6) and ST1 says it can't get to 192.168.254.254. Can you ping 192.168.254.254 from ST1?
    – DerfK
    Jan 22, 2011 at 0:13

2 Answers 2

1

Have the router been told to route via setting /proc/sys/net/ipv4/ip_forward to 1? http://www.linuxdocs.org/HOWTOs/Adv-Routing-HOWTO-12.html

If this is the problem, then setting this below will allow it to survive a reboot.

File:/etc/sysctl.conf:
net.ipv4.ip_forward = 1

http://www.ducea.com/2006/08/01/how-to-enable-ip-forwarding-in-linux/ was my source for the systcl setting

1
  • It is enabled and working in /etc/sysctl.conf
    – M_1
    Jan 21, 2011 at 23:13
1

(Wow, this took a while -- I had to draw it out twice.)

First, I don't see a route rule on Kentucky that gets packets to 172.16.200.0/24. And the no-gate implies (to me, since I've never handled this specific syntax before) that there's no default gateway on it.

Routing 101: just because the network can get a packet to you, it doesn't mean it can get one back to where it came from. So even if you can get pings to Kentucky, the answers won't get back.

ST1 has the same route specified twice:

up route add -net 172.16.200.0 netmask 255.255.255.0 gw 10.10.10.5 dev eth1

...which is harmless because it says the same thing.

Also, I think this line on ST2 is wrong:

up route add -net 192.168.254.0 netmask 255.255.255.0 gw 10.10.10.5 dev eth0

...which I think means you are telling it that the 192.168.254.0/24 network is reachable via itself, on the wrong interface. It also contradicts the right route, which is in the first cluster on ST2:

up route add -net 192.168.254.0 netmask 255.255.255.0 gw 10.10.10.6 dev eth1

So. Get rid of the up route add -net 192.168.254.0 netmask 255.255.255.0 gw 10.10.10.5 dev eth0 on ST2, add a rule on Kentucky to either default-route (or just send packets for 172.16.200/24) via ST1, and it should work.

If that doesn't work, do a netstat -rn on both ST1 and ST2 and post the output of that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.