[CentOS] Routing issue between 2 LANs

Sun Dec 19 20:30:53 UTC 2010
Jose Maria Terry Jimenez <jtj at tssystems.net>

El 19/12/10 21:17, Michel van Deventer escribió:
> Hi,
>
>>>>> The Fedora box (1. network):
>>>>> [jose at IDi ~]$ ping 192.168.236.80
>>>>> PING 192.168.236.80 (192.168.236.80) 56(84) bytes of data.
>>>>> 64 bytes from 192.168.236.80: icmp_req=1 ttl=64 time=1.61 ms
>>>>> 64 bytes from 192.168.236.80: icmp_req=2 ttl=64 time=0.684 ms
>>>>> [jose at IDi ~]$ ifconfig eth0 | grep -i 'inet addr'
>>>>>             inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.255.0
>>>>
>>>> This doesn't make much sense without a route.  Can you try a traceroute to the
>>>> fedora box address from the 192.168.236.80 box to see how/why it gets there?
>>>
>>> Sure, here it is:
>>>
>>>>  From fresh reboot of the Fedora14 box:
>>>
>>> [jose at IDi ~]$ su -
>>> Contraseña:
>>> [root at IDi ~]# route add -net 192.168.236.0 netmask 255.255.255.0 gw 192.168.1.100 dev eth0
>>> [root at IDi ~]# logout
>>>
>>> [jose at IDi ~]$ traceroute 192.168.236.80
>>> traceroute to 192.168.236.80 (192.168.236.80), 30 hops max, 60 byte packets
>>>    1  puente (192.168.1.100)  0.286 ms  0.260 ms  0.239 ms
>>>    2  192.168.236.80 (192.168.236.80)  0.963 ms !X  0.949 ms !X  0.930 ms !X
>>
>> We know why it works this direction.
>>
>>> [jose at IDi ~]$ ping 192.168.236.80
>>> PING 192.168.236.80 (192.168.236.80) 56(84) bytes of data.
>>> 64 bytes from 192.168.236.80: icmp_req=1 ttl=64 time=0.668 ms
>>> 64 bytes from 192.168.236.80: icmp_req=2 ttl=64 time=0.599 ms
>>> 64 bytes from 192.168.236.80: icmp_req=3 ttl=64 time=0.566 ms
>>> ^C
>>> --- 192.168.236.80 ping statistics ---
>>> 3 packets transmitted, 3 received, 0% packet loss, time 2000ms
>>> rtt min/avg/max/mdev = 0.566/0.611/0.668/0.042 ms
>>>
>>> [jose at IDi ~]$ ssh 192.168.236.80
>>> jose at 192.168.236.80's password:
>>> Last login: Sun Dec 19 20:44:44 2010 from 192.168.1.3
>>> [jose at control ~]$
>>
>> I wanted the reverse path.  Traceroute from the 192.168.236.80 box back to the
>> fedora address.  It doesn't make sense that it can return packets without a
>> route going through the Centos box.
> Yes it does make sense, if the machine in the 192.168.236.0/24 has the
> centos box in the middle (the one with two LAN cards) as a default
> route, then you wouldn't need a seperate route. Packets would come back.
> Can you give the network settings for 192.168.236.80 ?
>
> Can you tell us more about the network setup ? routers in both
> networks ? Maybe a quick drawing should make things more clear.
>
> If you cannot set a route on the various devices it might help to use
> proxy-arp.
>
> 	regards,
>
> 	Michel
>
Hope it helps (all addresses are 192.168. Trimmed to compact the schema):


----------      ----------     -----------
! 1.3    !------!1.100   !     !gw 236.21!
! gw 1.1 !   !  !  236.74!-----! 236.80  !
----------   !  ! gw 1.1 !  !  -----------
              !  ----------  !
              !              !
          [Router1]       [Router2]

Router 1 is a PFSense and its IP is 192.168.1.1
Router 2 is "something" (it is managed by other person, and i think is 
somekind of win server) and IP is 192.168.236.21

Best

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Scanned with Copfilter Version 0.84beta3a (ProxSMTP 1.6)
AntiVirus: ClamAV 0.95.2/12415 - Sun Dec 19 04:26:57 2010
by Markus Madlener @ http://www.copfilter.org