The route that is applied is the one shown by route command. If it is the:
192.168.2.0 * 255.255.255.0 U 0 0 0 eth0
192.168.3.0 * 255.255.255.0 U 0 0 0 wlan1
You are missing something. Is this router2? It does not know how to get to
192.168.1.0.
I generally like to debug routing problems with a sniffer. Install
tcpdump(-mini) and check where each ping stops.
Also, send the "route -n" output for every device.
---
Luiz Angelo Daros de Luca, Me.
[email protected]
2013/8/15 Daniel Lipuma <[email protected]>
> Thanks Jonathan
>
> It didn't work
> I don't know what i´m doing wrong.
> Best regards!
> Daniel.
>
>
> * My network configuration of ROUTER 1 is:
> *--------------------------------------------------------------------------------------------------------------
>
> config interface 'LAN'
> option proto 'static'
> option ifname 'eth0'
> option ipaddr '192.168.1.1'
> option netmask '255.255.255.0'
>
> config interface 'WLAN'
> option proto 'static'
> option ipaddr '192.168.3.1'
> option netmask '255.255.255.0'
>
> config route
> option interface 'LAN'
> option target '192.168.2.0'
> option netmask '255.255.255.0'
> option gateway '192.168.3.2'
> option metric '5'
>
>
> --------------------------------------------------------------------------------------------------------------
>
> ###############################################################
>
> *But when i see the route, in the SSH console. The route isn´t the same
> as the network configuration.
>
> *Destination Gateway Genmask Flags Metric Ref Use Iface
> 192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
> 192.168.3.0 * 255.255.255.0 U 0 0 0 wlan1
>
>
> --------------------------------------------------------------------------------------------------------------
>
> ###############################################################
>
> *When i make a PING to router 2, i have:
>
> *root@OpenWrt:/etc/config# ping 192.168.2.1
> PING 192.168.2.1 (192.168.2.1): 56 data bytes
> ping: sendto: Network is unreachable
>
>
>
>
>
> * My network configuration of ROUTER 2 is:
> *--------------------------------------------------------------------------------------------------------------
> config interface 'loopback'
> option ifname 'lo'
> option proto 'static'
> option ipaddr '127.0.0.1'
> option netmask '255.0.0.0'
>
> config globals 'globals'
> option ula_prefix 'fdc6:2959:7499::/48'
>
> config interface 'WLAN'
> option proto 'static'
> option ipaddr '192.168.3.2'
> option netmask '255.255.255.0'
>
> config interface 'LAN'
> option proto 'static'
> option ifname 'eth0'
> option netmask '255.255.255.0'
> option ipaddr '192.168.2.1'
>
> config route
> option interface 'LAN'
> option target '192.168.1.0'
> option netmask '255.255.255.0'
> option gateway '192.168.3.1'
> option metric '5'
>
> --------------------------------------------------------------------------------------------------------------
>
> ###############################################################
>
> *But when i see the route, in the SSH console. The route isn´t the same
> as the network configuration.
>
> *Destination Gateway Genmask Flags Metric Ref Use Iface
> 192.168.2.0 * 255.255.255.0 U 0 0 0 eth0
> 192.168.3.0 * 255.255.255.0 U 0 0 0 wlan1
>
> ###############################################################
>
> * And all my firewalls zones are disables, and his general configuration
> are:
>
> *config defaults
> option input 'ACCEPT'
> option output 'ACCEPT'
> option forward 'ACCEPT'
> config include
> option path '/etc/firewall.user'
> config include 'miniupnpd'
> option type 'script'
> option path '/usr/share/miniupnpd/firewall.include'
> option family 'IPv4'
> option reload '1'
>
>
>
>
>
>
> At 07:02 a.m. 15/08/2013, you wrote:
>
> On 14/08/13 20:05, Daniel Lipuma wrote:
> > Hello dear community,
> >
> > Could you help me?
> >
> > What am i doing wrong? I have this configuration
> >
> > 192.168.3.1 - 192.168.3.2
> > +--------+ +--------+
> > | router1 |--------------- | router2 |
> > +--------+ +--------+
> > 192.168.1.1 192.168.2.1
> > | |
> > | |
> > +----+ +----+
> > | PC | | PC |
> > | 1 | | 2 |
> > +----+ +----+
> > 192.168.1.2 192.168.2.2
> >
> > PC 1 become a entry
> > route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.1
> > PC 2 become a entry, too.
> > route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.2.1
>
> Hi,
>
> router1 needs to know 192.168.2.0/24 is via 192.168.3.2
>
> router2 needs to know 192.168.1.0/24 is via 192.168.3.1
>
> if the routers 1 and 2 are default gateways you do not need to put a
> route on the PCs, but the routers must have them.
>
> >
> > But when i make ping, i dont have response from PC1 to PC2 and vice
> versa.
> >
> > I just have ping from 192.168.3.1 from PC1 and 192.168.3.2 from PC2.
> >
>
> you cannot ping in current configuration because router2 does not know
> how to get to the 192.168.0.1/24 network, so the reply never reaches you.
>
> Put routes on the routers and I think you'll be ok.
>
> Regards
>
> Jon
> _______________________________________________
> openwrt-users mailing list
> [email protected]
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users
>
>
> _______________________________________________
> openwrt-users mailing list
> [email protected]
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users
>
>
_______________________________________________
openwrt-users mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users