Today I got in contact with OpenWrt for the first time, so I am a real newbie.
I tried to install OpenWrt on a Xiaomi RedMi-AC2100 router.
I got root ssh access by using the appropriate OpenWrt documentation.
I could download the OpenWrt firmware directly from ssh (it was eth-connected to my existing fritz.box).
Flashing worked fine, OpenWrt rebooted and I tried to proceed installing luci.
There I had massive problems. I could get an ssh root shell to OpenWrt, and from there I could ping the public internet, but DNS resolution did not work. Funny enough, sometimes it worked (1%). But no chance to download luci packages.
I found out that OpenWrt uses the 192.168.1.x subnet, but the fritz.box used the same, in fact OpenWrt got a an address of 192.168.1.129 over DHCP from fritz.box, even if it used 192.168.1.1 itself.
The cure to that problem was to connect OpenWrt to LAN4 of fritz.box, and to map that LAN4 port to the fritz.box guest lan, effectively using a different IP network. After that luci could be installed and everything worked.
I think there could be other solutions, e.g. changing network of fritz.box or assigning a different ip/net to OpenWrt on ssh shell w/o help of luci, but I was afraid to brick it.
Thus you can consider my issue as solved. I still post it in this forum, as I hope it might be of interest to other newbies with similar issues.
And maybe the install guide could cover that issue, maybe providing a simple waterproof ssh command to change the interface of OpenWrt at that phase (i.e. w/o luci).
Yes, you are right, that is another (and preferable) solution.
But as I said, I could already work around successfully. And especially for newbies, it might make sense to add a line or two in the setup documentation to state exactly how that ip address would be done over ssh. Every other installation step is written there so you can simply copy/paste. I was really impressed by the quality of the setup guide.
But this circumstance (installing from behind an existing router already using 129.168.1.x) is not even mentioned. And I assume it is not very exotic either. And of course I feared that any error would lock me out and I would then have to solder myself to some serial console to debrick.
Thank you, the links you provided explain quite well how to achieve what I requested.
So maybe a simple one-liner in the setup guide for RemMi-AC2100 to would be appropriate.
Note: I additionally was confused because I was able to download the binaries for flashing in the step before. In hindsight everything is clear. At that time I was still in the Xiaomi-firmware, so the box used 192.168.31.x and there was no conflict.
I myself changed the fritz.box to 192.168.1.x before. About 10 years before, because the Telecom Speedport I was using at that time had introduced 192.168.1.x to my network already, and I didn't want to change the servers with static addresses.