[CentOS] Basic Network question pinging different subnets

Sat Nov 17 01:11:57 UTC 2007
John R Pierce <pierce at hogranch.com>

Bob Metelsky wrote:
> Hi Im a little perplexed by this situation
>
> I have centos 4.5 installed on 2 pcs - each with 2 network cards
>
> machine 1
>
> eth0      Link encap:Ethernet  HWaddr 00:14:2A:6B:C8:CC
>          inet addr:10.54.7.2  Bcast:10.54.7.255  Mask:255.255.255.0
>         eth1      Link encap:Ethernet  HWaddr 00:11:50:9B:A2:90
>          inet addr:10.54.0.2  Bcast:10.54.0.255  Mask:255.255.255.0
>
> machine 2
>
> eth0      Link encap:Ethernet  HWaddr 00:14:2A:69:4C:47
>          inet addr:10.54.7.3  Bcast:10.54.7.255  Mask:255.255.255.0
>
> eth1      Link encap:Ethernet  HWaddr 00:11:50:9B:A5:0A
>          inet addr:10.54.0.3  Bcast:10.54.0.255  Mask:255.255.255.0
>
>
> machine 1 & 2 can ping each other  on either subnets
>

so you have two seperate networks?    the eth0's are connected to one 
hub or switch, and the eth1's to another hub or switch?


> machine 3 (windows)...
>
> C:\>ipconfig
>
>        Connection-specific DNS Suffix  . :
>        IP Address. . . . . . . . . . . . : 10.54.7.16
>        Subnet Mask . . . . . . . . . . . : 255.255.255.0
>        Default Gateway . . . . . . . . . : 10.54.7.1
>
> cant ping anything on the 10.54.0 subnet, nor does that subnet show up 
> ip using a port scanner...
>
> C:\>ping 10.54.0.2
>
> Pinging 10.54.0.2 with 32 bytes of data:
> Request timed out.
> Request timed out.
>
> C:\>ping 10.54.7.2
>
> Pinging 10.54.7.2 with 32 bytes of data:
> Reply from 10.54.7.2: bytes=32 time<1ms TTL=64
> Reply from 10.54.7.2: bytes=32 time<1ms TTL=64
>
>
> Any ideas why this is happening? I dont have a firewall on the 10.54 
> address,

presumably, the windows machine is connected to the 'eth0' network that 
the centos machines are connected to?

how exactly do you expect the packets to get from there to the other 
network?  the windows machine has been instructed to forward all unknown 
packets to 10.54.7.1, which presumably is some other sort of router...   
chances are, said 10.54.7.1 has no clue where 10.54.0.xxx is.

solution 1) configure a linux computer to do 'ip forwarding', and give 
the windows machine a route like...

    C>  route add 10.54.0.0 mask 255.255.255.0 gw 10.54.7.2

or, solution 2) configure the router at 10.54.7.1 to have a route to 
this other network.


if both networks are on the same hub/switch, then I can only ask... WHY?