Can't access subnet

At home I have the ISP's router, with IP 192.168.0.1 that creates the .0.X subnet and another router in my room with OpenWrt and IP 192.168.1.1 creating the .1.X subnet.

I can access Internet from both routers, but can't talk to the devices on each subnet. (for example, in the .1.X subnet I have a SMB share and a printer but can't use them from the .0.X subnet)

This is my current config file, taken from here https://wiki.openwrt.org/toh/comtrend/ar5315u#switch_ports_for_vlans

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 'fda5:ace8:376d::/48'

config interface 'lan'
	option ifname 'eth0.1'
	option type 'bridge'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option gateway '192.168.0.1'
	option broadcast '192.168.1.255'
	option dns '1.1.1.1 1.0.0.1'

config interface 'wan'
	option ifname 'eth0.2'
	option proto 'dhcp'

config switch
	option name 'eth0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'eth0'
	option vlan '1'
	option ports '0 1 2 8t'

config switch_vlan
	option device 'eth0'
	option vlan '2'
	option ports '3 8t'

Thanks.

This is likely because you have Network Address translation enabled.

In order to see the 192.168.1.0/24 subnet, you need to do the following:

  • At the 192.168.1.1 router, turn off Masquerade (you do this in firewall)
  • On the 192.168.0.1 router, make a static route to 192.168.1.0/24 via the WAN IP assigned to the 192.168.1.1 device

Here's the route:

config route
	option interface 'lan'
	option target '192.168.1.0'
	option netmask '255.255.255.0'
	option gateway '192.168.0.x'
  • If you're able to configure it, make sure forwarding is Accepted on the LAN zone of the 192.168.0.1 router.

Hi, thanks for that quick anwser.

  1. About Masquerade. Should i uncheck the circled one or it's the alreade unchecked one?
    firewall

  2. My ISP router's configuration is very limited. Mainly I can only change this.

chrome_2018-08-27_21-09-27

Should I add something like this on the bottom?

D8:B6:b7:25:60:90 --> 192.168.0.2

I've tried but only manage to break both connections.

PS: i'll put this here also, if it helps

firefox_2018-08-27_20-29-24

Do you actually need to separate the devices into different subnets? If not, then I would suggest to set up your OpenWrt router as an access point (introduction, details). All devices in your home would get an IP address from the 192.168.0.0/24 range and could reach each other.

Yes, UNcheck...but...

No, that will not work. It seems your ISP router won't allow adding of static routes.

You will have to follow @mpa's advice: