Help please, connecting openwrt router to main router

i have a xiaomi mi router 4a gigabit edition, running openwrt 19.07
i can't connect the MIR4AG to the ISP directly because i don't have RJ45 from the wall and i can't do it anyway,
i have the main router configured and it have internet , everything is good , now before i flashed the new Openwrt firmware ,
on xiaomi firmware i just connected as from LAN1 to the WAN port and i didn't do any configuration and everything worked flawlessly ,
i got internet working and the 2 wireless bands and everything. [probably the xiaomi miwifi app does the config itself]
, now after flashing the new Openwrt firmware, obviously i knew there would be ip conflict, i couldn't change the Lan IP from luci [gui] ,
because it times out every-time trying to apply change and it times out trying to revert, its a known issue, and i tried to ssh to the router
but it refuses connection [ssh_exchange_identification: Connection closed by remote host], apparently ssh package is not included and i don't know how to install it because i don't have
internet on the openwrt router because of conflict ip both routers having 192.168.1.1 ,
so i choose to do the following, i changed the Lan ip address of the main router to 192.168.20.1 and then configured WAN interface
on the openwrt router to 192.168.20.110 static, and the ipv4 gateway to 192.168.20.1, it should of got internet by now ,
since there is no conflict. but still it didn't work , i don't have internet on the openwrt router, or it wireless bands 2.4 and 5ghz
i am going to include pictures of all the setups from the main router and the openwrt router like firewalls and dns lan wan and all of these things.
diagram https://imgur.com/a/v7YE5yv
main router https://imgur.com/a/6mHB5sG
openwrt Lan interface https://imgur.com/a/istUfXJ
openwrt Wan interface https://imgur.com/a/1I502nw
openwrt router DHCP and DNS https://imgur.com/a/RF7A0eW
diagnostics,firewall, DynamicDNS,switch https://imgur.com/a/NXppMOv
wireless and interfaces in general https://imgur.com/a/o8w6KVU

As you use static IP address you also need to define the external DNS Server on the WAN interface

1 Like

there are a couple of options.

1/ convert to dumb ap - https://openwrt.org/docs/guide-user/network/wifi/dumbap

2/ make sure you provide DNSes to the clients connecting to openwrt, you don't seem to do it, this is normal when using static IP - https://openwrt.org/docs/guide-user/base-system/dhcp_configuration#dhcp_options

3/ set a static lease in the tp-link, then the WAN IP (set as DHCP client) of the openwrt device will always be the same, but it'll use the DNSes provided by the TP-Link.
Make sure the two devices don't share the same LAN side subnet

you should probably reboot the TP-Link, to get rid of the old MAC using the same IP provided by DHCP.

1 Like