1

I'm feeling a bit stupid because this seemingly simple task is completely stumping me.

I have 3 PCs: Client, Gateway and Server.

Client needs to connect via Gateway to Server.

Both PCs are connected to gateway via crossover cables.

Static IPs have been given to each interface.

Client:eth1
ip : 192.168.138.1\24
gateway 192.168.138.254

Gateway eth4
ip 192.168.138.254\24
gateway 192.168.138.1

Gateway eth1
ip 192.168.137.254\24
gateway 192.168.137.1

Server eth0
ip 192.168.137.1\24
gateway 192.168.137.254

Client can ping Gateway eth4 and eth1, Server can ping Gateway eth4 and eth1 but Client cannot ping Server.

Gateway can ping everything.

At first I thought I needed to insert static routes on Client and Server but this did not help and I now think that as they can ping the Gateway interface on the other network it is not necessary?

Ben Pilbrow
  • 12,041
  • 5
  • 36
  • 57
Drake
  • 113
  • 3
  • 2
    More information on the nature of the gateway might be helpful. what kind of hardware/software (OS, etc.) is it? Do you have the interfaces bridged? – Dennis Williamson Feb 24 '11 at 00:14

2 Answers2

2

Have you turned on IP routing?

$ cat /proc/sys/net/ipv4/ip_forward 
1

If the output is '0', then you need to turn it on:

$ sudo sysctl -w net.ipv4.ip_forward=1

Change the setting in /etc/sysctl.conf to make it persistent.

MikeyB
  • 39,291
  • 10
  • 105
  • 189
0

So client1 hits its gateway at 138.254 that goes to 138.1 back to itself?...

Client:eth1 ip : 192.168.138.1\24 *
gateway 192.168.138.254

Gateway eth4 ip 192.168.138.254\24
gateway 192.168.138.1 *

egroeg
  • 1
  • 1